api.video
  1. Live
api.video
  • Account
    • Show account
      GET
  • Analytics
    • List live stream player sessions
      GET
    • List player session events
      GET
    • List video player sessions
      GET
  • Authentication
    • Authenticate
      POST
    • Refresh token
      POST
  • Live
    • List all live streams
      GET
    • Create live stream
      POST
    • Delete a live stream
      DELETE
    • Show live stream
      GET
    • Update a live stream
      PATCH
    • Delete a thumbnail
      DELETE
    • Upload a thumbnail
      POST
  • Players
    • List all players
      GET
    • Create a player
      POST
    • Delete a player
      DELETE
    • Show a player
      GET
    • Update a player
      PATCH
    • Delete logo
      DELETE
    • Upload a logo
      POST
  • Videos - Delegated upload
    • Upload with an upload token
      POST
    • List all active upload tokens.
      GET
    • Generate an upload token
      POST
    • Delete an upload token
      DELETE
    • Show upload token
      GET
  • Videos
    • List all videos
    • Create a video
    • Delete a video
    • Show a video
    • Update a video
    • Upload a video
    • Show video status
    • Pick a thumbnail
    • Upload a thumbnail
  • Captions
    • List video captions
    • Delete a caption
    • Show a caption
    • Update caption
    • Upload a caption
  • Chapters
    • List video chapters
    • Delete a chapter
    • Show a chapter
    • Upload a chapter
  • Webhooks
    • List all webhooks
    • Create Webhook
    • Delete a Webhook
    • Show Webhook details
  1. Live

Create live stream

POST
/live-streams
A live stream will give you the 'connection point' to RTMP your video stream to api.video. It will also give you the details for viewers to watch the same livestream. The public=false 'private livestream' is available as a BETA feature, and should be limited to livestreams of 3,000 viewers or fewer. See our Live Stream Tutorial for a walkthrough of this API with OBS. Your RTMP endpoint for the livestream is rtmp://broadcast.api.video/s/{streamKey}
Tutorials that create live streams.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://ws.api.video/live-streams' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "Test live",
    "playerId": "pl4f4ferf5erfr5zed4fsdd",
    "record": true
}'
Response Response Example
200 - response
{
    "assets": {
        "hls": "https://live.api.video/li4pqNqGUkhKfWcBGpZVLRY5.m3u8",
        "iframe": "<iframe src=\"https://embed.api.video/live/li4pqNqGUkhKfWcBGpZVLRY5\" width=\"100%\" height=\"100%\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"\"></iframe>",
        "player": "https://embed.api.video/live/li4pqNqGUkhKfWcBGpZVLRY5",
        "thumbnail": "https://cdn.api.video/live/li4pqNqGUkhKfWcBGpZVLRY5/thumbnail.jpg"
    },
    "broadcasting": false,
    "createdAt": "2020-07-29T10:45:35.000Z",
    "liveStreamId": "li4pqNqGUkhKfWcBGpZVLRY5",
    "name": "Live From New York",
    "public": true,
    "record": true,
    "streamKey": "cc1b4df0-d1c5-4064-a8f9-9f0368385135",
    "updatedAt": "2020-07-29T10:45:35.000Z"
}

Request

Body Params application/json

Examples

Responses

🟢200Success
application/json
Body

🟠400Bad Request
Modified at 2023-08-15 05:52:15
Previous
List all live streams
Next
Delete a live stream
Built with