---
title: "Create Stream"
method: POST
path: "/stream"
tags: ["Apis", "Streaming"]
---

# Create Stream

`POST /stream`

Create a live stream: ingest a source, process it with one or more AI pipelines, and publish the results to one or more targets.

## Request body

- CreateStreamRequestPayload — Configuration for a live stream.
  - `name` string, nullable — Display name for the stream. Auto-generated if omitted.
  - `description` string, nullable — Free-form description of the stream.
  - `initial_delay` integer — Seconds of setup lead time before processing starts. Larger values give the pipeline more headroom to warm up; smaller values start output sooner.
  - `voices` integer[] — Optional voice IDs from [`GET /list-voices`](/api-reference/endpoint/list-voices) to use for dubbed speech. If provided, these fixed voices are used; if omitted or empty, voices are cloned from the speakers in the source audio. When providing voices, include different genders and tones so each speaker can be matched to the most suitable voice.
  - `dictionaries` integer[] — Optional dictionary IDs for custom terminology (up to 5), from [`GET /dictionaries`](/api-reference/endpoint/list-dictionaries).
  - `start_time` string, date-time, nullable — Optional scheduled start in ISO 8601 with a UTC offset, e.g. `2026-08-01T19:30:00Z`. If omitted, the stream starts as soon as it is created. Cannot be in the past; at most 7 days in the future.
  - `end_time` string, date-time, required — When the stream stops, in ISO 8601 with a UTC offset. Required; must be at least 15 minutes after the start. To end a stream earlier, delete it; to change the end, patch it.
  - `timezone` string, required — IANA time zone name (e.g. `UTC`, `Europe/London`) that `start_time`/`end_time` are expressed in. Its offset must match the timestamps.
  - `audio_selections` AudioSelection[], required — Named audio tracks of the source that pipelines process.
    - `id` string, required — Your identifier for this selection, referenced by `pipelines[].audio_selection`.
    - `source` string, required — Audio track selector. Accepts FFmpeg-style selectors (`a:0`, `1`, `eng`, `#0x1fe`, `i:301`, optionally with a channel suffix like `:ch0,1`) or magic selectors (`$first_audio`, `$second_audio`, `$last_audio`). Use [Probe a Source Stream](/api-reference/endpoint/streaming/probe-stream) to discover tracks.
    - `source_language` integer, required — Numeric language ID. Use [`GET /source-languages`](/api-reference/endpoint/get-source-languages) for valid `source_language` values and [`GET /target-languages`](/api-reference/endpoint/get-target-languages) for valid output `language` values. For example, `1` is English (US) and `54` is Spanish (Spain).
    - `background` string, nullable — Optional selector (same syntax as `source`) for a clean background/music track. When set, it is used as the background bed for mixing instead of demixing the source.
  - `processing_profiles` ProcessingProfile[], required — Reusable AI processing configurations referenced by pipelines.
    - `id` string, required — Your identifier for this profile, referenced by `pipelines[].profile`.
    - `demixing` 'none' | 'best_model' | 'fast_model' — Selects the model tier for a processing step: `none` disables the step, `best_model` prioritises quality, `fast_model` prioritises latency.
    - `transcribing` 'none' | 'best_model' | 'fast_model' — Selects the model tier for a processing step: `none` disables the step, `best_model` prioritises quality, `fast_model` prioritises latency.
    - `translating` 'none' | 'best_model' | 'fast_model' — Selects the model tier for a processing step: `none` disables the step, `best_model` prioritises quality, `fast_model` prioritises latency.
    - `revoicing` 'none' | 'best_model' | 'fast_model' — Selects the model tier for a processing step: `none` disables the step, `best_model` prioritises quality, `fast_model` prioritises latency.
    - `mixing` OverdubConfig — Relative gains used when mixing dubbed audio over the original. `original_audio_gain` + `background_audio_gain` must not exceed 1.0.
      - `original_audio_gain` number, nullable — Volume of the original speaker while dubbed audio plays (0.0-1.0).
      - `background_audio_gain` number, nullable — Volume of background music/ambience during dubbed segments (0.0-1.0).
      - `fallback_audio_gain` number, nullable — Volume of the original audio while nothing is being dubbed (0.0-1.0).
      - `fade_time` number — Cross-fade duration in seconds when switching between original and dubbed audio (0-5).
    - `scte35_dubbing_control` Scte35DubbingControl — Automatically toggles dubbing on SCTE-35 ad-break markers. Each field is the dubbing state to apply on that marker (`enabled` or `disabled`); set a field to `null` to ignore that marker. Omit the whole object to ignore SCTE-35 entirely.
      - `on_out_of_network_start` string, nullable — Dubbing state applied when an ad break starts.
      - `on_out_of_network_end` string, nullable — Dubbing state applied when an ad break ends.
  - `encoding_profiles` EncodingProfile[], nullable — Optional reusable encoding configurations referenced by target inputs.
    - `id` string, required — Your identifier for this profile.
    - `audio_codec` string, nullable — Audio codec, e.g. `aac`.
    - `audio_bitrate` string, nullable — Audio bitrate, e.g. `192k`.
    - `audio_channel_layout` string, nullable — Channel layout, e.g. `stereo`.
    - `video_codec` string, nullable — Video codec, e.g. `h264`.
    - `video_bitrate` string, nullable — Video bitrate, e.g. `5M`.
  - `pipelines` ProcessingPipeline[], required — Processing pipelines connecting audio selections to profiles and outputs.
    - `id` string, required — Your identifier for this pipeline.
    - `profile` string, required — `id` of an entry in `processing_profiles`.
    - `audio_selection` string, required — `id` of an entry in `audio_selections`.
    - `outputs` PipelineOutput[], required — Assets this pipeline produces. Output `id`s must be unique across all pipelines.
      - `id` string, required — Your identifier for the produced asset, referenced by `target_streams[].inputs[].asset_id`.
      - `kind` 'audio' | 'subtitle' | 'video' | 'data', required — Type of asset a pipeline output produces.
      - `language` integer — Numeric language ID. Use [`GET /source-languages`](/api-reference/endpoint/get-source-languages) for valid `source_language` values and [`GET /target-languages`](/api-reference/endpoint/get-target-languages) for valid output `language` values. For example, `1` is English (US) and `54` is Spanish (Spain).
  - `source_stream` SourceStream, required — The live source to ingest.
    - `id` string, required — Your identifier for the source stream, e.g. `main-feed`.
    - `url` string, required — URL of the live source to ingest, e.g. `srt://ingest.example.com:9000`.
    - `category` 1 | 2 | 3 | 4 | 5 | 6 — Content category of the source stream, used to tune processing. | Value | Category | |---|---| | `1` | News and information | | `2` | Sports and entertainment | | `3` | Business and professional | | `4` | Education and training | | `5` | Events and ceremonies | | `6` | Government and official |
    - `passphrase` string, nullable — SRT encryption passphrase for the source, if the source is encrypted (10-79 characters).
    - `streamid` string, nullable — SRT `streamid` to send when connecting to the source, if it requires one. Not the Camb.ai stream ID.
    - `latency` integer, nullable — SRT receive latency in milliseconds (20-8000). Higher values tolerate more network jitter at the cost of delay. Recommended: `2000` for typical internet links.
  - `target_streams` TargetStream[], required — Destinations for the processed output. At least one is required.
    - `id` string, required — Your identifier for the target, e.g. `youtube-es`.
    - `url` string, nullable — Destination URL to push to. Omit for SRT listener (`6`) and HLS recording (`3`) targets - their URLs are generated and returned in the create response and stream status.
    - `type` 1 | 2 | 3 | 4 | 5 | 6, required — Protocol/type of a target stream. | Value | Type | Description | |---|---|---| | `1` | SRT caller | Push output to your SRT endpoint (Camb.ai connects out to `url`). | | `2` | RTMP | Push output to an RTMP ingest `url`. | | `3` | HLS recording | Camb.ai-hosted HLS output; `url` and `inputs` are auto-assigned, and the playback URL is returned. | | `4` | YouTube RTMP | Push directly to a YouTube RTMP ingest URL. | | `5` | YouTube HLS | Push directly to a YouTube HLS ingest URL. | | `6` | SRT listener | Camb.ai hosts an SRT endpoint that you (or your player) pull from; `url` is auto-assigned and returned. |
    - `passthrough_policy` 'all' | 'none' — `all` forwards every source track that is not replaced by a pipeline output; `none` forwards nothing unless explicitly selected.
    - `inputs` TargetStreamInput[] — Tracks to include in this output. May be omitted when `passthrough_policy` is `all` or for auto-hosted target types.
      - `asset_id` string, nullable — `id` of a pipeline output to include.
      - `passthrough_selector` string, nullable — Selector (e.g. `v:0`, `a:eng`) for a source track to forward unprocessed.
      - `pid_policy` 'preserve' | 'auto' | 'explicit' — How MPEG-TS packet identifiers (PIDs) are assigned on the output: `preserve` keeps the source PID (passthrough inputs only), `auto` assigns one automatically, `explicit` uses the provided `pid`.
      - `pid` integer, nullable — Explicit MPEG-TS PID (32-8190). Required when `pid_policy` is `explicit`, forbidden otherwise.
      - `encoding_policy` 'preserve' | 'auto' | 'explicit' — How this input is encoded on the output: `preserve` copies the source codec where possible, `auto` picks sensible defaults, `explicit` applies the referenced `encoding_profile`.
      - `encoding_profile` string, nullable — `id` of an entry in `encoding_profiles`. Required when `encoding_policy` is `explicit`, forbidden otherwise.
    - `passphrase` string, nullable — SRT encryption passphrase to use when pushing to the destination.
    - `streamid` string, nullable — SRT `streamid` to send when connecting to the destination.
    - `constant_bitrate` union — MPEG-TS constant-bitrate control: `false`/omitted for variable bitrate, `true` to derive the mux rate from the source bandwidth, or an explicit rate string such as `"500k"` or `"5M"`.
      - boolean
      - string
    - `latency` integer, nullable — SRT send latency in milliseconds (20-8000). Higher values tolerate more network jitter at the cost of delay. Recommended: `2000` for typical internet links.

## Response `200`

Successful Response

- CreateStreamOut
  - `stream_id` integer — Identifier of the created stream, used for all lifecycle operations.
  - `stream_url_for_languages` StreamURLForLanguages[] — Playback URLs for the outputs, grouped by language.
    - `languages` Languages[] — Language IDs available on this output URL.
    - `url` string — URL of this output for the listed languages. For Camb.ai-hosted outputs (SRT listener, HLS recording) this is a playback URL you can distribute; for push outputs it echoes your destination URL.
  - `task_id` string — Identifier of the setup task; useful when contacting support.

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/camb/apis/fastapi.md) · [All operations](https://skmtc.net/camb/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/camb/fastapi/versions/40ebeee64850/schema)
