v1

latestOpenAPI 3.0.02026-07-175989869.3 KB
Live Streams

Create live stream

Creates a livestream object.

post/live-streams

Request body

namestring required

Add a name for your live stream here.

publicboolean

Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature here.

playerIdstring

The unique identifier for the player.

Example request

{
  "name": "Test live",
  "playerId": "pl4f4ferf5erfr5zed4fsdd",
  "restreams": [
    {
      "name": "YouTube",
      "serverUrl": "rtmp://youtube.broadcast.example.com",
      "streamKey": "dw-dew8-q6w9-k67w-1ws8"
    },
    {
      "name": "Twitch",
      "serverUrl": "rtmp://twitch.broadcast.example.com",
      "streamKey": "dw-dew8-q6w9-k67w-1ws8"
    }
  ]
}

Response

Success

liveStreamIdstring required

The unique identifier for the live stream. Live stream IDs begin with "li."

namestring

The name of your live stream.

streamKeystring

The unique, private stream key that you use to begin streaming.

publicboolean

Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature here.

playerIdstring

The unique identifier for the player.

broadcastingboolean

Whether or not you are broadcasting the live video you recorded for others to see. True means you are broadcasting to viewers, false means you are not.

createdAtstring date-time

When the player was created, presented in ATOM UTC format.

updatedAtstring date-time

When the player was last updated, presented in ATOM UTC format.

Example response

{
  "streamKey": "dw-dew8-q6w9-k67w-1ws8",
  "createdAt": "2020-01-31T10:17:47Z",
  "assets": {
    "thumbnail": "https://live.api.video/li400mYKSgQ6xs7taUeSaEKr/thumbnail.jpg",
    "iframe": "<iframe src=\\\"https://embed.api.video/live/li4pqNqGUkhKfWcBGpZVLRY5\\\" width=\\\"100%\\\" height=\\\"100%\\\" frameborder=\\\"0\\\" scrolling=\\\"no\\\" allowfullscreen=\\\"\\\"></iframe>",
    "hls": "https://live.api.video/li4pqNqGUkhKfWcBGpZVLRY5.m3u8",
    "player": "https://embed.api.video/live/li400mYKSgQ6xs7taUeSaEKr"
  },
  "public": true,
  "restreams": [
    {
      "streamKey": "dw-dew8-q6w9-k67w-1ws8",
      "serverUrl": "rtmp://my.broadcast.example.com/app",
      "name": "My restream server"
    },
    {
      "streamKey": "dw-dew8-q6w9-k67w-1ws8",
      "serverUrl": "rtmp://my.broadcast.example.com/app",
      "name": "My restream server"
    }
  ],
  "liveStreamId": "li400mYKSgQ6xs7taUeSaEKr",
  "name": "My Live Stream",
  "playerId": "pl45d5vFFGrfdsdsd156dGhh",
  "broadcasting": true,
  "updatedAt": "2020-01-31T10:18:47Z"
}