Skip to content

Create a stream

POST/v1/streams

POST
/v1/streams
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.

Media typeapplication/json

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
name
string
overlayId

The overlay to render. Send null to unlink.

integer format: int32
>= 1
resolution
required
string
Allowed values: 1280 * 720 1920 * 1080
fps
required
string
Allowed values: 25 30 50 60
region
required
string
Allowed values: us-east-1 ap-southeast-2 us-east-2 us-west-1 us-west-2 ap-south-1 ap-northeast-1 ap-northeast-2 ap-northeast-3 ap-southeast-1 ca-central-1 eu-central-1 eu-west-1 eu-west-2 eu-west-3 eu-north-1 sa-east-1 eu-south-1 eu-south-2 af-south-1 ap-southeast-3 ap-southeast-4 ap-east-1 me-south-1 me-central-1 il-central-1 cn-north-1 cn-northwest-1 mx-central-1
size
string
Allowed values: small regular large
videoBitrateKbps

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.

integer format: int32
>= 2000 <= 10000
inputId

The input to read. Sets inputSelection to specific.

integer format: int32
>= 1
destinationIds

The destinations to publish to. Sets destinationSelection to specific.

Array<integer>
inputSelection
string
Allowed values: specific home venue
destinationSelection
string
Allowed values: specific home venue
hideOverlay
boolean
autoStream
boolean
autoStreamConfig
object
preview
object
mode
required
string
Allowed values: schedule venues
goLive
object
mode
required
string
Allowed values: schedule venues
stop
object
mode
required
string
Allowed values: schedule venues
streamPreviewStartTime
integer format: int32
nullable
streamLiveStartTime
integer format: int32
nullable
streamAutoStopTime
integer format: int32
nullable
generateHighlights
boolean
publishHighlights
boolean
archiveFullFeed
boolean
archiveCleanFeed
boolean
autoConvertRecording

Needs archiveFullFeed.

boolean
matchId
required

Entity identifier

integer format: int32
>= 1

Created

Media typeapplication/json

The configuration of one stream of a match.

object
id
required

Entity identifier

integer format: int32
>= 1
name
required
string
matchId
required

Entity identifier

integer format: int32
>= 1
competitionId
required

Entity identifier

integer format: int32
>= 1
overlayId
required

The overlay the stream renders. Null when no overlay is linked.

integer format: int32
>= 1
resolution
required
string
Allowed values: 1280 * 720 1920 * 1080
fps
required
string
Allowed values: 25 30 50 60
region
required
string
Allowed values: us-east-1 ap-southeast-2 us-east-2 us-west-1 us-west-2 ap-south-1 ap-northeast-1 ap-northeast-2 ap-northeast-3 ap-southeast-1 ca-central-1 eu-central-1 eu-west-1 eu-west-2 eu-west-3 eu-north-1 sa-east-1 eu-south-1 eu-south-2 af-south-1 ap-southeast-3 ap-southeast-4 ap-east-1 me-south-1 me-central-1 il-central-1 cn-north-1 cn-northwest-1 mx-central-1
size
required
string
Allowed values: small regular large
videoBitrateKbps
required

Video bitrate in kb/s. Null means the preset for the resolution.

number format: double
nullable
inputId
required

The input the stream reads. Null until one is linked or resolved.

integer format: int32
>= 1
inputSelection
required

specific uses inputId. home and venue resolve the input from the match.

string
Allowed values: specific home venue
destinationSelection
required

specific uses destinations. home and venue resolve them from the match.

string
Allowed values: specific home venue
destinations
required
Array<object>
object
id
required

Entity identifier

integer format: int32
>= 1
name
required
string
type
required
string
Allowed values: youtube facebook twitter linkedin tiktok twitch custom perform genius img igame fifa+ infront
url
required
string
key
required
string
idleImageUrl
string
hideOverlay
required
boolean
autoStream
required
boolean
autoStreamConfig
required
object
preview
object
mode
required
string
Allowed values: schedule venues
goLive
object
mode
required
string
Allowed values: schedule venues
stop
object
mode
required
string
Allowed values: schedule venues
streamPreviewStartTime
required

Minutes relative to the scheduled start of the match.

number format: double
nullable
streamLiveStartTime
required

Minutes relative to the scheduled start of the match.

number format: double
nullable
streamAutoStopTime
required

Minutes relative to the time the match stopped.

number format: double
nullable
generateHighlights
required
boolean
publishHighlights
required
boolean
archiveFullFeed
required
boolean
archiveCleanFeed
required
boolean
autoConvertRecording
required
boolean
createdAt
required
string
updatedAt
required
string
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

Media typeapplication/json
object
message
required
string
details
required
object
key
additional properties
Examplegenerated
{
"message": "example",
"details": {
"additionalProperty": "example"
}
}

Missing or invalid api key

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}

Api key provides insufficient access for the request

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}

Stream not found

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}

Api key has made too many requests

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}

An unexpected error has occured. If problems persist please contact support

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}