Create a stream
POST/v1/streams
const url = 'https://api.ligr.live/rest/v1/streams';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","overlayId":1,"resolution":"1280 * 720","fps":"25","region":"us-east-1","size":"small","videoBitrateKbps":1,"inputId":1,"destinationIds":[1],"inputSelection":"specific","destinationSelection":"specific","hideOverlay":true,"autoStream":true,"autoStreamConfig":{"preview":{"mode":"schedule"},"goLive":{"mode":"schedule"},"stop":{"mode":"schedule"}},"streamPreviewStartTime":1,"streamLiveStartTime":1,"streamAutoStopTime":1,"generateHighlights":true,"publishHighlights":true,"archiveFullFeed":true,"archiveCleanFeed":true,"autoConvertRecording":true,"matchId":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.ligr.live/rest/v1/streams \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "overlayId": 1, "resolution": "1280 * 720", "fps": "25", "region": "us-east-1", "size": "small", "videoBitrateKbps": 1, "inputId": 1, "destinationIds": [ 1 ], "inputSelection": "specific", "destinationSelection": "specific", "hideOverlay": true, "autoStream": true, "autoStreamConfig": { "preview": { "mode": "schedule" }, "goLive": { "mode": "schedule" }, "stop": { "mode": "schedule" } }, "streamPreviewStartTime": 1, "streamLiveStartTime": 1, "streamAutoStopTime": 1, "generateHighlights": true, "publishHighlights": true, "archiveFullFeed": true, "archiveCleanFeed": true, "autoConvertRecording": true, "matchId": 1 }'Creates a stream for a match. The stream takes its competition from the match. Link an input
and destinations now, or later with an update. Start it with POST /v1/streams/{id}/start.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”The stream takes its competition from the match. Every field but matchId, resolution,
fps and region has a default. A typical body: matchId, name, resolution, fps,
region, inputId, destinationIds and overlayId.
object
The overlay to render. Send null to unlink.
Video bitrate in kb/s. The encoder runs at whole megabits, so the value is rounded to the nearest 1000 and must fall between 2000 and 10000. Leave it out for the preset of the resolution.
The input to read. Sets inputSelection to specific.
The destinations to publish to. Sets destinationSelection to specific.
object
object
object
object
Needs archiveFullFeed.
Entity identifier
Responses
Section titled “Responses”Created
The configuration of one stream of a match.
object
Entity identifier
Entity identifier
Entity identifier
The overlay the stream renders. Null when no overlay is linked.
Video bitrate in kb/s. Null means the preset for the resolution.
The input the stream reads. Null until one is linked or resolved.
specific uses inputId. home and venue resolve the input from the match.
specific uses destinations. home and venue resolve them from the match.
object
Entity identifier
object
object
object
object
Minutes relative to the scheduled start of the match.
Minutes relative to the scheduled start of the match.
Minutes relative to the time the match stopped.
Example
{ "resolution": "1280 * 720", "fps": "25", "region": "us-east-1", "size": "small", "inputSelection": "specific", "destinationSelection": "specific", "destinations": [ { "type": "youtube" } ], "autoStreamConfig": { "preview": { "mode": "schedule" }, "goLive": { "mode": "schedule" }, "stop": { "mode": "schedule" } }}Request is invalid
object
object
Examplegenerated
{ "message": "example", "details": { "additionalProperty": "example" }}Missing or invalid api key
object
Examplegenerated
{ "message": "example"}Api key provides insufficient access for the request
object
Examplegenerated
{ "message": "example"}Stream not found
object
Examplegenerated
{ "message": "example"}Api key has made too many requests
object
Examplegenerated
{ "message": "example"}An unexpected error has occured. If problems persist please contact support
object
Examplegenerated
{ "message": "example"}