Learn how to create your first stream using the Livepeer Javascript SDK.
Prerequisites
Install the SDK
npm install livepeer
Initialize the SDK
import { Livepeer } from "livepeer"; const livepeer = new Livepeer({ apiKey: "<api-key>", // Your API key });
Use the SDK
import { Livepeer } from "livepeer"; const livepeer = new Livepeer({ apiKey: "<api-key>", }); const main = async () => { const { stream } = await livepeer.stream.create({ name: "Hello from JS SDK!", }); console.log(stream); }; main();
Try it yourself
Was this page helpful?