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

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

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

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

Last modified on July 24, 2026