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

# Burn subtitles into the video of one language

> Starts burning subtitles into the video of one target language of a completed dub — the same burn-in as on the dub page of the web app. The base is the lip-sync video when the lip sync of this language is finished ("Synced"), otherwise the final dubbed video. The run is asynchronous: the answer's status is "aligning" (the words are timed first) or "rendering". Poll GET /api/v1/dubs/{id}/subtitled-video until it is "ready", then download the file there or via GET /api/v1/dubs/{id}/downloads. A language whose burn-in is "ready" or "failed" can be started again; that is a new run.

A dub that has not finished processing, a language without a base video, an unknown style and an invalid accent_color return 400. While a burn-in is already running for this language ("aligning" or "rendering") or a review of the language is in progress, the request returns 409 and starts nothing.

Every run that actually starts costs one of the language's 2 API burn-ins; once they are used up, the next start returns 403 FORBIDDEN, starts nothing and leaves the status as it is — burning in subtitles is still possible in the Dubly web app. A start refused with 400, 403, 404 or 409, or one that fails with 500, is not counted. See [Edit limits](/guides/edit-limits). No credits are charged.



## OpenAPI

````yaml /openapi.json post /api/v1/dubs/{id}/subtitled-video
openapi: 3.1.0
info:
  title: Dubly API
  version: 1.0.0
  description: >-
    The Dubly public API creates, edits and downloads AI-dubbed videos. Every
    request authenticates with an API token as a Bearer token
    ([Authentication](/authentication)). Every answer is JSON in an envelope: `{
    "status": "success", "response": … }` on success, `{ "status": "error",
    "message": … }` on failure — see [Errors](/guides/errors).
servers:
  - url: https://app.dubly.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Create dubs
    description: >-
      Start a dub from a YouTube video, a Google Drive file or a public video
      URL.
  - name: Dubs
    description: >-
      Read a dub's status and results, rename, move or delete it, list its
      downloads and set the original-voice volume.
  - name: Dub editing
    description: >-
      Read and correct segments, edit the timeline, re-voice a segment and apply
      the changes with an update. See [Edit limits](/guides/edit-limits).
  - name: Lip sync
    description: >-
      Start lip sync for a language, follow its progress and switch lip sync per
      block.
  - name: Subtitled video
    description: Burn subtitles into the video of a language and fetch the result.
  - name: Account
    description: List the projects and custom voices of your account.
