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

# Create Dubbing

> The endpoint enables automatic dubbing of videos from one language to another

## Request

Make a `POST` request to below endpoint and pass the required parameters as a request body.

```curl curl theme={null}
--request POST 'https://modelslab.com/api/v6/voice/create_dubbing' \
```

<Tip>
  You can find all voice\_id [here](https://modelslab.com/trained-voice-lists).
</Tip>

## Body

```json json theme={null}
{
  "key": "your_api_key",
  "init_video": "https://assets.modelslab.ai/generations/61cf206f-8bbe-498d-9514-a521c2833547.mp4",
  "source_lang": "hi",
  "output_lang": "en-us",
  "voice_id":"henry",
  "speed": 1.0,
  "file_prefix": "spanish_dub",
  "base64": false,
  "webhook": null,
  "track_id": null
}

```


## OpenAPI

````yaml POST /voice/create_dubbing
openapi: 3.1.0
info:
  title: ModelsLab Voice API
  description: >-
    A comprehensive API for AI-driven voice and audio generation including
    text-to-speech, voice cloning, music generation, and audio processing
    capabilities
  license:
    name: MIT
  version: 6.0.0
servers:
  - url: https://modelslab.com/api/v6
security: []
paths:
  /voice/create_dubbing:
    post:
      summary: Create video dubbing with voice translation
      description: Automatically translates and dubs video from one language to another
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDubbingRequest'
      responses:
        '200':
          description: Dubbing creation response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VoiceResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CreateDubbingRequest:
      type: object
      required:
        - key
        - init_video
        - output_lang
      properties:
        key:
          type: string
          description: API key for authentication
        init_video:
          type: string
          format: uri
          description: URL to video file to be dubbed
        source_lang:
          type: string
          default: hi
          description: Source language code of the video
        output_lang:
          type: string
          enum:
            - es
            - fr
            - hi
            - it
            - pt-br
            - en-us
            - en-gb
            - ja
            - zh
          description: Target language code for dubbing
        file_prefix:
          type: string
          default: spanish_dub
          description: Prefix for output file name
        voice_id:
          type: string
          description: ID of trained voice
        voice_model:
          type: string
          default: kokoro
          description: Voice model to use
        speed:
          type: number
          default: 1
          description: Playback speed for dubbing
        base64:
          type: boolean
          default: false
          description: Whether input is in base64 format
        seed:
          type: integer
          description: Random seed for reproducibility (0 for random)
        webhook:
          type: string
          format: uri
          description: URL to receive POST notification upon completion
        track_id:
          type: integer
          description: ID for webhook identification
    VoiceResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - success
            - processing
            - error
          description: Status of the voice generation
        generationTime:
          type: number
          description: Time taken to generate the audio in seconds
        id:
          type: integer
          description: Unique identifier for the voice generation
        output:
          type: array
          items:
            type: string
            format: uri
          description: Array of generated audio URLs
        proxy_links:
          type: array
          items:
            type: string
            format: uri
          description: Array of proxy audio URLs
        future_links:
          type: array
          items:
            type: string
            format: uri
          description: Array of future audio URLs for queued requests
        links:
          type: array
          items:
            type: string
            format: uri
          description: Array of audio URLs (voice cover response)
        meta:
          type: object
          description: Metadata about the audio generation including all parameters used
        eta:
          type: integer
          description: Estimated time for completion in seconds (processing status)
        message:
          type: string
          description: Status message or additional information
        tip:
          type: string
          description: Additional information or tips for the user
        fetch_result:
          type: string
          format: uri
          description: URL to fetch the result when processing
        audio_time:
          type: number
          description: Duration of the generated audio in seconds
    Error:
      type: object
      required:
        - status
        - message
      properties:
        status:
          type: string
          enum:
            - error
        message:
          type: string
          description: Error message description

````