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

# Get Dubbed Output in Alt Format

> Fetches the dubbed output for a specified `run_id` and `language` in the file format that is provided in the request body.

Convert your already-dubbed content into alternative file formats with our specialized endpoint. This powerful feature extends the capabilities of our core dubbing service by allowing you to repurpose completed dubbing projects into different media formats. Whether you need audio-only extracts, format conversions for specific platforms, this endpoint provides the flexibility to meet diverse content delivery requirements.

## Understanding Alternative Format Exports

The alt format endpoint works with content that has already been processed through our [`/dub`](end-to-end-dubbing) service:

<Steps>
  <Step title="Identify Your Content">
    Use the `run_id` from a completed dubbing task and specify which `language` version you want to convert.
  </Step>

  <Step title="Format Selection">
    Specify your desired output format and configuration options in the request body.
  </Step>

  <Step title="Processing">
    Our system will extract and convert the requested dubbed content into the specified format.
  </Step>

  <Step title="Delivery">
    Receive a download URL for your newly converted content, or a task ID to track processing status.
  </Step>
</Steps>

This endpoint complements the main dubbing workflow, giving you additional flexibility in how you deliver your multilingual content across different platforms and use cases.


## OpenAPI

````yaml post /dub-alt-format/{run_id}/{language}
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://client.camb.ai/apis
security: []
paths:
  /dub-alt-format/{run_id}/{language}:
    post:
      tags:
        - Dub
      summary: Get Dubbed Output in Alt Format
      operationId: get_dubbed_output_in_alt_format_dub_alt_format__run_id___language__post
      parameters:
        - name: run_id
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/RunIDParam'
        - name: language
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/Languages'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DubbedOutputInAltFormatRequestPayload'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/DubAltFormatResponseBody'
                    description: A JSON that contains the presigned url of the output file.
                  - $ref: '#/components/schemas/TaskID'
                    description: >-
                      A JSON that contains the unique identifier for the task.
                      This is used to query the status of the exporting dubbed
                      output to alt format task that is running. It is returned
                      when a create request is made for fetching the dubbed
                      output in an alt file format, in case it does not exist.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    RunIDParam:
      type: integer
      title: Run ID
      description: >-
        The unique identifier for the run, which was generated during the
        creation process and returned upon task completion.
    Languages:
      type: integer
      enum:
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
        - 7
        - 8
        - 9
        - 10
        - 11
        - 12
        - 13
        - 14
        - 15
        - 16
        - 17
        - 18
        - 19
        - 20
        - 21
        - 22
        - 23
        - 24
        - 25
        - 26
        - 27
        - 28
        - 29
        - 30
        - 31
        - 32
        - 33
        - 34
        - 35
        - 36
        - 37
        - 38
        - 39
        - 40
        - 41
        - 42
        - 43
        - 44
        - 45
        - 46
        - 47
        - 48
        - 49
        - 50
        - 51
        - 52
        - 53
        - 54
        - 55
        - 56
        - 57
        - 58
        - 59
        - 60
        - 61
        - 62
        - 63
        - 64
        - 65
        - 66
        - 67
        - 68
        - 69
        - 70
        - 71
        - 72
        - 73
        - 74
        - 75
        - 76
        - 77
        - 78
        - 79
        - 80
        - 81
        - 82
        - 83
        - 84
        - 85
        - 86
        - 87
        - 88
        - 89
        - 90
        - 91
        - 92
        - 93
        - 94
        - 95
        - 96
        - 97
        - 98
        - 99
        - 100
        - 101
        - 102
        - 103
        - 104
        - 105
        - 106
        - 107
        - 108
        - 109
        - 110
        - 111
        - 112
        - 113
        - 114
        - 115
        - 116
        - 117
        - 118
        - 119
        - 120
        - 121
        - 122
        - 123
        - 124
        - 125
        - 126
        - 127
        - 128
        - 129
        - 130
        - 131
        - 132
        - 133
        - 134
        - 135
        - 136
        - 139
        - 140
        - 141
        - 142
        - 143
        - 144
        - 145
        - 146
        - 147
        - 148
        - 149
        - 150
      title: Languages
      default: 1
    DubbedOutputInAltFormatRequestPayload:
      properties:
        output_format:
          anyOf:
            - $ref: '#/components/schemas/AudioOutputType'
            - $ref: '#/components/schemas/VideoOutputTypeWithoutAVI'
          title: Output Format
      type: object
      required:
        - output_format
      title: DubbedOutputInAltFormatRequestPayload
    DubAltFormatResponseBody:
      properties:
        output_url:
          title: >-
            The URL pointing to the generated media file in the format that
            specified.
          schema:
            $ref: '#/components/schemas/VideoOutputTypeWithoutAVI'
          description: >-
            A presigned URL that points to the dubbed media file that was
            exported in the file format that was requested by the user.
      title: Output URL
    TaskID:
      properties:
        task_id:
          type: string
          title: Task ID
      type: object
      title: Task ID
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AudioOutputType:
      type: string
      enum:
        - flac
        - wav
        - mp3
        - aac
      title: Audio Output
    VideoOutputTypeWithoutAVI:
      type: string
      enum:
        - mkv
        - mp4
        - mov
      title: Video Output Type
    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
  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.

````