Skip to main content

Documentation Index

Fetch the complete documentation index at: https://na-36-docs-v2.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Create a stream via the API or SDK to get a stream key (for broadcasters) and a playback ID (for viewers). The example below uses the Create Stream API.

Create a stream with the SDK

import { Livepeer } from "livepeer";

const livepeer = new Livepeer({ apiKey: process.env.LIVEPEER_API_KEY });

const { data } = await livepeer.stream.create({
  name: "my-stream",
});

console.log("Stream key:", data.streamKey);
console.log("Playback ID:", data.playbackId);

Use the stream key and playback ID

  • Stream key - Give this to the broadcaster. They enter it in OBS (or another encoder) or use it for in-browser WebRTC broadcast. Keep the stream key secret; anyone with it can push video to the stream.
  • Playback ID - Use this in your app to play the stream (e.g. With the Livepeer Player or the Playback Info API). You can expose the playback ID to viewers.

Next steps

Last modified on April 8, 2026