curl and an API key. The flow is: create the stream, upload a video, add it to the stream’s playlist, add a destination, and start.
Set your key and workspace once, so the snippets stay short. An API key carries no workspace, so every request names one in X-Workspace-Id (see Conventions):
1
Find your workspace
id:401 means the key is missing, wrong or revoked.2
Create the stream
quality is one of q_720p, q_1080p, q_1440p, q_2160p. framerate is f_24, f_25, f_30 or f_60:id (stream_…). The stream comes with two empty playlists, one for video and one for audio.3
Upload a video
Uploading a local file takes three calls: create the upload,
PUT the bytes to a presigned URL, and mark it complete.GET /uploads/{id} shows when the file is ready.4
Add it to the playlist
Find the stream’s video playlist, then add the upload to it:Use the playlist whose
kind is video. All operations in one call succeed or fail together.5
Add a destination
Create an RTMP destination from your platform’s ingest URL and stream key (RTMP is the protocol live platforms use to receive video), then add it to the stream:A stream can send to up to 5 destinations (multistream), at most one of them YouTube.
6
Check it's ready to go live
ready is false, fix the listed issues (for example, the video is still processing) and check again.7
Start streaming
POST /streams/{id}/stop.8
Monitor it
On a connected YouTube channel, poll live stats while it runs:
GET /streams/{id}/destinations shows each destination’s delivery state.What’s next
Schedule instead of start
Call
POST /streams/{id}/schedule to go live automatically, once, daily or weekly.Play a scene
Build a live, designed scene with the Scenes API and put it on the stream with
PUT /streams/{id}/scene.