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

# Start lip-sync for a subdub

> Starts the lip-sync pipeline for one target language of a dub. The dub must already be fully processed (status "Dubbed") — this includes waiting for a re-render after an editor update (status "Updating"). Credits are charged at 1 credit per minute of video, rounded up (at least 1 credit). The job runs asynchronously — poll GET /api/v1/dubs/{id}/lipsync to retrieve the final URL once the status is "Synced".

A language whose lip sync has finished ("Synced") can be started again. The new run is charged again, and before it starts, the previous lip-synced video of that language and its lip-sync blocks — including blocks switched with PATCH /api/v1/dubs/{id}/lipsync/segments — are deleted; until the new run is "Synced", the language has no lip-synced video.

A language whose lip sync is already running or whose last run failed, and a language whose audio for lip sync is not available yet, return 409; without enough credits the request returns 403. A start refused with 400, 403, 404 or 409 charges nothing. If the lip-sync pipeline cannot be started once the credits are charged, the request returns 500, the credits stay charged and the lip sync of the language is marked as failed ("Error"), so every further start returns 409. There is no API limit on lip-sync runs — every run is paid in credits.



## OpenAPI

````yaml /openapi.json post /api/v1/dubs/{id}/lipsync
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}/lipsync:
    post:
      tags:
        - Lip sync
      summary: Start lip-sync for a subdub
      description: >-
        Starts the lip-sync pipeline for one target language of a dub. The dub
        must already be fully processed (status "Dubbed") — this includes
        waiting for a re-render after an editor update (status "Updating").
        Credits are charged at 1 credit per minute of video, rounded up (at
        least 1 credit). The job runs asynchronously — poll GET
        /api/v1/dubs/{id}/lipsync to retrieve the final URL once the status is
        "Synced".


        A language whose lip sync has finished ("Synced") can be started again.
        The new run is charged again, and before it starts, the previous
        lip-synced video of that language and its lip-sync blocks — including
        blocks switched with PATCH /api/v1/dubs/{id}/lipsync/segments — are
        deleted; until the new run is "Synced", the language has no lip-synced
        video.


        A language whose lip sync is already running or whose last run failed,
        and a language whose audio for lip sync is not available yet, return
        409; without enough credits the request returns 403. A start refused
        with 400, 403, 404 or 409 charges nothing. If the lip-sync pipeline
        cannot be started once the credits are charged, the request returns 500,
        the credits stay charged and the lip sync of the language is marked as
        failed ("Error"), so every further start returns 409. There is no API
        limit on lip-sync runs — every run is paid in credits.
      operationId: start-lipsync
      parameters:
        - name: id
          in: path
          required: true
          description: >-
            The dub ID returned by the create endpoint (path parameter). The dub
            must have finished processing (status "Dubbed"); otherwise the
            request returns 400. An unknown dub and a dub of another account
            return 404.
          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 target language code of the subdub to lip-sync (must
                    match one of the target_languages used when creating the
                    dub; another language returns 404). A code the dub's engine
                    does not offer (— in that engine's column of [Supported
                    target languages](/guides/supported-languages)) is rejected
                    with 400, and so is a missing or unsupported code.
              required:
                - target_language
            examples:
              german:
                summary: Lip-sync the German subdub
                value:
                  target_language: de
      responses:
        '200':
          description: >-
            The lip-sync run was started; poll GET /api/v1/dubs/{id}/lipsync for
            its progress.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    const: success
                  response:
                    type: object
                    properties:
                      status:
                        type: string
                        const: Processing
                        description: Always "Processing" — the run has started.
                      step:
                        type: string
                        const: face_setup
                        description: The first pipeline step.
                    required:
                      - status
                      - step
                required:
                  - status
                  - response
              examples:
                started:
                  summary: Run started
                  value:
                    status: success
                    response:
                      status: Processing
                      step: face_setup
        '400':
          description: >-
            BAD_REQUEST — The dub ID is not a UUID; the body is not valid JSON,
            or target_language is missing or not a supported target language
            code; the dub's engine does not offer target_language (— in that
            engine's column of [Supported target
            languages](/guides/supported-languages)); the dub is not fully
            processed (any status but "Dubbed", including "Updating"); or the
            dub is a subtitle order (lip sync is not available for subtitle
            orders). Nothing is charged.
          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 account does not have enough credits for the run (1
            credit per minute of video, rounded up). Nothing is started or
            charged.
          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 lip sync is already running for this language; the last
            lip sync of this language failed (it can only be restarted via
            support); or the audio lip sync reads is not available for this
            language yet (e.g. while the audio split of an engine v2 dub is
            still running). Nothing is charged.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: >-
            INTERNAL_ERROR — The dub could not be read, the run could not be
            prepared or the credits could not be charged — then nothing is
            started or charged. Or the lip-sync pipeline could not be started
            after the credits were charged — then the credits stay charged, the
            lip sync of the language reports "Error" and every further start
            returns 409 (it can only be restarted via support); on a restart of
            a "Synced" language, its previous lip-synced video is already
            deleted.
          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.