1

Prerequisites

To get the most out of this guide, you’ll need to:

2

Install the SDK

Get the Livepeer Javascript SDK.

  • npm

  • yarn

  • pnpm

  • bun

npm install livepeer
3

Initialize the SDK

The first step is to initialize the SDK with your Livepeer Studio API key.

import { Livepeer } from "livepeer";

const livepeer = new Livepeer({
  apiKey: "", // Your API key
});
4

Use the SDK

Now that you have the SDK installed and initialized, you can use it in your app. Let’s create a stream.

import { Livepeer } from "livepeer";

const livepeer = new Livepeer({
  apiKey: "",
});

const main = async () => {
  const { data } = await livepeer.stream.create({
    name: "Hello from JS SDK!",
  });
  console.log(data);
};

main();

Next steps

Checkout Livepeer API Reference to learn more about the Livepeer API and the Javascript SDK.