> ## Documentation Index
> Fetch the complete documentation index at: https://docs.camb.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a Stream

> Create a live stream that ingests a source feed, processes it with AI in real time, and publishes dubbed, translated, or transcribed outputs.

## Overview

This endpoint is the entry point of the streaming lifecycle. It takes a source
feed, one or more processing pipelines, and one or more output destinations,
and returns a `stream_id` you use for every other lifecycle operation.

<Info>
  **Supported source protocols:** SRT is supported today. RTMP and HLS ingest
  are coming soon.
</Info>

## How a stream fits together

The request body is built from four blocks that reference each other by `id`:

<Steps>
  <Step title="Source">
    `source_stream` - the live feed to ingest, e.g. `srt://ingest.example.com:9000`.
    You can also use the play URL of a [stream flow](create-flow) here.
  </Step>

  <Step title="Audio selections">
    `audio_selections` - name the audio track(s) of the source you want to
    process and declare their spoken language. Use
    [Probe a Source Stream](probe-stream) to discover tracks, or start with
    `$first_audio`.
  </Step>

  <Step title="Profiles and pipelines">
    `processing_profiles` define *how* audio is processed (demixing,
    transcription, translation, revoicing, each `none`, `best_model`, or
    `fast_model`). `pipelines` connect an audio selection to a profile and
    declare the output assets to produce, each with a language.
  </Step>

  <Step title="Targets">
    `target_streams` - where the processed output goes. At least one is
    required. Push to your own endpoint (SRT/RTMP), or let Camb.ai host the
    output for you (SRT listener or HLS recording).
  </Step>
</Steps>

## Before you start

Collect the IDs the payload references:

* **Language IDs** - [`GET /source-languages`](/api-reference/endpoint/get-source-languages) and
  [`GET /target-languages`](/api-reference/endpoint/get-target-languages). Languages are numeric IDs;
  for example `1` is English (US) and `54` is Spanish (Spain).

<Tip>
  The system handles multilingual inputs. If the source audio mixes several
  languages, set `source_language` to the main one spoken; the others are
  handled automatically.
</Tip>

* **Voice IDs** (optional) - [`GET /list-voices`](/api-reference/endpoint/list-voices). If you pass
  voice IDs, dubbed speech uses those fixed voices. If you leave them out,
  voices are cloned from the speakers in the source audio.
* **Dictionary IDs** (optional) - [`GET /dictionaries`](/api-reference/endpoint/list-dictionaries) for
  custom terminology, up to 5.

<Tip>
  When passing fixed voice IDs, include voices of different genders and tones.
  The system matches each speaker in the source audio to the most suitable
  voice from your list, so a varied list produces better matches.
</Tip>

<Note>
  A pipeline that produces an `audio` output must also declare a `subtitle`
  output in the same pipeline; the transcript drives the dubbing. You do not
  have to route the subtitle asset to a target.
</Note>

## Example: dub a football match into Spanish

The example ingests the SRT feed of a football match, dubs the English
commentary (`1`) into Spanish (`54`), and pushes the dubbed program (original
video plus Spanish commentary) to an SRT destination of your own.

<Tip>
  Fastest way to test: copy this payload, adjust it to your setup, and paste
  it into the **Try it** body - the form fields fill in automatically from the
  pasted JSON. Then press Send.
