1.0.0
OAS 3.0.3

Video Live Streaming

Use the Video Live Streaming API to create and manage your RTMP live streams. This includes managing outputs as well as manually starting and stopping streams. See the live streaming guide for information on how to use the Live Streaming API to stream video to your users.

The API supports Basic Authentication using your Cloudinary API Key and API Secret (which can be found on the Dashboard page of your Cloudinary Console).

Basic Authentication (basicAuth)
Client Libraries
Shell
Ruby
Node.js
PHP
Python
More

Get a list of live streams

Responses
  • 200a list of live streams
    application/json
  • 401authentication error
    application/json
  • 403authorization error
    application/json
GET/live_streams
Shell cURL
curl --request GET \
  --url https://api.cloudinary.com/v2/video/CLOUD_NAME/live_streams \
  --header 'Authorization: Basic'
{
  "request_id": "6ec0bd7f11c043da975e2a8ad9ebae0b",
  "data": [
    {
      "id": "0bd7f11c043da975e2a8ad9ebae0b6ec",
      "name": "My Live Stream 1",
      "input": {
        "type": "rtmp",
        "uri": "rtmp://live.cloudinary.com/streams",
        "stream_key": "dh8bxtg97t9cns4bddoa"
      },
      "status": "idle",
      "outputs": [
        {
          "id": "8132d2dc5251432bb57f32ee55a336c1",
          "name": "default hls",
          "type": "hls",
          "uri": "https://res.cloudinary.com/demo/video/live/live_stream_0bd7f11c043da975e2a8ad9ebae0b6ec_hls.m3u8",
          "created_at": 1712914020253,
          "updated_at": 1712914020253
        },
        {
          "id": "29b5cd6f54474bea9cec3834e763e12c",
          "name": "default archive",
          "type": "archive",
          "public_id": "live_stream_0bd7f11c043da975e2a8ad9ebae0b6ec_archive",
          "created_at": 1712914020253,
          "updated_at": 1714378330476
        }
      ],
      "idle_timeout_sec": 120,
      "max_runtime_sec": 10800,
      "created_at": 1697265900621,
      "updated_at": 1697265900621
    },
    {
      "id": "92aa375287aa4f2b82be628060c46f43",
      "name": "My Live Stream 2",
      "input": {
        "type": "rtmp",
        "uri": "rtmp://live.cloudinary.com/streams",
        "stream_key": "48224ec768164e11a685a558605f52f5"
      },
      "status": "idle",
      "outputs": [
        {
          "id": "2c5e87b0648c4767acd93ea66d34a3c0",
          "name": "default hls",
          "type": "hls",
          "uri": "https://res.cloudinary.com/demo/video/live/live_stream_92aa375287aa4f2b82be628060c46f43_hls.m3u8",
          "created_at": 1712914020253,
          "updated_at": 1712914020253
        },
        {
          "id": "bb55ab0c159445df93cffbfc1d3a85db",
          "name": "default archive",
          "type": "archive",
          "public_id": "live_stream_92aa375287aa4f2b82be628060c46f43_archive",
          "created_at": 1712914020253,
          "updated_at": 1714378330476
        }
      ],
      "idle_timeout_sec": 120,
      "max_runtime_sec": 10800,
      "created_at": 1697265900621,
      "updated_at": 1697265900621
    }
  ]
}

Create a new live stream

Body
application/json
name
string
ExampleMy first stream
input
required
object
idle_timeout_sec
integer | nullable

Integer numbers.

Example120
max_runtime_sec
integer | nullable

Integer numbers.

Example10800
Responses
  • 200created live stream
    application/json
  • 401authentication error
    application/json
  • 403authorization error
    application/json
POST/live_streams
Shell cURL
curl --request POST \
  --url https://api.cloudinary.com/v2/video/CLOUD_NAME/live_streams \
  --header 'Authorization: Basic' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "My first stream",
  "input": {
    "type": "rtmp"
  },
  "idle_timeout_sec": 120,
  "max_runtime_sec": 10800
}'
{
  "request_id": "6ec0bd7f11c043da975e2a8ad9ebae0b",
  "data": {
    "id": "0bd7f11c043da975e2a8ad9ebae0b6ec",
    "name": "My Live Stream",
    "input": {
      "type": "rtmp",
      "uri": "rtmp://live.cloudinary.com/streams",
      "stream_key": "dh8bxtg97t9cns4bddoa"
    },
    "status": "idle",
    "outputs": [
      {
        "id": "8132d2dc5251432bb57f32ee55a336c1",
        "name": "default hls",
        "type": "hls",
        "uri": "https://res.cloudinary.com/demo/video/live/live_stream_0bd7f11c043da975e2a8ad9ebae0b6ec_hls.m3u8",
        "created_at": 1712914020253,
        "updated_at": 1712914020253
      },
      {
        "id": "29b5cd6f54474bea9cec3834e763e12c",
        "name": "default archive",
        "type": "archive",
        "public_id": "live_stream_0bd7f11c043da975e2a8ad9ebae0b6ec_archive",
        "created_at": 1712914020253,
        "updated_at": 1714378330476
      }
    ],
    "idle_timeout_sec": 120,
    "max_runtime_sec": 10800,
    "created_at": 1697265900621,
    "updated_at": 1697265900621
  }
}

Get a single live stream

Path Parameters
  • liveStreamId
    required
    string

    live stream id

