media server logo
Toggle documentation navigation
Callaba home

Streams

Use Streams to create named publisher and receiver connections for SRT or RTMP endpoints. Each record gives applications a stable connection identity and reusable media settings.

What it doesCreate a named media connection

Choose this whenEach publisher or receiver needs its own identity on an existing SRT or RTMP server.

Use another module whenUse SRT Servers or RTMP Servers to create the ingest endpoint itself.

1Choose publisher or receiver2Set the endpoint3Use the connection
POST /api/streams/create
10 endpoints

Before you start

All methods require a valid x-access-token. Create the related SRT or RTMP server first and keep the server and stream identifiers consistent.

What you can do

  • create, update, getAll, getCount, and getById manage connection records.
  • start and stop control supported stream lifecycle actions.
  • getStreamInfo reads connection information.
  • setStreamInfo applies supported stream information.
  • remove deletes a stream record.

Example workflow

  1. Create a publisher record for the intended SRT or RTMP server.
  2. Assign its role, stream_id, host details, and required audio settings.
  3. Give the generated connection details to the publisher.
  4. Use getStreamInfo during setup and troubleshooting.

Common use cases

  • Issue a dedicated connection to each remote camera team.
  • Separate publisher and receiver identities on a shared ingest server.
  • Store audio-channel settings for repeatable contribution feeds.

Limits and troubleshooting

Duplicate or mismatched stream identifiers can prevent the expected connection. A stream record depends on its parent server and cannot make an unreachable publisher healthy. Do not expose credentials or unrestricted connection details outside the intended participant.

Next steps

Connect the publisher or receiver, then inspect the parent SRT or RTMP server's runtime statistics.

REST solution recipe

Register and operate a reusable stream source

Create the stream identity and connection settings once, start it when required, and read its current stream information for downstream automation.

  1. Create the streamSave the reviewed source identity and connection contract.POST /api/streams/create
  2. Start the sourceStart it before attaching downstream modules.POST /api/streams/start
  3. Read stream informationUse current stream metadata in your control workflow.POST /api/streams/getStreamInfo

A successful create response confirms configuration, not media health. Start the resource, then verify its runtime statistics before sending production traffic.

POST
/api/streams/create
API token required

Create a managed stream identity above an SRT or RTMP transport resource. The stream stores its name, publisher or receiver role, stream id, optional host, linked entity, and optional audio metadata.

A vMix Script example is available when an operator workflow must provision the stream.

Request examples

Choose the preset for an SRT publisher, SRT receiver, RTMP publisher, or stream with a saved audio layout.

Common use cases

  • Name multiple publisher streams that share one SRT listener.
  • Keep a stable receiver identity for routed or pulled traffic.
  • Store channel names, layouts, or track meaning with the stream.
SRT publisher stream

Use this when one SRT listener hosts a named publisher stream that operators should treat as a first-class object.

SRT publisher stream
Copy code
curl --request POST \
--url http://localhost/api/streams/create \
--header 'x-access-token: <your_api_token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Main stage publisher",
"role_name": "publisher",
"stream_id": "publisher/main-stage/srt-main",
"entity_id": "680400000000000000000001",
"module_name": "MODULE_SRT_SERVERS",
"active": true
}'
SRT receiver stream

Use this when a receiver-side or returned feed should keep its own stream identity and optional host binding.

SRT receiver stream
Copy code
curl --request POST \
--url http://localhost/api/streams/create \
--header 'x-access-token: <your_api_token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Remote return receiver",
"role_name": "receiver",
"stream_id": "receiver/main-stage/return-feed",
"host": "198.51.100.24",
"entity_id": "680400000000000000000001",
"module_name": "MODULE_SRT_SERVERS",
"active": true
}'
RTMP publisher stream

Use this when the backing transport entity is an RTMP server rather than an SRT listener.

