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

# Change the volume of the original voice

> Sets how loud the original voice plays under the dubbed voice, like the audio settings on the dub page of the web app. The value is saved for the dub; if the dub has finished processing, every language is re-mixed with it right away — nothing is re-voiced and no credits are charged. While the re-mix runs, GET /api/v1/dubs/{id} reports "Updating" without URLs; once it is done, "Dubbed" again with URLs to the re-mixed videos. A finished lip sync is not reset by a volume change: GET /api/v1/dubs/{id}/lipsync stays "Synced", and its video is not re-made with the new volume.

Possible only when the dub's engine supports it and the dub was created keeping the original voice under the dubbed one (audio_settings.adjustable in GET /api/v1/dubs/{id}); otherwise the request returns 400. A value that is not a whole number from -30 to -5 returns 400. While any language of the dub is being updated or a review is in progress, the request returns 409 and changes nothing. Sending the current value returns 200 without a re-mix and is not counted.

Every change that actually takes effect costs one of the dub's 2 API volume changes; once they are used up, the next change returns 403 FORBIDDEN — the value and the audio stay as they are, and the volume can still be changed in the Dubly web app. A request refused with 400, 403, 404 or 409 before anything is written is not counted, and neither is one whose save fails with 500. Once the new value is saved, the change counts even if the re-mix does not finish: if another change was re-mixing a language at the same moment, the request returns 409, and if the re-mix fails, 500 — in both cases the new value stays saved and the message says so. See [Edit limits](/guides/edit-limits).



## OpenAPI

````yaml /openapi.json patch /api/v1/dubs/{id}/audio-settings
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}/audio-settings:
    patch:
      tags:
        - Dubs
      summary: Change the volume of the original voice
      description: >-
        Sets how loud the original voice plays under the dubbed voice, like the
        audio settings on the dub page of the web app. The value is saved for
        the dub; if the dub has finished processing, every language is re-mixed
        with it right away — nothing is re-voiced and no credits are charged.
        While the re-mix runs, GET /api/v1/dubs/{id} reports "Updating" without
        URLs; once it is done, "Dubbed" again with URLs to the re-mixed videos.
        A finished lip sync is not reset by a volume change: GET
        /api/v1/dubs/{id}/lipsync stays "Synced", and its video is not re-made
        with the new volume.


        Possible only when the dub's engine supports it and the dub was created
        keeping the original voice under the dubbed one
        (audio_settings.adjustable in GET /api/v1/dubs/{id}); otherwise the
        request returns 400. A value that is not a whole number from -30 to -5
        returns 400. While any language of the dub is being updated or a review
        is in progress, the request returns 409 and changes nothing. Sending the
        current value returns 200 without a re-mix and is not counted.


        Every change that actually takes effect costs one of the dub's 2 API
        volume changes; once they are used up, the next change returns 403
        FORBIDDEN — the value and the audio stay as they are, and the volume can
        still be changed in the Dubly web app. A request refused with 400, 403,
        404 or 409 before anything is written is not counted, and neither is one
        whose save fails with 500. Once the new value is saved, the change
        counts even if the re-mix does not finish: if another change was
        re-mixing a language at the same moment, the request returns 409, and if
        the re-mix fails, 500 — in both cases the new value stays saved and the
        message says so. See [Edit limits](/guides/edit-limits).
      operationId: patch-dub-audio-settings
      parameters:
        - name: id
          in: path
          required: true
          description: >-
            The dub ID (path parameter). An unknown dub, a dub of another
            account and a deleted dub 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:
                original_voice_volume_db:
                  type: integer
                  minimum: -30
                  maximum: -5
                  description: >-
                    Volume of the original voice in dB, a whole number from -30
                    (quietest) to -5 (loudest). A new dub starts at -20.
              required:
                - original_voice_volume_db
              additionalProperties: false
            examples:
              volume:
                summary: Set the original voice volume
                value:
                  original_voice_volume_db: -15
      responses:
        '200':
          description: >-
            The value is saved and — for a finished dub — every language is
            re-mixed; or the value was already set.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    const: success
                  response:
                    type: object
                    properties:
                      original_voice_volume_db:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                        description: The dub's original-voice volume now, in dB.
                      api_changes_remaining:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                        description: API volume changes this dub has left (of 2).
                    required:
                      - original_voice_volume_db
                      - api_changes_remaining
                required:
                  - status
                  - response
              examples:
                changed:
                  summary: Changed, one API volume change used
                  value:
                    status: success
                    response:
                      original_voice_volume_db: -15
                      api_changes_remaining: 1
        '400':
          description: >-
            BAD_REQUEST — The dub ID is not a UUID. Or the body is not valid
            JSON, has another field, or the value is not a whole number from -30
            to -5; or the volume of this dub cannot be changed
            (audio_settings.adjustable is false). Not 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 dub's 2 API volume changes are used up. Nothing is
            changed — the volume can still be changed in the Dubly web app.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: >-
            NOT_FOUND — The dub does not exist, belongs to another account or
            was deleted. Not counted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: >-
            CONFLICT — A language of the dub is being updated or in review —
            nothing is changed and nothing is counted. Or the new value was
            saved and counted, but another change was re-mixing a language at
            the same moment, so this request could not re-mix it.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: >-
            INTERNAL_ERROR — The dub or its API usage could not be read, or the
            value could not be saved — nothing is changed and nothing is
            counted. Or the new value was saved and counted, but the re-mix
            failed; after an unexpected error the value may have been saved, and
            the change is counted. The message says which.
          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.