Skip to main content
This walkthrough takes you from nothing to a running stream using curl and an API key. The flow is: add some media, point it at a destination, create the stream, and start it. Set your key once so the snippets below stay short:
export SL_KEY="sl_your_key_here"
1

Verify your credentials

Confirm the key works and see your account:
curl https://api.streamloop.app/v1/me \
  -H "x-api-key: $SL_KEY"
Returns your User (id, email, firstName, …). A 401 means the key is missing, wrong, or revoked.
2

Add a video

Import a video from a public URL (you can also upload files directly — see the Uploads endpoints). type is VIDEO or AUDIO:
curl -X POST https://api.streamloop.app/v1/uploads/from-link \
  -H "x-api-key: $SL_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "type": "VIDEO", "url": "https://example.com/my-video.mp4" }'
Note the objectID from the returned Upload — you’ll reference it when creating the stream.
3

Add a destination

Point at any RTMP target. Grab the ingest URL and stream key from your platform’s dashboard (YouTube, Twitch, Facebook Live, or custom RTMP):
curl -X POST https://api.streamloop.app/v1/destinations \
  -H "x-api-key: $SL_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My channel",
    "rtmpUrl": "rtmp://a.rtmp.youtube.com/live2",
    "rtmpKey": "xxxx-xxxx-xxxx-xxxx"
  }'
Note the destination id from the response.
4

Create the stream

Combine the media and destination into a stream. quality is one of q_720p, q_1080p, q_1440p, q_2160p; framerate is f_24, f_25, f_30, or f_60:
curl -X POST https://api.streamloop.app/v1/streams \
  -H "x-api-key: $SL_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Lofi radio",
    "quality": "q_1080p",
    "framerate": "f_30",
    "destinationID": "dest_…",
    "videoUploadObjectID": "obj_…"
  }'
Note the stream id. (To loop several clips instead of one video, create a playlist and pass playlistIDs instead of videoUploadObjectID.)
5

Check it's ready to go live

Readiness surfaces anything that would stop the stream from starting:
curl https://api.streamloop.app/v1/streams/{id}/readiness \
  -H "x-api-key: $SL_KEY"
{ "ready": true, "issues": [] }
If ready is false, fix the listed issues (for example, the video is still being prepared) and check again.
6

Start streaming

curl -X POST https://api.streamloop.app/v1/streams/{id}/start \
  -H "x-api-key: $SL_KEY"
Your video now loops to the destination 24/7. Stop it any time with POST /streams/{id}/stop.
7

Monitor it

Poll live stats while it runs:
curl https://api.streamloop.app/v1/streams/{id}/live-stats \
  -H "x-api-key: $SL_KEY"
Prefer not to call low-level endpoints in order? Point an AI agent at the MCP server and describe the outcome you want — it drives the same operations as tools.

What’s next

Full endpoint reference

Every operation across streams, uploads, playlists, destinations, billing, and crypto.

Schedule instead of start

Pass scheduleStartAt/scheduleEndAt when creating a stream, or call POST /streams/{id}/schedule, to go live automatically.