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

# List the segments of one language

> Returns every segment of one target language of a completed dub, sorted by index, with its id (what PATCH …/segments takes), start and end in seconds as the editor shows them, source_text, target_text, speaker, is_muted, speech_rate, pending_revoice (engine v1: edited and waiting to be voiced at the next update; always false on engine v2), processing (a re-translation or re-voicing of this segment is running right now) and api_edits_remaining.

On the language level it returns the engine, its capabilities (supportsSourceEdit, supportsTranslationEdit and supportsVoiceSwap tell which PATCH fields the engine accepts), speakers (exactly the ids PATCH speaker accepts) and the same render state as GET /api/v1/dubs/{id}/update.

A language without segments returns 200 with an empty segments array. An unknown dub, a dub of another account and a target_language the dub does not have all return 404. Read-only: nothing is counted and no credits are charged.



## OpenAPI

````yaml /openapi.json get /api/v1/dubs/{id}/segments
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}/segments:
    get:
      tags:
        - Dub editing
      summary: List the segments of one language
      description: >-
        Returns every segment of one target language of a completed dub, sorted
        by index, with its id (what PATCH …/segments takes), start and end in
        seconds as the editor shows them, source_text, target_text, speaker,
        is_muted, speech_rate, pending_revoice (engine v1: edited and waiting to
        be voiced at the next update; always false on engine v2), processing (a
        re-translation or re-voicing of this segment is running right now) and
        api_edits_remaining.


        On the language level it returns the engine, its capabilities
        (supportsSourceEdit, supportsTranslationEdit and supportsVoiceSwap tell
        which PATCH fields the engine accepts), speakers (exactly the ids PATCH
        speaker accepts) and the same render state as GET
        /api/v1/dubs/{id}/update.


        A language without segments returns 200 with an empty segments array. An
        unknown dub, a dub of another account and a target_language the dub does
        not have all return 404. Read-only: nothing is counted and no credits
        are charged.
      operationId: get-dub-segments
      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
        - name: target_language
          in: query
          required: true
          description: >-
            BCP 47 target language code of the language to read (query
            parameter, e.g. ?target_language=de). A language the dub does not
            have returns 404.
          schema:
            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
          example: de
      responses:
        '200':
          description: >-
            The segments, speakers, capabilities and render state of the
            language.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    const: success
                  response:
                    type: object
                    properties:
                      dub_id:
                        type: string
                      target_language:
                        type: string
                      engine:
                        type: string
                        enum:
                          - v1
                          - v2
                        description: >-
                          The engine of the dub. It decides which edits are
                          available (capabilities in GET
                          /api/v1/dubs/{id}/segments).
                      pending_changes:
                        type: boolean
                        description: >-
                          Edits that POST /api/v1/dubs/{id}/update would apply;
                          v1: segments waiting for an update, v2: changes
                          waiting for "Apply changes".
                      is_updating:
                        type: boolean
                        description: An update of this language is running.
                      update_status:
                        type: string
                        enum:
                          - idle
                          - voice_cloning
                          - speech_syncing
                          - merging
                          - rendering
                          - error
                        description: >-
                          "idle", or the running phase voice_cloning →
                          speech_syncing → merging → rendering; "error" if the
                          last update failed.
                      lipsync_status:
                        type:
                          - string
                          - 'null'
                        description: >-
                          Lip-sync status of this language: "not_started",
                          "face_setup", "segmenting", "processing",
                          "reconstructing", "done", "failed", or null.
                      api_update_rounds_remaining:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                        description: API update rounds left for this language (at most 2).
                      video_url:
                        type:
                          - string
                          - 'null'
                        description: >-
                          Signed URL of the current video, valid for 7 days,
                          like GET /api/v1/dubs/{id}; null while an update is
                          running.
                      capabilities:
                        type: object
                        properties:
                          supportsSourceEdit:
                            type: boolean
                          supportsTranslationEdit:
                            type: boolean
                          supportsVoiceSwap:
                            type: boolean
                          supportsTimelineEditor:
                            type: boolean
                          supportsPerSegmentRegenerate:
                            type: boolean
                        required:
                          - supportsSourceEdit
                          - supportsTranslationEdit
                          - supportsVoiceSwap
                          - supportsTimelineEditor
                          - supportsPerSegmentRegenerate
                        description: >-
                          What the engine accepts: supportsSourceEdit,
                          supportsTranslationEdit and supportsVoiceSwap tell
                          which PATCH fields the engine accepts;
                          supportsTimelineEditor and
                          supportsPerSegmentRegenerate whether POST
                          …/segments/timeline and POST …/regenerate are
                          available.
                      speakers:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                          required:
                            - id
                            - name
                        description: Exactly the ids PATCH speaker accepts.
                      segments:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              description: What PATCH …/segments takes.
                            index:
                              type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                            start:
                              type: number
                              description: Start in seconds, as the editor shows it.
                            end:
                              type: number
                              description: End in seconds, as the editor shows it.
                            source_text:
                              type: string
                            target_text:
                              type: string
                            speaker:
                              type: object
                              properties:
                                id:
                                  type: string
                                name:
                                  type: string
                              required:
                                - id
                                - name
                            is_muted:
                              type: boolean
                            speech_rate:
                              type: number
                              description: Speech rate (1 = normal).
                            pending_revoice:
                              type: boolean
                              description: >-
                                Engine v1: edited and waiting to be voiced at
                                the next update; always false on engine v2.
                            processing:
                              type: boolean
                              description: >-
                                A re-translation or re-voicing of this segment
                                is running right now.
                            api_edits_remaining:
                              type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                              description: API edits left for this segment (at most 2).
                          required:
                            - id
                            - index
                            - start
                            - end
                            - source_text
                            - target_text
                            - speaker
                            - is_muted
                            - speech_rate
                            - pending_revoice
                            - processing
                            - api_edits_remaining
                        description: >-
                          Every segment of the language, sorted by index; empty
                          for a language without segments.
                    required:
                      - dub_id
                      - target_language
                      - engine
                      - pending_changes
                      - is_updating
                      - update_status
                      - lipsync_status
                      - api_update_rounds_remaining
                      - video_url
                      - capabilities
                      - speakers
                      - segments
                required:
                  - status
                  - response
              examples:
                segments:
                  summary: An engine v1 language
                  value:
                    status: success
                    response:
                      dub_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                      target_language: de
                      engine: v1
                      pending_changes: false
                      is_updating: false
                      update_status: idle
                      lipsync_status: not_started
                      api_update_rounds_remaining: 2
                      video_url: >-
                        https://...amazonaws.com/.../final_video.mp4?X-Amz-Expires=604800&...
                      capabilities:
                        supportsSourceEdit: true
                        supportsTranslationEdit: true
                        supportsVoiceSwap: true
                        supportsTimelineEditor: true
                        supportsPerSegmentRegenerate: true
                      speakers:
                        - id: '1'
                          name: Speaker 1
                        - id: '2'
                          name: Speaker 2
                      segments:
                        - id: 5b1e7c2a-9d43-4f8e-a6b0-2c7d9e1f3a54
                          index: 0
                          start: 0.48
                          end: 3.12
                          source_text: Welcome to our product tour.
                          target_text: Willkommen zu unserer Produkttour.
                          speaker:
                            id: '1'
                            name: Speaker 1
                          is_muted: false
                          speech_rate: 1
                          pending_revoice: false
                          processing: false
                          api_edits_remaining: 2
        '400':
          description: >-
            BAD_REQUEST — The dub ID is not a UUID, target_language is missing
            or no supported target language code, or the dub has not finished
            processing (status "Dubbed").
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: UNAUTHORIZED — Missing or invalid API token.
          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'
        '500':
          description: >-
            INTERNAL_ERROR — The dub, its segments or its API usage could not be
            read. 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.