POST
/
stream
curl --request POST \
  --url https://livepeer.studio/api/stream \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "test_stream",
}'
{
  "id": "de7818e7-610a-4057-8f6f-b785dc1e6f88",
  "name": "test_stream",
  "creatorId": {
    "type": "unverified",
    "value": "<string>"
  },
  "userTags": {},
  "lastSeen": 1587667174725,
  "sourceSegments": 1,
  "transcodedSegments": 2,
  "sourceSegmentsDuration": 1,
  "transcodedSegmentsDuration": 2,
  "sourceBytes": 1,
  "transcodedBytes": 2,
  "ingestRate": 1,
  "outgoingRate": 2,
  "isActive": true,
  "isHealthy": true,
  "issues": [
    "<string>"
  ],
  "createdByTokenName": "<string>",
  "createdAt": 1587667174725,
  "parentId": "de7818e7-610a-4057-8f6f-b785dc1e6f88",
  "streamKey": "hgebdhhigq",
  "pull": {
    "source": "https://myservice.com/live/stream.flv",
    "headers": {
      "Authorization": "Bearer 123"
    },
    "location": {
      "lat": 39.739,
      "lon": -104.988
    }
  },
  "playbackId": "eaw4nk06ts2d0mzb",
  "playbackPolicy": {
    "type": "public",
    "webhookId": "<string>",
    "webhookContext": {},
    "refreshInterval": 123
  },
  "profiles": [
    {
      "width": 129,
      "name": "720p",
      "height": 129,
      "bitrate": 401,
      "fps": 1,
      "fpsDen": 2,
      "quality": 22,
      "gop": "<string>",
      "profile": "H264Baseline",
      "encoder": "H.264"
    }
  ],
  "record": true,
  "multistream": {
    "targets": [
      {
        "id": "PUSH123",
        "profile": "720p"
      }
    ]
  },
  "suspended": true
}

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
required
pull
object

Configuration for a stream that should be actively pulled from an external source, rather than pushed to Livepeer. If specified, the stream will not have a streamKey.

creatorId
playbackPolicy
object

Whether the playback policy for a asset or stream is public or signed

profiles
object[]
record
boolean

Should this stream be recorded? Uses default settings. For more customization, create and configure an object store.

multistream
object
userTags
object

User input tags associated with the stream

Response

201 - application/json
id
string
name
string
required
creatorId
object
userTags
object

User input tags associated with the stream

lastSeen
number
sourceSegments
number
transcodedSegments
number
sourceSegmentsDuration
number

Duration of all the source segments, sec

transcodedSegmentsDuration
number

Duration of all the transcoded segments, sec

sourceBytes
number
transcodedBytes
number
ingestRate
number

Rate at which sourceBytes increases (bytes/second)

outgoingRate
number

Rate at which transcodedBytes increases (bytes/second)

isActive
boolean

If currently active

isHealthy
boolean

Indicates whether the stream is healthy or not.

issues
string[]

A string array of human-readable errors describing issues affecting the stream, if any.

createdByTokenName
string

Name of the token used to create this object

createdAt
number

Timestamp (in milliseconds) at which stream object was created

parentId
string

Points to parent stream object

streamKey
string

Used to form RTMP ingest URL

pull
object

Configuration for a stream that should be actively pulled from an external source, rather than pushed to Livepeer. If specified, the stream will not have a streamKey.

playbackId
string

The playback ID to use with the Playback Info endpoint to retrieve playback URLs.

playbackPolicy
object

Whether the playback policy for a asset or stream is public or signed

profiles
object[]
record
boolean

Should this stream be recorded? Uses default settings. For more customization, create and configure an object store.

multistream
object
suspended
boolean

If currently suspended