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

# Create a dub from a video URL

> Creates a dub from a publicly accessible video URL. A minimum credit charge (1 minute per language) is applied upfront — additional credits are charged once the actual duration is known.



## OpenAPI

````yaml /openapi.json post /api/v1/dubs/url
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/url:
    post:
      tags:
        - Create dubs
      summary: Create a dub from a video URL
      description: >-
        Creates a dub from a publicly accessible video URL. A minimum credit
        charge (1 minute per language) is applied upfront — additional credits
        are charged once the actual duration is known.
      operationId: create-dub-url
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                video_url:
                  type: string
                  format: uri
                  description: Public URL of the video file.
                video_key:
                  type: string
                  minLength: 1
                  maxLength: 500
                  description: >-
                    Filename of the video (e.g. "my-video.mp4", 1–500 chars). It
                    is stored with the dub for reference only; Dubly stores the
                    downloaded video under its own internal path.
                source_language:
                  type: string
                  enum:
                    - af
                    - sq
                    - am
                    - ar
                    - hy
                    - as
                    - az
                    - ba
                    - eu
                    - be
                    - bn
                    - bs
                    - br
                    - bg
                    - ca
                    - zh
                    - hr
                    - cs
                    - da
                    - nl
                    - en
                    - et
                    - fo
                    - fi
                    - fr
                    - gl
                    - ka
                    - de
                    - el
                    - gu
                    - ht
                    - ha
                    - haw
                    - he
                    - hi
                    - hu
                    - is
                    - id
                    - it
                    - ja
                    - jv
                    - kn
                    - kk
                    - km
                    - ko
                    - lo
                    - la
                    - lv
                    - ln
                    - lt
                    - lb
                    - mk
                    - mg
                    - ms
                    - ml
                    - mt
                    - mi
                    - mr
                    - mn
                    - my
                    - ne
                    - 'no'
                    - nn
                    - oc
                    - ps
                    - fa
                    - pl
                    - pt
                    - pa
                    - ro
                    - ru
                    - sa
                    - sr
                    - sn
                    - sd
                    - si
                    - sk
                    - sl
                    - so
                    - es
                    - su
                    - sw
                    - sv
                    - tl
                    - tg
                    - ta
                    - tt
                    - te
                    - th
                    - bo
                    - tr
                    - tk
                    - uk
                    - ur
                    - uz
                    - vi
                    - cy
                    - wo
                    - yi
                    - yo
                  description: >-
                    BCP 47 language code of the original video (e.g. "en", "de")
                    — one of the source language codes this field lists.
                target_languages:
                  minItems: 1
                  type: array
                  items:
                    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: >-
                    Array of BCP 47 target language codes to dub into, at least
                    one — see [Supported target
                    languages](/guides/supported-languages). Engine v1, the
                    default, accepts every code. Every other engine accepts only
                    the codes with ✓ in its column of that table; a code with —
                    there is rejected with 400 when the dub runs on that engine.
                enhance_speech:
                  default: false
                  type: boolean
                  description: >-
                    Accepted for compatibility, but currently without effect:
                    the value is checked to be a boolean and otherwise ignored —
                    no speech enhancement is applied either way. Defaults to
                    false.
                speaker_count:
                  default: 0
                  type: integer
                  minimum: 0
                  maximum: 20
                  description: >-
                    Number of speakers in the video (0–20). Defaults to 0
                    (auto-detect).
                title:
                  default: Untitled
                  type: string
                  minLength: 1
                  maxLength: 500
                  description: >-
                    Title for the dub. Leading and trailing spaces are removed;
                    the rest must be 1–500 characters, otherwise 400. Defaults
                    to "Untitled".
                custom_prompt:
                  type: string
                  maxLength: 2000
                  description: Custom instructions for the translation (max 2000 chars).
                translation_style_map:
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties:
                    type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                  description: >-
                    Map of target language code to translation style ID (UUID).
                    Assigns a specific style per language.
                auto_apply_styles:
                  default: true
                  type: boolean
                  description: >-
                    Auto-match translation styles for languages not in the map.
                    Defaults to true.
                engine:
                  type: string
                  enum:
                    - v1
                    - v2
                  description: >-
                    Dubbing engine, one of "v1", "v2". Defaults to "v1". "v2"
                    must be enabled for your account; otherwise the request
                    returns 403 and no dub is created. Each engine offers its
                    own target languages ([Supported target
                    languages](/guides/supported-languages)).
                project_id:
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                  description: >-
                    Assigns the dub to a project owned by your account. Retrieve
                    project IDs via GET /api/v1/projects. An unknown project or
                    one of another account returns 400.
                custom_voice_id:
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                  description: >-
                    Uses a custom voice for text-to-speech. The same voice is
                    used for all speakers. Retrieve custom voice IDs via GET
                    /api/v1/custom-voices. An unknown custom voice or one of
                    another account returns 400.
                keep_original_voice:
                  default: false
                  type: boolean
                  description: >-
                    Keep the original voice under the dubbed voice. Not
                    supported through the public API yet: only false, the
                    default, is accepted — true returns 400.
                original_voice_volume_db:
                  default: -20
                  type: integer
                  minimum: -30
                  maximum: -5
                  description: >-
                    Volume of the original voice under the dubbed voice in dB, a
                    whole number from -30 (quietest) to -5 (loudest). Defaults
                    to -20. It is stored with the dub, but only heard on a dub
                    that keeps the original voice — which the public API cannot
                    create yet (see keep_original_voice).
              required:
                - video_url
                - video_key
                - source_language
                - target_languages
            examples:
              url:
                summary: A video URL into two languages
                value:
                  video_url: https://example.com/video.mp4
                  video_key: my-video.mp4
                  source_language: en
                  target_languages:
                    - de
                    - es
                  title: My Video
                  project_id: 83724e4d-f41a-4f1a-a4c3-590e6b296bb0
                  custom_voice_id: 1fd47408-c5ff-4de0-97b1-f37c7372710e
      responses:
        '200':
          description: >-
            The dub was created. Poll GET /api/v1/dubs/{id} with its id for the
            status and the results.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    const: success
                  response:
                    type: object
                    properties:
                      id:
                        type: string
                        description: >-
                          ID of the new dub — the {id} of every
                          /api/v1/dubs/{id} endpoint.
                    required:
                      - id
                required:
                  - status
                  - response
              examples:
                created:
                  summary: The new dub
                  value:
                    status: success
                    response:
                      id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
        '400':
          description: >-
            BAD_REQUEST — The body is not valid JSON or fails validation (a
            missing or invalid field, keep_original_voice: true), project_id or
            custom_voice_id is not one of your account's, or a target language
            is not offered by the dub's engine. No dub is created.
          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 — Your credits do not cover the dub, or the requested
            engine is not enabled for your account. A refused engine creates no
            dub; without enough credits the dub has already been created — it
            gets status "Error" and nothing is charged.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: INTERNAL_ERROR — The dub could not be created. Retry the request.
          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.