Skip to main content
POST
Create Flow

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

Camb.ai hosts an SRT endpoint your encoder pushes to. You get one or two push_urls (primary/backup) and a play_url anyone with the key can pull from.

Caller

Camb.ai pulls from your SRT endpoint (primary_url) and re-serves it on a stable play_url, with optional failover to a backup_url.

Using a flow with streams

The returned play_url is a normal SRT URL:
  • As a stream source - set it as source_stream.url when creating a stream. Your encoder pushes to the flow’s push_urls; the stream ingests from the flow.
  • As a stream target - set it as a target_streams[].url with "type": 1 to deliver your processed output to the flow, then distribute the flow’s play_url to viewers or downstream systems.
Set a passphrase (10–79 characters) to encrypt the flow’s endpoint. It is embedded in the returned URLs and required to connect. To pull from an upstream that is itself encrypted (caller mode), append its passphrase to primary_url as a query parameter: srt://host:port?passphrase=....

Egress: push the flow to your own SRT listeners

In either mode a flow can also push its feed to SRT listeners you run, for example a CDN or playout ingest. Set egress_primary_url, and optionally egress_backup_url, to srt://host:port URLs. Camb.ai dials each one as an SRT caller, sends it the full feed, and reconnects if it drops. The two destinations run in parallel. The flow keeps its play_url. Your listener’s SRT settings go in the URL as query parameters, for example srt://cdn.example.com:6000?passphrase=...&streamid=...&latency=200. passphrase (10–79 bytes), streamid, latency (milliseconds; 200 when omitted) and the other standard SRT caller options are supported, each at most once. The flow’s own passphrase does not apply to these URLs.
Request
You can change or remove the destinations later with Update an SRT Flow.

Regions

A flow’s SRT endpoint is hosted in one region. Pick one from List Flow Regions and pass it as region; without it the flow is hosted in us-central1. Choose the region closest to your encoder or viewers. The region is fixed for the life of the flow: its play_url and push_urls carry that region’s address, which you configure in encoders and firewall allowlists. To move a flow, create a new one in the other region and repoint your encoders and streams at its URLs.

Example: listener flow for a stadium encoder

The response contains everything needed to use the flow:

Validation rules

  • label must be unique within your team.
  • caller mode requires primary_url; listener mode must not set URLs.
  • backup_url requires failover: true (and is required for caller flows with failover).
  • egress_primary_url and egress_backup_url must be srt://host:port URLs with no path, no credentials before the host, and only supported SRT query parameters. egress_backup_url requires egress_primary_url.
  • Egress is not yet available in every region. If the flow’s region does not support it, the request returns 422.
  • region must be one of List Flow Regions; any other value is rejected with 422, naming the regions that are available.

Errors

  • 403 - Your subscription does not include streaming.
  • 422 - Validation error (see the rules above).

Authorizations

x-api-key
string
header
required

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

application/json

Configuration for a new stream flow - a standing SRT endpoint you can use as the source or a target of any stream.

label
string
required

Human-readable name for the flow. Must be unique within your team.

mode
enum<string>
required

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.

Available options:
caller,
listener
failover
boolean
default:false

Enable a second (backup) leg. Caller flows then require backup_url; listener flows get a backup push URL.

primary_url
string | null

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=....

backup_url
string | null

SRT URL of the backup upstream. Caller mode with failover enabled only.

passphrase
string | null

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.

Required string length: 10 - 79
region
string | null

Region to host the flow's SRT endpoint in, one of GET /flows/regions. Defaults to us-central1. Fixed for the life of the flow, because its URLs carry that region's address: to move a flow, create a new one.

egress_primary_url
string | null

Optional SRT listener of yours that Camb.ai pushes the flow to, in either mode, alongside the flow's play_url: srt://host:port. Camb.ai dials it as an SRT caller and reconnects if it drops. Your listener's own SRT settings go in the URL as query parameters, e.g. srt://cdn.example.com:6000?passphrase=...&streamid=...&latency=200. Supported: passphrase (10-79 bytes), streamid (up to 512 bytes), latency/rcvlatency/peerlatency (integer milliseconds; 200 when omitted) and the other standard SRT caller options (congestion, enforcedencryption, fc, inputbw, iptos, ipttl, kmpreannounce, kmrefreshrate, linger, lossmaxttl, maxbw, messageapi, minversion, mss, nakreport, oheadbw, packetfilter, payloadsize, pbkeylen, peeridletimeo, rcvbuf, sndbuf, snddropdelay, tlpktdrop, tsbpdmode), each at most once. Any other parameter, a path, or credentials in the host part are rejected with 422. The flow's own passphrase does not apply here.

egress_backup_url
string | null

Optional second SRT listener, pushed in parallel with egress_primary_url (which it requires). Same format and parameters.

Response

The created flow, including its play and push URLs.

id
integer

Flow identifier.

label
string
mode
enum<string>

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.

Available options:
caller,
listener
failover
boolean
active
boolean

Whether the flow's relay is currently online.

team_id
integer
region
string | null

Region hosting the flow's SRT endpoint, as chosen at create. The flow's URLs carry this region's address.

key
string

Access key embedded in the flow's URLs.

play_url
string

SRT URL the flow serves. Use it as source_stream.url or as a target_streams[].url, or play it directly.

push_urls
PushUrl · object[]

SRT URLs to push into (listener mode). Empty for caller flows.

passphrase
string | null

The flow's SRT encryption passphrase, when one is set.

egress_primary_url
string | null

The primary egress destination as you set it, including any query parameters, or null.

egress_backup_url
string | null

The backup egress destination as you set it, or null.

Last modified on October 28, 2026