Skip to main content
POST
/
rtstream
Create RTStream
curl --request POST \
  --url https://api.videodb.io/rtstream/ \
  --header 'Content-Type: application/json' \
  --header 'x-access-token: <api-key>' \
  --data '
{
  "url": "rtsp://example.com:8554/stream",
  "name": "My Stream",
  "collection_id": "default",
  "sample_rate": 30,
  "media_types": [
    "video",
    "audio"
  ],
  "store": false,
  "enable_transcript": true,
  "ws_connection_id": "conn-123"
}
'
{
  "success": true,
  "data": {
    "id": "rts-12345",
    "name": "My Stream",
    "status": "connected",
    "sample_rate": 30,
    "media_types": [
      "video",
      "audio"
    ],
    "collection_id": "default",
    "store": false,
    "created_at": "2023-11-07T05:31:56Z"
  }
}
Create a new real-time stream by connecting to an RTSP or YouTube stream URL. The stream begins processing immediately.
  • url is required and must be a valid RTSP or YouTube stream URL
  • sample_rate controls the frame sampling rate (default: 30)
  • media_types specifies which media to capture: video, audio, or both
  • Set store to true to persist stream recordings
  • Enable enable_transcript for automatic speech transcription

Authorizations

x-access-token
string
header
required

API key for authentication (sk-xxx format)

Body

application/json
url
string
required

RTSP or YouTube stream URL

Example:

"rtsp://example.com:8554/stream"

name
string
Example:

"My Stream"

collection_id
string
default:default
Example:

"default"

sample_rate
integer
default:30
Example:

30

media_types
enum<string>[]
Available options:
video,
audio
Example:
["video", "audio"]
store
boolean
default:false
Example:

false

enable_transcript
boolean
default:true
Example:

true

ws_connection_id
string
Example:

"conn-123"

Response

RTStream created

success
boolean
Example:

true

data
object