paths:
  /api/v1/dubs/{id}/subtitled-video:
    post:
      tags:
        - Subtitled video
      summary: Burn subtitles into the video of one language
      description: >-
        Starts burning subtitles into the video of one target language of a
        completed dub — the same burn-in as on the dub page of the web app. The
        base is the lip-sync video when the lip sync of this language is
        finished ("Synced"), otherwise the final dubbed video. The run is
        asynchronous: the answer's status is "aligning" (the words are timed
        first) or "rendering". Poll GET /api/v1/dubs/{id}/subtitled-video until
        it is "ready", then download the file there or via GET
        /api/v1/dubs/{id}/downloads. A language whose burn-in is "ready" or
        "failed" can be started again; that is a new run.


        A dub that has not finished processing, a language without a base video,
        an unknown style and an invalid accent_color return 400. While a burn-in
        is already running for this language ("aligning" or "rendering") or a
        review of the language is in progress, the request returns 409 and
        starts nothing.


        Every run that actually starts costs one of the language's 2 API
        burn-ins; once they are used up, the next start returns 403 FORBIDDEN,
        starts nothing and leaves the status as it is — burning in subtitles is
        still possible in the Dubly web app. A start refused with 400, 403, 404
        or 409, or one that fails with 500, is not counted. See [Edit
        limits](/guides/edit-limits). No credits are charged.
      operationId: start-subtitled-video
      parameters:
        - name: id
          in: path
          required: true
          description: >-
            The dub ID (path parameter). The dub must have finished processing
            (status "Dubbed"); otherwise the request returns 400.
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
          example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                target_language:
                  type: string
                  enum:
                    - af
                    - ar
                    - hy
                    - as
                    - az
                    - be
                    - bn
                    - bs
                    - bg
                    - ca
                    - ceb
                    - ny
                    - zh
                    - hr
                    - cs
                    - da
                    - nl
                    - en
                    - et
                    - fil
                    - fi
                    - fr
                    - gl
                    - ka
                    - de
                    - el
                    - gu
                    - ha
                    - he
                    - hi
                    - hu
                    - is
                    - id
                    - ga
                    - it
                    - ja
                    - jv
                    - kn
                    - kk
                    - ko
                    - ky
                    - lv
                    - ln
                    - lt
                    - lb
                    - mk
                    - ms
                    - ml
                    - mr
                    - ne
                    - 'no'
                    - ps
                    - fa
                    - pl
                    - pt
                    - pa
                    - ro
                    - ru
                    - sr
                    - sd
                    - sk
                    - sl
                    - so
                    - es
                    - sw
                    - sv
                    - ta
                    - te
                    - th
                    - tr
                    - uk
                    - ur
                    - vi
                    - cy
                    - en-GB
                    - en-US
                    - es-419
                    - es-ES
                  description: >-
                    BCP 47 code of the language whose video gets the subtitles.
                    A language the dub does not have returns 404.
                style:
                  type: string
                  enum:
                    - business
                    - social
                  description: >-
                    Subtitle style, one of "business", "social". Any other value
                    returns 400.
                accent_color:
                  type:
                    - string
                    - 'null'
                  description: >-
                    Highlight colour as #RRGGBB for a style with an accent
                    colour: "social" (default #FFE53D). Left out or null, the
                    style's default colour is used. Any other format returns
                    400. Ignored for a style without an accent colour.
              required:
                - target_language
                - style
              additionalProperties: false
            examples:
              accent:
                summary: Style with a custom accent colour
                value:
                  target_language: de
                  style: social
                  accent_color: '#47CD89'
      responses:
        '200':
          description: >-
            The burn-in was started and cost one of the language's 2 API
            burn-ins.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    const: success
                  response:
                    type: object
                    properties:
                      dub_id:
                        type: string
                      target_language:
                        type: string
                      status:
                        type: string
                        enum:
                          - aligning
                          - rendering
                        description: '"aligning" (the words are timed first) or "rendering".'
                      style:
                        type: string
                        enum:
                          - business
                          - social
                        description: The style of this run.
                      accent_color:
                        type:
                          - string
                          - 'null'
                        description: >-
                          The applied highlight colour; null for a style without
                          an accent colour or when its default colour is used.
                      api_runs_remaining:
                        type: number
                        description: The API burn-ins this language has left (at most 2).
                    required:
                      - dub_id
                      - target_language
                      - status
                      - style
                      - accent_color
                      - api_runs_remaining
                required:
                  - status
                  - response
              examples:
                started:
                  summary: Burn-in started
                  value:
                    status: success
                    response:
                      dub_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                      target_language: de
                      status: aligning
                      style: social
                      accent_color: '#47CD89'
                      api_runs_remaining: 1
        '400':
          description: >-
            BAD_REQUEST — The dub ID is not a UUID; the body is not valid JSON
            or has an unknown field; target_language is missing or not a
            supported target language code; an unknown style or an invalid
            accent_color; the dub has not finished processing; or the language
            has no base video. Nothing is started or counted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: UNAUTHORIZED — Missing or invalid API token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: >-
            FORBIDDEN — The language has used all of its 2 API burn-ins. Nothing
            is started or counted and the status stays as it is — subtitles can
            still be burned in through the Dubly web app.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: >-
            NOT_FOUND — An unknown dub, a dub of another account, or a
            target_language the dub does not have.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: >-
            CONFLICT — A burn-in is already running for this language
            ("aligning" or "rendering"), or a review of the language is in
            progress. Nothing is started or counted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: >-
            INTERNAL_ERROR — The dub could not be read, the API burn-in limit
            could not be checked, or the burn-in failed to start. No API run is
            counted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        status:
          type: string
          const: error
        message:
          type: string
      required:
        - status
        - message
      description: >-
        The error envelope. The HTTP status carries the error code; `message`
        says what went wrong, in English.
      examples:
        - status: error
          message: Dub not found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        An API token from Settings → API in the Dubly web app, sent as
        `Authorization: Bearer <token>`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.