A valid request URL is required to generate request examples{
"stream_id": "<string>",
"webrtc": {
"type": "answer",
"sdp": "<string>"
},
"lease": {},
"turn_servers": [
{}
],
"livekit": {}
}{
"error": "<string>",
"request_id": "<string>",
"details": null
}{
"error": "<string>",
"request_id": "<string>",
"details": null
}{
"error": "<string>",
"request_id": "<string>",
"details": null
}{
"error": "<string>",
"request_id": "<string>",
"details": null
}{
"error": "<string>",
"request_id": "<string>",
"details": null
}{
"error": "<string>",
"request_id": "<string>",
"details": null
}Create stream
Create a new video inference stream. Returns connection details for the chosen transport.
Workflow: Create stream → connect video source → receive results on WebSocket → send keepalives → close when done.
Transport options:
- Native (default, recommended): Omit
source. Response includeslivekit.urlandlivekit.tokenfor publishing video. - WebRTC: Set
source.type: 'webrtc'with an SDP offer. Response includeswebrtcanswer andturn_servers. - LiveKit: Set
source.type: 'livekit'with your room URL and token.
Processing modes:
- Clip mode: Send
target_fps,clip_length_seconds,delay_secondsfor temporal analysis (motion, actions). - Frame mode: Send
interval_secondsfor static analysis (OCR, object detection).
Limits: 5 concurrent streams per API key. Requires credits.
A valid request URL is required to generate request examples{
"stream_id": "<string>",
"webrtc": {
"type": "answer",
"sdp": "<string>"
},
"lease": {},
"turn_servers": [
{}
],
"livekit": {}
}{
"error": "<string>",
"request_id": "<string>",
"details": null
}{
"error": "<string>",
"request_id": "<string>",
"details": null
}{
"error": "<string>",
"request_id": "<string>",
"details": null
}{
"error": "<string>",
"request_id": "<string>",
"details": null
}{
"error": "<string>",
"request_id": "<string>",
"details": null
}{
"error": "<string>",
"request_id": "<string>",
"details": null
}Authorizations
Provide your API key in the Authorization header as 'Bearer <api_key>'
Body
Create a new video inference stream.
Minimal example (frame mode, native transport):
{ "processing": { "interval_seconds": 2.0 }, "inference": { "prompt": "Describe what you see", "model": "Qwen/Qwen3.5-9B" } }
Clip mode processing config. Samples frames into short video clips for temporal analysis (motion, actions, events).
Provide target_fps directly, or the legacy fps + sampling_ratio pair (not both).
- ClipProcessingConfig
- FrameProcessingConfig
Show child attributes
Show child attributes
What the AI model should do with the video.
Show child attributes
Show child attributes
Legacy WebRTC source. Send an SDP offer and receive an SDP answer in the response.
- WebRTCSourceConfig
- LiveKitSourceConfig
- NativeSourceConfig
Show child attributes
Show child attributes
(Legacy) WebRTC offer. Use source instead.
Show child attributes
Show child attributes
Processing mode. Auto-detected from processing config if omitted. 'clip' for video clips, 'frame' for single images.
clip, frame Optional client metadata for request tracking.
Show child attributes
Show child attributes
Response
Stream created. Use stream_id for all subsequent operations.
Returned after successfully creating a stream. Contains connection details specific to the chosen transport.
Unique stream identifier. Use this for keepalive, close, prompt update, and WebSocket connection.
SDP answer for WebRTC sources. Null for native/livekit sources.
Show child attributes
Show child attributes
Stream lease info including ttl_seconds. Send keepalives before TTL expires.
TURN server credentials for WebRTC sources. Null for native/livekit sources.
Show child attributes
Show child attributes
LiveKit connection details (url + token) for native sources. Connect to this room to publish video.
Show child attributes
Show child attributes