Live Streaming API Reference
Live Streaming API Reference
Base URL: https://api.antcdn.net
Authentication: Authorization: Bearer <api-key>
All requests are automatically scoped to the environment associated with your API key.
Create Stream
/v1/live-streams
Creates a new live stream and returns the stream key. The stream key is only returned here and on key rotation — store it immediately.
Request body
| Field | Type | Default | Description |
|---|---|---|---|
name | string | required | Display name for the stream |
quality | string | standard | standard (720p/480p/360p), high (1080p/720p/480p), passthrough (source resolution) |
lowLatency | boolean | true | Enable low-latency HLS |
recording | boolean | false | Record the stream for later VOD playback |
Response
{ "streamId": "ls_01jpp...", "edgeId": "lse_01jpp...", "name": "My Live Show", "state": "idle", "quality": "standard", "recording": false, "lowLatency": true, "reconnectWindowSeconds": 60, "createdAt": "2026-03-15T10:00:00Z", "ingest": { "rtmpUrl": "rtmp://ingest.antcdn.net/live", "srtUrl": "srt://ingest.antcdn.net:9000", "streamKey": "sk_...", "rtmpFullUrl": "rtmp://ingest.antcdn.net/live/sk_...", "srtFullUrl": "srt://ingest.antcdn.net:9000?streamid=#!::r=live/sk_...,m=publish" }, "playback": { "hlsUrl": "https://worker.antcdn.net/live/lse_01jpp.../master.m3u8", "edgeId": "lse_01jpp..." }}Important: ingest.streamKey, ingest.rtmpFullUrl, and ingest.srtFullUrl are only present in this response and on key rotation. Subsequent GET calls omit them.
List Streams
/v1/live-streams
Returns all streams for your environment.
Query parameters
| Param | Type | Default | Description |
|---|---|---|---|
limit | integer | 20 | Max results to return (max 100) |
offset | integer | 0 | Pagination offset |
Response
{ "streams": [ { /* stream object, no streamKey */ } ], "total": 3}Get Stream
/v1/live-streams/{streamId}
Returns the current state of a stream. Poll this endpoint to track state changes.
The stream key is not returned — only ingest.rtmpUrl and ingest.srtUrl (without key).
Rotate Stream Key
/v1/live-streams/{streamId}/rotate-key
Generates a new stream key and immediately invalidates the previous one. Any active encoder will be disconnected.
Returns the new key and full connection URLs — same one-time visibility as on creation.
Response
{ "streamKey": "sk_new...", "rtmpFullUrl": "rtmp://ingest.antcdn.net/live/sk_new...", "srtFullUrl": "srt://ingest.antcdn.net:9000?streamid=#!::r=live/sk_new...,m=publish"}Cannot rotate while a stream is
liveorconnecting.
Delete Stream
/v1/live-streams/{streamId}
Permanently deletes the stream. Cannot delete while live or connecting.
Returns 204 No Content on success.
Stream Object Reference
| Field | Type | Description |
|---|---|---|
streamId | string | Stable resource ID |
edgeId | string | Public ID used in the playback URL |
name | string | Display name |
state | string | idle | connecting | live | ended | error |
quality | string | standard | high | passthrough |
recording | boolean | Whether recording is enabled |
lowLatency | boolean | Whether low-latency HLS is enabled |
reconnectWindowSeconds | integer | How long to hold a session open after encoder disconnect |
createdAt | string | ISO 8601 timestamp |
startedAt | string? | When the stream last went live |
endedAt | string? | When the stream last ended |
ingest.rtmpUrl | string | RTMP server address (without key) |
ingest.srtUrl | string | SRT server address (without key) |
playback.hlsUrl | string | HLS master playlist URL for viewers |