</Tip>

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://client.camb.ai/apis/stream" \
    -H "x-api-key: YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Saturday Match Live Dub",
      "description": "Football match commentary dubbed from English into Spanish",
      "end_time": "2026-08-01T21:45:00Z",
      "timezone": "UTC",
      "voices": [12345],
      "source_stream": {
        "id": "match-feed",
        "url": "srt://ingest.example.com:9000",
        "latency": 2000,
        "category": 2
      },
      "audio_selections": [
        {
          "id": "commentary",
          "source": "$first_audio",
          "source_language": 1
        }
      ],
      "processing_profiles": [
        {
          "id": "dubbing",
          "demixing": "best_model",
          "transcribing": "best_model",
          "translating": "best_model",
          "revoicing": "best_model"
        }
      ],
      "pipelines": [
        {
          "id": "spanish",
          "profile": "dubbing",
          "audio_selection": "commentary",
          "outputs": [
            { "id": "es-audio", "kind": "audio", "language": 54 },
            { "id": "es-subtitle", "kind": "subtitle", "language": 54 }
          ]
        }
      ],
      "target_streams": [
        {
          "id": "spanish-out",
          "url": "srt://delivery.example.com:9100",
          "type": 1,
          "inputs": [
            { "asset_id": "es-audio" },
            { "passthrough_selector": "v:0" }
          ]
        }
      ]
    }'
  ```

  ```python Python theme={null}
  import requests

  payload = {
      "name": "Saturday Match Live Dub",
      "description": "Football match commentary dubbed from English into Spanish",
      "end_time": "2026-08-01T21:45:00Z",  # streams always need an end time
      "timezone": "UTC",
      "voices": [12345],  # from GET /list-voices
      "source_stream": {
          "id": "match-feed",
          "url": "srt://ingest.example.com:9000",
          "latency": 2000,  # recommended SRT latency (ms)
          "category": 2,  # sports and entertainment
      },
      "audio_selections": [
          {
              "id": "commentary",
              "source": "$first_audio",
              "source_language": 1,  # English (US)
          }
      ],
      "processing_profiles": [
          {
              "id": "dubbing",
              "demixing": "best_model",
              "transcribing": "best_model",
              "translating": "best_model",
              "revoicing": "best_model",
          }
      ],
      "pipelines": [
          {
              "id": "spanish",
              "profile": "dubbing",
              "audio_selection": "commentary",
              "outputs": [
                  {"id": "es-audio", "kind": "audio", "language": 54},  # Spanish (Spain)
                  {"id": "es-subtitle", "kind": "subtitle", "language": 54},
              ],
          }
      ],
      "target_streams": [
          {
              "id": "spanish-out",
              "url": "srt://delivery.example.com:9100",
              "type": 1,  # SRT caller: Camb.ai pushes to your endpoint
              "inputs": [
                  {"asset_id": "es-audio"},
                  {"passthrough_selector": "v:0"},  # forward the original video
              ],
          }
      ],
  }

  response = requests.post(
      "https://client.camb.ai/apis/stream",
      headers={"x-api-key": "YOUR_API_KEY"},
      json=payload,
  )

  response.raise_for_status()
  print(response.json())
  ```
</CodeGroup>

A successful request returns the stream ID and the output URLs:

<CodeGroup>
  ```json Response theme={null}
  {
    "stream_id": 1234,
    "task_id": "b8f2f1f0-3c6a-4f5e-9b2a-1c2d3e4f5a6b",
    "stream_url_for_languages": [
      {
        "languages": [54],
        "url": "srt://delivery.example.com:9100"
      }
    ]
  }
  ```
</CodeGroup>

## Scheduling

Every stream needs an `end_time` (with its `timezone`); the stream stops
automatically at that moment. `start_time` is optional: omit it to start
right away, or set it to schedule the stream for later.

```json theme={null}
{
  "start_time": "2026-08-01T19:30:00Z",
  "end_time": "2026-08-01T21:45:00Z",
  "timezone": "UTC"
}
```

Scheduling rules:

* Times are ISO 8601 with a UTC offset, and the `timezone` (IANA name) must
  match their offset.
* `start_time` cannot be in the past and at most 7 days in the future.
* `end_time` must be at least 15 minutes after the start.

To end a stream before its `end_time`, [delete it](delete-stream). To extend
or shorten a running stream, [update](update-stream) its `end_time`.

## Choosing targets

| You want to...                         | Use                                                    |
| -------------------------------------- | ------------------------------------------------------ |
| Push to your own SRT endpoint          | `"type": 1` with your `url`                            |
| Push to an RTMP ingest (e.g. YouTube)  | `"type": 2` (or `4` for YouTube) with the ingest `url` |
| Let viewers pull from Camb.ai over SRT | `"type": 6`, omit `url`; the play URL is returned      |
| Get a Camb.ai-hosted HLS recording     | `"type": 3`, omit `url`; the playback URL is returned  |

Each target lists `inputs`: pipeline outputs by `asset_id`, and untouched
source tracks by `passthrough_selector` (e.g. `v:0` for the video). Source
tracks that are not replaced by a pipeline output are forwarded automatically
unless you set `passthrough_policy` to `none`.

## Errors

* `402` - Insufficient credits for the requested configuration.
* `422` - Validation error: missing required blocks, an `id` reference that
  doesn't resolve (e.g. a pipeline referencing an unknown profile), invalid
  language IDs, or malformed URLs.

## Related endpoints

* [Probe a Source Stream](probe-stream) - inspect the source before creating
* [Get Stream Status](get-stream-status) - monitor state and output URLs
* [Update a Stream](update-stream) - reschedule, reconfigure, or toggle dubbing live
* [Delete a Stream](delete-stream) - terminate a running or scheduled stream
* [Create an SRT Flow](create-flow) - standing SRT endpoints usable as source or target


## OpenAPI

````yaml post /stream
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://client.camb.ai/apis
security: []
paths:
  /stream:
    post:
      tags:
        - Apis
        - Streaming
      summary: Create Stream
      description: >-
        Create a live stream: ingest a source, process it with one or more AI
        pipelines, and publish the results to one or more targets.
      operationId: create_stream_stream_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateStreamRequestPayload'
            example:
              name: Saturday Match Live Dub
              description: Football match commentary dubbed from English into Spanish
              end_time: '2026-08-01T21:45:00Z'
              timezone: UTC
              voices: []
              source_stream:
                id: match-feed
                url: srt://ingest.example.com:9000
                latency: 2000
                category: 2
              audio_selections:
                - id: commentary
                  source: $first_audio
                  source_language: 1
              processing_profiles:
                - id: dubbing
                  demixing: best_model
                  transcribing: best_model
                  translating: best_model
                  revoicing: best_model
              pipelines:
                - id: spanish
                  profile: dubbing
                  audio_selection: commentary
                  outputs:
                    - id: es-audio
                      kind: audio
                      language: 54
                    - id: es-subtitle
                      kind: subtitle
                      language: 54
              target_streams:
                - id: spanish-out
                  url: srt://delivery.example.com:9100
                  type: 1
                  inputs:
                    - asset_id: es-audio
                    - passthrough_selector: v:0
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateStreamOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    CreateStreamRequestPayload:
      type: object
      required:
        - audio_selections
        - processing_profiles
        - pipelines
        - source_stream
        - target_streams
        - end_time
        - timezone
      title: CreateStreamRequestPayload
      description: Configuration for a live stream.
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Display name for the stream. Auto-generated if omitted.
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Free-form description of the stream.
        initial_delay:
          type: integer
          exclusiveMinimum: 0
          default: 120
          title: Initial Delay
          description: >-
            Seconds of setup lead time before processing starts. Larger values
            give the pipeline more headroom to warm up; smaller values start
            output sooner.
        voices:
          type: array
          items:
            type: integer
          default: []
          title: Voices
          description: >-
            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:
          type: array
          items:
            type: integer
          maxItems: 5
          default: []
          title: Dictionaries
          description: >-
            Optional dictionary IDs for custom terminology (up to 5), from [`GET
            /dictionaries`](/api-reference/endpoint/list-dictionaries).
        start_time:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Start Time
          description: >-
            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:
          type: string
          format: date-time
          title: End Time
          description: >-
            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:
          type: string
          title: Timezone
          description: >-
            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:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/AudioSelection'
          title: Audio Selections
          description: Named audio tracks of the source that pipelines process.
        processing_profiles:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/ProcessingProfile'
          title: Processing Profiles
          description: Reusable AI processing configurations referenced by pipelines.
        encoding_profiles:
          anyOf:
            - type: array
              items:
                $ref: '#/components/schemas/EncodingProfile'
            - type: 'null'
          title: Encoding Profiles
          description: >-
            Optional reusable encoding configurations referenced by target
            inputs.
        pipelines:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/ProcessingPipeline'
          title: Pipelines
          description: >-
            Processing pipelines connecting audio selections to profiles and
            outputs.
        source_stream:
          $ref: '#/components/schemas/SourceStream'
          description: The live source to ingest.
        target_streams:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/TargetStream'
          title: Target Streams
          description: Destinations for the processed output. At least one is required.
    CreateStreamOut:
      type: object
      title: CreateStreamOut
      properties:
        stream_id:
          type: integer
          title: Stream ID
          description: Identifier of the created stream, used for all lifecycle operations.
        stream_url_for_languages:
          type: array
          items:
            $ref: '#/components/schemas/StreamURLForLanguages'
          title: Stream URL For Languages
          description: Playback URLs for the outputs, grouped by language.
        task_id:
          type: string
          title: Task ID
          description: Identifier of the setup task; useful when contacting support.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AudioSelection:
      type: object
      required:
        - id
        - source
        - source_language
      title: AudioSelection
      description: >-
        Names an audio track of the source so pipelines can reference it by
        `id`.
      properties:
        id:
          type: string
          title: ID
          description: >-
            Your identifier for this selection, referenced by
            `pipelines[].audio_selection`.
        source:
          type: string
          title: Source
          description: >-
            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:
          $ref: '#/components/schemas/Languages'
          description: >-
            Language spoken on the selected track. If the audio mixes several
            languages, use the main one; multilingual input is handled
            automatically. Numeric language ID from [`GET
            /source-languages`](/api-reference/endpoint/get-source-languages),
            e.g. `1` for English (US).
        background:
          anyOf:
            - type: string
            - type: 'null'
          title: Background
          description: >-
            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.
    ProcessingProfile:
      type: object
      required:
        - id
      title: ProcessingProfile
      description: >-
        A reusable bundle of AI processing settings, referenced by
        `pipelines[].profile`. Each step is `none` (off), `best_model` (quality)
        or `fast_model` (latency).
      properties:
        id:
          type: string
          title: ID
          description: >-
            Your identifier for this profile, referenced by
            `pipelines[].profile`.
        demixing:
          $ref: '#/components/schemas/ProcessingOption'
          default: none
          description: Separate speech from background music/effects before transcription.
        transcribing:
          $ref: '#/components/schemas/ProcessingOption'
          default: none
          description: Speech-to-text on the selected audio.
        translating:
          $ref: '#/components/schemas/ProcessingOption'
          default: none
          description: Translate the transcript into each output language.
        revoicing:
          $ref: '#/components/schemas/ProcessingOption'
          default: none
          description: Synthesise dubbed speech in the output language.
        mixing:
          anyOf:
            - $ref: '#/components/schemas/OverdubConfig'
            - type: 'null'
          description: >-
            Optional mix gains for dubbed output. Requires `revoicing` to be
            enabled.
        scte35_dubbing_control:
          anyOf:
            - $ref: '#/components/schemas/Scte35DubbingControl'
            - type: 'null'
          description: Optional automatic dubbing toggling on SCTE-35 ad-break markers.
    EncodingProfile:
      type: object
      required:
        - id
      title: EncodingProfile
      description: >-
        Reusable encoding settings, referenced by
        `target_streams[].inputs[].encoding_profile`. Must set at least one of
        `audio_codec` or `video_codec`.
      properties:
        id:
          type: string
          title: ID
          description: Your identifier for this profile.
        audio_codec:
          anyOf:
            - type: string
            - type: 'null'
          title: Audio Codec
          description: Audio codec, e.g. `aac`.
        audio_bitrate:
          anyOf:
            - type: string
            - type: 'null'
          title: Audio Bitrate
          description: Audio bitrate, e.g. `192k`.
        audio_channel_layout:
          anyOf:
            - type: string
            - type: 'null'
          title: Audio Channel Layout
          description: Channel layout, e.g. `stereo`.
        video_codec:
          anyOf:
            - type: string
            - type: 'null'
          title: Video Codec
          description: Video codec, e.g. `h264`.
        video_bitrate:
          anyOf:
            - type: string
            - type: 'null'
          title: Video Bitrate
          description: Video bitrate, e.g. `5M`.
    ProcessingPipeline:
      type: object
      required:
        - id
        - profile
        - audio_selection
        - outputs
      title: ProcessingPipeline
      description: >-
        Connects one audio selection to a processing profile and declares the
        assets to produce. A pipeline that produces an `audio` output must also
        produce a `subtitle` output.
      properties:
        id:
          type: string
          title: ID
          description: Your identifier for this pipeline.
        profile:
          type: string
          title: Profile
          description: '`id` of an entry in `processing_profiles`.'
        audio_selection:
          type: string
          title: Audio Selection
          description: '`id` of an entry in `audio_selections`.'
        outputs:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/PipelineOutput'
          title: Outputs
          description: >-
            Assets this pipeline produces. Output `id`s must be unique across
            all pipelines.
    SourceStream:
      type: object
      required:
        - id
        - url
      title: SourceStream
      description: The live source to ingest.
      properties:
        id:
          type: string
          title: ID
          description: Your identifier for the source stream, e.g. `main-feed`.
        url:
          type: string
          title: URL
          description: >-
            URL of the live source to ingest, e.g.
            `srt://ingest.example.com:9000`.
        category:
          anyOf:
            - $ref: '#/components/schemas/StreamCategory'
            - type: 'null'
        passphrase:
          anyOf:
            - type: string
              minLength: 10
              maxLength: 79
            - type: 'null'
          title: Passphrase
          description: >-
            SRT encryption passphrase for the source, if the source is encrypted
            (10-79 characters).
        streamid:
          anyOf:
            - type: string
            - type: 'null'
          title: Stream ID
          description: >-
            SRT `streamid` to send when connecting to the source, if it requires
            one. Not the Camb.ai stream ID.
        latency:
          anyOf:
            - type: integer
              minimum: 20
              maximum: 8000
            - type: 'null'
          title: Latency
          description: >-
            SRT receive latency in milliseconds (20-8000). Higher values
            tolerate more network jitter at the cost of delay. Recommended:
            `2000` for typical internet links.
    TargetStream:
      type: object
      required:
        - id
        - type
      title: TargetStream
      description: >-
        A destination for the processed stream. `url` is required except for
        auto-hosted types (SRT listener and HLS recording), whose URLs are
        generated and returned.
      properties:
        id:
          type: string
          title: ID
          description: Your identifier for the target, e.g. `youtube-es`.
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: URL
          description: >-
            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:
          $ref: '#/components/schemas/StreamType'
          description: Output protocol/type.
        passthrough_policy:
          $ref: '#/components/schemas/PassthroughPolicy'
          default: all
          description: >-
            Which source tracks are forwarded alongside the listed `inputs`.
            With `all` (the default), source tracks not replaced by a pipeline
            output are forwarded automatically.
        inputs:
          type: array
          items:
            $ref: '#/components/schemas/TargetStreamInput'
          title: Inputs
          default: []
          description: >-
            Tracks to include in this output. May be omitted when
            `passthrough_policy` is `all` or for auto-hosted target types.
        passphrase:
          anyOf:
            - type: string
            - type: 'null'
          title: Passphrase
          description: SRT encryption passphrase to use when pushing to the destination.
        streamid:
          anyOf:
            - type: string
            - type: 'null'
          title: Stream ID
          description: SRT `streamid` to send when connecting to the destination.
        constant_bitrate:
          anyOf:
            - type: boolean
            - type: string
            - type: 'null'
          title: Constant Bitrate
          description: >-
            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"`.
        latency:
          anyOf:
            - type: integer
              minimum: 20
              maximum: 8000
            - type: 'null'
          title: Latency
          description: >-
            SRT send latency in milliseconds (20-8000). Higher values tolerate
            more network jitter at the cost of delay. Recommended: `2000` for
            typical internet links.
    StreamURLForLanguages:
      type: object
      title: StreamURLForLanguages
      properties:
        languages:
          type: array
          items:
            $ref: '#/components/schemas/Languages'
          title: Languages
          description: Language IDs available on this output URL.
        url:
          type: string
          title: URL
          description: >-
            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.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    Languages:
      type: integer
      title: Language ID
      description: >-
        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).
    ProcessingOption:
      type: string
      enum:
        - none
        - best_model
        - fast_model
      title: ProcessingOption
      description: >-
        Selects the model tier for a processing step: `none` disables the step,
        `best_model` prioritises quality, `fast_model` prioritises latency.
    OverdubConfig:
      type: object
      title: OverdubConfig
      description: >-
        Relative gains used when mixing dubbed audio over the original.
        `original_audio_gain` + `background_audio_gain` must not exceed 1.0.
      properties:
        original_audio_gain:
          anyOf:
            - type: number
              maximum: 1
              minimum: 0
            - type: 'null'
          title: Original Audio Gain
          description: Volume of the original speaker while dubbed audio plays (0.0-1.0).
        background_audio_gain:
          anyOf:
            - type: number
              maximum: 1
              minimum: 0
            - type: 'null'
          title: Background Audio Gain
          description: >-
            Volume of background music/ambience during dubbed segments
            (0.0-1.0).
        fallback_audio_gain:
          anyOf:
            - type: number
              maximum: 1
              minimum: 0
            - type: 'null'
          title: Fallback Audio Gain
          description: >-
            Volume of the original audio while nothing is being dubbed
            (0.0-1.0).
        fade_time:
          type: number
          minimum: 0
          maximum: 5
          default: 1
          title: Fade Time
          description: >-
            Cross-fade duration in seconds when switching between original and
            dubbed audio (0-5).
    Scte35DubbingControl:
      type: object
      title: Scte35DubbingControl
      description: >-
        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.
      properties:
        on_out_of_network_start:
          anyOf:
            - type: string
            - type: 'null'
          title: On Out-of-Network Start
          description: Dubbing state applied when an ad break starts.
          default: disabled
        on_out_of_network_end:
          anyOf:
            - type: string
            - type: 'null'
          title: On Out-of-Network End
          description: Dubbing state applied when an ad break ends.
          default: enabled
    PipelineOutput:
      type: object
      required:
        - id
        - kind
      title: PipelineOutput
      properties:
        id:
          type: string
          title: ID
          description: >-
            Your identifier for the produced asset, referenced by
            `target_streams[].inputs[].asset_id`.
        kind:
          $ref: '#/components/schemas/ProducedAssetKind'
          description: Type of asset to produce.
        language:
          anyOf:
            - $ref: '#/components/schemas/Languages'
            - type: 'null'
          description: >-
            Language of the asset. Required for `audio` and `subtitle` outputs.
            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).
    StreamCategory:
      type: integer
      enum:
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
      title: StreamCategory
      description: |-
        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 |
    StreamType:
      type: integer
      enum:
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
      title: StreamType
      description: >-
        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. |
    PassthroughPolicy:
      type: string
      enum:
        - all
        - none
      title: PassthroughPolicy
      description: >-
        `all` forwards every source track that is not replaced by a pipeline
        output; `none` forwards nothing unless explicitly selected.
    TargetStreamInput:
      type: object
      title: TargetStreamInput
      description: >-
        One track of a target output. Set exactly one of `asset_id` (a pipeline
        output) or `passthrough_selector` (an unprocessed source track).
      properties:
        asset_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Asset ID
          description: '`id` of a pipeline output to include.'
        passthrough_selector:
          anyOf:
            - type: string
            - type: 'null'
          title: Passthrough Selector
          description: >-
            Selector (e.g. `v:0`, `a:eng`) for a source track to forward
            unprocessed.
        pid_policy:
          $ref: '#/components/schemas/PIDPolicy'
          default: auto
          description: How the MPEG-TS PID for this track is chosen.
        pid:
          anyOf:
            - type: integer
              minimum: 32
              maximum: 8190
            - type: 'null'
          title: PID
          description: >-
            Explicit MPEG-TS PID (32-8190). Required when `pid_policy` is
            `explicit`, forbidden otherwise.
        encoding_policy:
          $ref: '#/components/schemas/EncodingPolicy'
          default: auto
          description: How this track is encoded.
        encoding_profile:
          anyOf:
            - type: string
            - type: 'null'
          title: Encoding Profile
          description: >-
            `id` of an entry in `encoding_profiles`. Required when
            `encoding_policy` is `explicit`, forbidden otherwise.
    ProducedAssetKind:
      type: string
      enum:
        - audio
        - subtitle
        - video
        - data
      title: ProducedAssetKind
      description: Type of asset a pipeline output produces.
    PIDPolicy:
      type: string
      enum:
        - preserve
        - auto
        - explicit
      title: PIDPolicy
      description: >-
        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`.
    EncodingPolicy:
      type: string
      enum:
        - preserve
        - auto
        - explicit
      title: EncodingPolicy
      description: >-
        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`.
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        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.

````