Create an SRT Flow
Create a stream flow: a standing SRT endpoint you can use as the source or a target of your streams.
Overview
A flow is a standing SRT endpoint hosted by Camb.ai, independent of any stream. Create one once, and use its URLs as the source or a target of any number of streams, with no need to expose your own SRT infrastructure. Flows come in two modes:Listener
push_urls (primary/backup) and a play_url anyone with the key can
pull from.Caller
primary_url) and re-serves it
on a stable play_url, with optional failover to a backup_url.Using a flow with streams
The returnedplay_url is a normal SRT URL:
- As a stream source - set it as
source_stream.urlwhen creating a stream. Your encoder pushes to the flow’spush_urls; the stream ingests from the flow. - As a stream target - set it as a
target_streams[].urlwith"type": 1to deliver your processed output to the flow, then distribute the flow’splay_urlto viewers or downstream systems.
Example: listener flow for a stadium encoder
Validation rules
labelmust be unique within your team.callermode requiresprimary_url;listenermode must not set URLs.backup_urlrequiresfailover: true(and is required for caller flows with failover).
Errors
403- Your subscription does not include streaming.422- Validation error (see the rules above).
Related endpoints
Authorizations
The x-api-key is a custom header required for authenticating requests to our API. Include this header in your request with the appropriate API key value to securely access our endpoints. You can find your API key(s) in the 'API' section of our studio website.
Body
Configuration for a new stream flow - a standing SRT endpoint you can use as the source or a target of any stream.
Human-readable name for the flow. Must be unique within your team.
caller: Camb.ai connects out to your SRT endpoint (primary_url) and re-serves it. listener: Camb.ai hosts an SRT endpoint that your encoder pushes to.
caller, listener Enable a second (backup) leg. Caller flows then require backup_url; listener flows get a backup push URL.
SRT URL of your upstream (caller mode only; required there, forbidden for listeners). To dial an encrypted upstream, append its passphrase as a query parameter: srt://host:port?passphrase=....
SRT URL of the backup upstream. Caller mode with failover enabled only.
Optional SRT encryption passphrase for the flow's own endpoint (10-79 characters). When set, it is embedded in the returned play/push URLs and required to connect.
10 - 79Response
The created flow, including its play and push URLs.
Flow identifier.
caller: Camb.ai connects out to your SRT endpoint (primary_url) and re-serves it. listener: Camb.ai hosts an SRT endpoint that your encoder pushes to.
caller, listener Whether the flow's relay is currently online.
Access key embedded in the flow's URLs.
SRT URL the flow serves. Use it as source_stream.url or as a target_streams[].url, or play it directly.
SRT URLs to push into (listener mode). Empty for caller flows.
The flow's SRT encryption passphrase, when one is set.