Configure a stream
A stream needs three things: an input LIGR reads the picture from, one or more destinations it
publishes to, and the match it belongs to. This guide creates all three over REST and links them.
It needs a write key with the streams scope, and a match id.
The endpoints are under Streams in the REST reference.
-
Create an input.
LIGR generates the host, the application name and the stream key. Send your picture to
rtmpUrlwithstreamKeyas the stream key, or tosrtUrl.Terminal curl -X POST 'https://api.ligr.live/rest/v1/streams/inputs' \-H "Authorization: Bearer $LIGR_API_KEY" \-H 'Content-Type: application/json' \-d '{ "name": "OB van 1", "latencyMs": 1000 }'201 Created {"id": 412,"name": "OB van 1","type": "default","host": "a1b2c3d4.stream.ligr.live","applicationName": "en123","streamKey": "e5f6a7b8c9d0e1f2","rtmpUrl": "rtmp://a1b2c3d4.stream.ligr.live/en123","srtUrl": "srt://a1b2c3d4.stream.ligr.live:10080?streamid=#!::r=en123/e5f6a7b8c9d0e1f2,m=publish","sourceUrl": null,"latencyMs": 1000,"createdAt": "2026-09-12T08:00:00.000Z","updatedAt": "2026-09-12T08:00:00.000Z"}latencyMsis the receive latency of the input. It absorbs network jitter and adds the same delay to the picture. It is one of 20, 50, 100, 150, 250, 350, 500, 1000, 1500, 2000, 2500 or 3000. For a source LIGR pulls instead, send"type": "pull"andsourceUrl.An input is reusable. Create one per camera feed, not one per match.
-
Save a destination.
Terminal curl -X POST 'https://api.ligr.live/rest/v1/streams/destinations' \-H "Authorization: Bearer $LIGR_API_KEY" \-H 'Content-Type: application/json' \-d '{"name": "YouTube main","type": "youtube","url": "rtmp://a.rtmp.youtube.com/live2","key": "abcd-efgh-ijkl-mnop"}'201 Created {"id": 3301,"name": "YouTube main","type": "youtube","transportDirection": "push","transportProtocol": "rtmp","feedType": "program","url": "rtmp://a.rtmp.youtube.com/live2","key": "abcd-efgh-ijkl-mnop","pullUrl": null,"singleUse": false,"createdAt": "2026-09-12T08:01:00.000Z","updatedAt": "2026-09-12T08:01:00.000Z"}typeis one ofyoutube,facebook,twitter,linkedin,tiktok,twitch,customand the partner platforms.customtakes any RTMP or SRT server. Ansrt://url makes the protocol SRT.feedTypeisprogramwith graphics, orcleanwithout.A pull destination has no url and key. Send
"transportDirection": "pull"and LIGR answers withpullUrl, the URL a player or a relay pulls from.A destination is reusable too.
GET /v1/streams/destinationslists what the organization has, one-off destinations included. -
Create the stream.
Terminal curl -X POST 'https://api.ligr.live/rest/v1/streams' \-H "Authorization: Bearer $LIGR_API_KEY" \-H 'Content-Type: application/json' \-d '{"matchId": 1188213,"name": "Main feed","resolution": "1920 * 1080","fps": "50","region": "ap-southeast-2","inputId": 412,"destinationIds": [3301],"overlayId": 2300003}'201 Created (excerpt) {"id": 90412,"name": "Main feed","matchId": 1188213,"competitionId": 2311,"overlayId": 2300003,"resolution": "1920 * 1080","fps": "50","region": "ap-southeast-2","size": "regular","inputId": 412,"inputSelection": "specific","destinationSelection": "specific","destinations": [{ "id": 3301, "name": "YouTube main", "type": "youtube", "url": "rtmp://a.rtmp.youtube.com/live2", "key": "abcd-efgh-ijkl-mnop" }],"hideOverlay": false,"autoStream": false,"generateHighlights": false,"archiveFullFeed": false}The stream takes its competition from the match.
matchId,resolution,fpsandregionare required. Everything else has a default.regionis the AWS region the stream runs in. Pick the one nearest the input, for exampleap-southeast-2for Sydney oreu-west-2for London.overlayIdis an overlay of the same match, fromGET /v2/matches/{id}?include=o.The
idin the answer is thestreamSettingsIdevery lifecycle route takes. Start the stream withPOST /v1/streams/90412/start. See Automate a stream. -
Read it back, and change it.
Terminal curl 'https://api.ligr.live/rest/v1/streams?matchId=1188213' -H "Authorization: Bearer $LIGR_API_KEY"curl 'https://api.ligr.live/rest/v1/streams/90412' -H "Authorization: Bearer $LIGR_API_KEY"An update sends only the fields that change. Add a second destination and turn on highlights:
Terminal curl -X POST 'https://api.ligr.live/rest/v1/streams/90412' \-H "Authorization: Bearer $LIGR_API_KEY" \-H 'Content-Type: application/json' \-d '{ "destinationIds": [3301, 3302], "generateHighlights": true, "archiveFullFeed": true }'While the stream runs, only these fields can change:
autoStream,autoStreamConfig, the three times,generateHighlights,publishHighlightsanddestinationIds. TurninggenerateHighlightson while the stream runs needsarchiveFullFeedalready on. Any other change answers 400. Stop the stream first. -
Delete what you no longer need.
Terminal curl -X DELETE 'https://api.ligr.live/rest/v1/streams/90412' -H "Authorization: Bearer $LIGR_API_KEY"A running stream, an input in use by a running stream, and a destination linked to a running stream all refuse to delete. Stop the stream first.
Automatic input and destinations
Section titled “Automatic input and destinations”A stream can pick its input and destinations from the match instead of fixed ids. Send
"inputSelection": "home" to use the input assigned to the home team, or "venue" for the one
assigned to the venue of the match. destinationSelection works the same way. Assign inputs and
destinations to teams and venues in the dashboard. A stream created with fixed ids uses
specific, and an update that sends inputId or destinationIds moves it back to specific.
Automation
Section titled “Automation”| Field | Meaning |
|---|---|
autoStream | Start and stop at the automation times of the match |
autoStreamConfig | Per trigger, preview, goLive and stop, a mode of schedule or venues |
streamPreviewStartTime | Minutes relative to the scheduled start of the match |
streamLiveStartTime | Minutes relative to the scheduled start of the match |
streamAutoStopTime | Minutes relative to the time the match stopped |
Recording and highlights
Section titled “Recording and highlights”| Field | Meaning |
|---|---|
archiveFullFeed | Keep the recording of the program feed |
archiveCleanFeed | Keep the recording of the clean feed |
autoConvertRecording | Convert the recording after the match. Needs archiveFullFeed |
generateHighlights | Cut highlights from the facts of the match |
publishHighlights | Publish the highlights as they are cut |
Errors
Section titled “Errors”| Status | Cause |
|---|---|
| 400 | A change the running stream does not allow, a push destination without url and key, a pull input without sourceUrl, a latency outside the list, or a delete of something in use |
| 403 | A key without the streams:write scope |
| 404 | The match, stream, input or destination belongs to another organization |