Responses
  • 200a live stream
    application/json
  • 401authentication error
    application/json
  • 403authorization error
    application/json
  • 404live stream not found
    application/json
GET/live_streams/{liveStreamId}
Shell cURL
curl --request GET \
  --url https://api.cloudinary.com/v2/video/CLOUD_NAME/live_streams/__LIVESTREAMID__ \
  --header 'Authorization: Basic'
{
  "request_id": "6ec0bd7f11c043da975e2a8ad9ebae0b",
  "data": {
    "id": "0bd7f11c043da975e2a8ad9ebae0b6ec",
    "name": "My Live Stream",
    "input": {
      "type": "rtmp",
      "uri": "rtmp://live.cloudinary.com/streams",
      "stream_key": "dh8bxtg97t9cns4bddoa"
    },
    "status": "idle",
    "outputs": [
      {
        "id": "8132d2dc5251432bb57f32ee55a336c1",
        "name": "default hls",
        "type": "hls",
        "uri": "https://res.cloudinary.com/demo/video/live/live_stream_0bd7f11c043da975e2a8ad9ebae0b6ec_hls.m3u8",
        "created_at": 1712914020253,
        "updated_at": 1712914020253
      },
      {
        "id": "29b5cd6f54474bea9cec3834e763e12c",
        "name": "default archive",
        "type": "archive",
        "public_id": "live_stream_0bd7f11c043da975e2a8ad9ebae0b6ec_archive",
        "created_at": 1712914020253,
        "updated_at": 1714378330476
      }
    ],
    "idle_timeout_sec": 120,
    "max_runtime_sec": 10800,
    "created_at": 1697265900621,
    "updated_at": 1697265900621
  }
}

Update a live stream

Path Parameters
  • liveStreamId
    required
    string

    live stream id

Body
application/json
name
string | nullable
ExampleMy first stream
idle_timeout_sec
integer | nullable

Integer numbers.

Example120
max_runtime_sec
integer | nullable

Integer numbers.

Example10800
Responses
  • 200a live stream
    application/json
  • 401authentication error
    application/json
  • 403authorization error
    application/json
  • 404live stream not found
    application/json
PATCH/live_streams/{liveStreamId}
Shell cURL
curl --request PATCH \
  --url https://api.cloudinary.com/v2/video/CLOUD_NAME/live_streams/__LIVESTREAMID__ \
  --header 'Authorization: Basic' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "My first stream",
  "idle_timeout_sec": 120,
  "max_runtime_sec": 10800
}'
{
  "request_id": "6ec0bd7f11c043da975e2a8ad9ebae0b",
  "data": {
    "id": "0bd7f11c043da975e2a8ad9ebae0b6ec",
    "name": "My Live Stream",
    "input": {
      "type": "rtmp",
      "uri": "rtmp://live.cloudinary.com/streams",
      "stream_key": "dh8bxtg97t9cns4bddoa"
    },
    "status": "idle",
    "outputs": [
      {
        "id": "8132d2dc5251432bb57f32ee55a336c1",
        "name": "default hls",
        "type": "hls",
        "uri": "https://res.cloudinary.com/demo/video/live/live_stream_0bd7f11c043da975e2a8ad9ebae0b6ec_hls.m3u8",
        "created_at": 1712914020253,
        "updated_at": 1712914020253
      },
      {
        "id": "29b5cd6f54474bea9cec3834e763e12c",
        "name": "default archive",
        "type": "archive",
        "public_id": "live_stream_0bd7f11c043da975e2a8ad9ebae0b6ec_archive",
        "created_at": 1712914020253,
        "updated_at": 1714378330476
      }
    ],
    "idle_timeout_sec": 120,
    "max_runtime_sec": 10800,
    "created_at": 1697265900621,
    "updated_at": 1697265900621
  }
}

Models

Key
Value
Response
.,,uod8B8bou,,. ..,uod8BBBBBBBBBBBBBBBBRPFT?l!i:. ||||||||||||||!?TFPRBBBBBBBBBBBBBBB8m=, |||| '""^^!!||||||||||TFPRBBBVT!:...! |||| '""^^!!|||||?!:.......! |||| ||||.........! |||| ||||.........! |||| ||||.........! |||| ||||.........! |||| ||||.........! |||| ||||.........! ||||, ||||.........` |||||!!-._ ||||.......;. ':!|||||||||!!-._ ||||.....bBBBBWdou,. bBBBBB86foi!|||||||!!-..:|||!..bBBBBBBBBBBBBBBY! ::!?TFPRBBBBBB86foi!||||||||!!bBBBBBBBBBBBBBBY..! :::::::::!?TFPRBBBBBB86ftiaabBBBBBBBBBBBBBBY....! :::;`"^!:;::::::!?TFPRBBBBBBBBBBBBBBBBBBBY......! ;::::::...''^::::::::::!?TFPRBBBBBBBBBBY........! .ob86foi;::::::::::::::::::::::::!?TFPRBY..........` .b888888888886foi;:::::::::::::::::::::::..........` .b888888888888888888886foi;::::::::::::::::...........b888888888888888888888888888886foi;:::::::::......`!Tf998888888888888888888888888888888886foi;:::....` '"^!|Tf9988888888888888888888888888888888!::..` '"^!|Tf998888888888888888888888889!! '` '"^!|Tf9988888888888888888!!` iBBbo. '"^!|Tf998888888889!` WBBBBbo. '"^!|Tf9989!` YBBBP^' '"^!` `