RTMP publisher stream
Copy code
curl --request POST \
--url http://localhost/api/streams/create \
--header 'x-access-token: <your_api_token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "RTMP primary publish",
"role_name": "publisher",
"stream_id": "studio/live/program",
"entity_id": "680500000000000000000001",
"module_name": "MODULE_RTMP_SERVERS",
"active": true
}'
Stream with saved audio layout

Use this when channel layout and naming should be stored with the stream row after inspection.

Stream with saved audio layout
Copy code
curl --request POST \
--url http://localhost/api/streams/create \
--header 'x-access-token: <your_api_token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Commentary audio stream",
"role_name": "publisher",
"stream_id": "publisher/commentary/audio-main",
"entity_id": "680400000000000000000001",
"module_name": "MODULE_SRT_SERVERS",
"audio_settings": {
"streams": [
{
"id": 0,
"name": "Commentary",
"channel_layout": "mono",
"channels": [
{
"id": "FC",
"name": "Commentary"
}
]
}
]
},
"active": true
}'
Request body parameters
Identity
name
string
Copy direct link

Dashboard label: Name.

Human-facing name of the saved stream row.

role_name
string
Copy direct link

Dashboard label: Role.

Typical product values include publisher, receiver, pusher, and puller.

stream_id
string
Copy direct link

Stable stream identifier stored above the backing transport entity.

host
string
Copy direct link

Optional host binding used when the stream identity should stay tied to a concrete remote peer.

Transport link
entity_id
string
Copy direct link

Identifier of the backing transport-side entity, for example an SRT server or RTMP server.

module_name
string
Copy direct link

Module family behind the stream row. In practice this is most often MODULE_SRT_SERVERS or MODULE_RTMP_SERVERS.

Metadata
audio_settings
object
Copy direct link

Optional saved audio layout with named tracks and channels.

Runtime
active
boolean
Copy direct link

Dashboard label: Enable once created.

Controls whether the stream row should be active right after provisioning.

Create stream
Copy code
curl --request POST \
--url http://localhost/api/streams/create \
--header 'x-access-token: <your_api_token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Main stage publisher",
"role_name": "publisher",
"stream_id": "publisher/main-stage/srt-main",
"entity_id": "680400000000000000000001",
"module_name": "MODULE_SRT_SERVERS",
"active": true
}'
Response
Identity
_id / id / name / role_name / stream_id / host
mixed
Copy direct link

Identifiers and the saved stream identity fields.

Transport link
entity_id / entityModel / module_name
mixed
Copy direct link

Reference back to the transport object that owns or serves the stream.

Metadata
stream_meta_data / audio_settings
mixed
Copy direct link

Saved inspection output, codec notes, and optional channel mapping metadata.

Runtime
active / created / modified
mixed
Copy direct link

Runtime flag and backend-managed timestamps.

Operation result
success
boolean
Copy direct link

Successful stream model responses expose success: true as a virtual field.

Response: Create stream
JSON
Copy code
{
"_id": "680600000000000000000001",
"id": "680600000000000000000001",
"name": "Main stage publisher",
"role_name": "publisher",
"host": "",
"stream_id": "publisher/main-stage/srt-main",
"entity_id": "680400000000000000000001",
"entityModel": "ServerModel",
"module_name": "MODULE_SRT_SERVERS",
"stream_meta_data": {
"codec_name": "h264",
"fps": "30/1"
},
"audio_settings": {
"streams": [
{
"id": 0,
"name": "Track-0",
"channel_layout": "stereo",
"channels": [
{
"id": "FL",
"name": "Left"
},
{
"id": "FR",
"name": "Right"
}
]
}
]
},
"created": "2026-03-24T08:45:00.000Z",
"modified": "2026-03-24T08:45:00.000Z",
"active": true,
"success": true
}
POST
/api/streams/getCount
API token required
POST
/api/streams/getAll
API token required
POST
/api/streams/getById
API token required
POST
/api/streams/update
API token required
POST
/api/streams/setStreamInfo
API token required
DELETE
/api/streams/remove
API token required
POST
/api/streams/start
API token required
POST
/api/streams/stop
API token required
POST
/api/streams/getStreamInfo
API token required