Skip to content

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.

  1. Create an input.

    LIGR generates the host, the application name and the stream key. Send your picture to rtmpUrl with streamKey as the stream key, or to srtUrl.

    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"
    }

    latencyMs is 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" and sourceUrl.

    An input is reusable. Create one per camera feed, not one per match.

  2. 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"
    }

    type is one of youtube, facebook, twitter, linkedin, tiktok, twitch, custom and the partner platforms. custom takes any RTMP or SRT server. An srt:// url makes the protocol SRT. feedType is program with graphics, or clean without.

    A pull destination has no url and key. Send "transportDirection": "pull" and LIGR answers with pullUrl, the URL a player or a relay pulls from.

    A destination is reusable too. GET /v1/streams/destinations lists what the organization has, one-off destinations included.

  3. 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, fps and region are required. Everything else has a default. region is the AWS region the stream runs in. Pick the one nearest the input, for example ap-southeast-2 for Sydney or eu-west-2 for London. overlayId is an overlay of the same match, from GET /v2/matches/{id}?include=o.

    The id in the answer is the streamSettingsId every lifecycle route takes. Start the stream with POST /v1/streams/90412/start. See Automate a stream.

  4. 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, publishHighlights and destinationIds. Turning generateHighlights on while the stream runs needs archiveFullFeed already on. Any other change answers 400. Stop the stream first.

  5. 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.

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.

FieldMeaning
autoStreamStart and stop at the automation times of the match
autoStreamConfigPer trigger, preview, goLive and stop, a mode of schedule or venues
streamPreviewStartTimeMinutes relative to the scheduled start of the match
streamLiveStartTimeMinutes relative to the scheduled start of the match
streamAutoStopTimeMinutes relative to the time the match stopped
FieldMeaning
archiveFullFeedKeep the recording of the program feed
archiveCleanFeedKeep the recording of the clean feed
autoConvertRecordingConvert the recording after the match. Needs archiveFullFeed
generateHighlightsCut highlights from the facts of the match
publishHighlightsPublish the highlights as they are cut
StatusCause
400A 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
403A key without the streams:write scope
404The match, stream, input or destination belongs to another organization