Livestream
Create a livestream
Learn how to create a livestream
Creating and watching a livestream is easy! The example below uses Create Stream API to create and watch a livestream.
Stream Creation
We can use the Livepeer SDK to create a stream. The example below uses the Create Stream API.
Node.js
Python
Ruby
PHP
Go
import { Livepeer } from "livepeer";
const apiKey = 'YOUR_API_KEY'; // Replace with your API key
const livepeer = new Livepeer(apiKey);
const streamData = {
name: "test_stream"
};
livepeer
.createStream(streamData)
.then((response) => {
console.log("Stream created:", response);
})
.catch((error) => {
console.error("Error creating stream:", error);
});
Play a Stream
To learn how to play a stream, see the Play a Livestream guide.
Was this page helpful?