# Translate Video

Translates a video into one or more of 175+ supported languages with natural-sounding voice and accurate lip-sync. 

<Callout icon="📘" theme="info">
  **Note:**

  * Scroll down to the **Response** section below and expand the status code(s) to view the detailed response schema.
  * Refer to the **RESPONSE** section on the right and choose an example to see how the API response appears for each status code.
</Callout>

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "heygen-api",
    "version": "4.0.8"
  },
  "servers": [
    {
      "url": "https://api.heygen.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "name": "x-api-key",
        "in": "header",
        "x-default": "<your-api-key>"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/v2/video_translate": {
      "post": {
        "summary": "Translate Video",
        "description": "Translate videos into 175+ languages with natural voice and perfect lip-sync",
        "operationId": "video-translate",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "video_url": {
                    "type": "string",
                    "description": " URL of the video file to be translated. Supports direct video file URLs, Google Drive URLs, and YouTube URLs."
                  },
                  "title": {
                    "type": "string",
                    "description": "Title of the video. "
                  },
                  "output_language": {
                    "type": "string",
                    "description": "The target language in which the video will be translated. Either `output_language` or `output_languages` must be provided. Omitting both or defining both will result in an error. "
                  },
                  "output_languages": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "List of multiple target languages to translate the same video in a single request. Enables faster batch processing. Either `output_language` or `output_languages` must be provided. Omitting both or defining both will result in an error. "
                  },
                  "translate_audio_only": {
                    "type": "boolean",
                    "description": "Translate only the audio, ignore the faces and only translate the voice track in this video. Ideal for videos where the speaker is not visible, such as narrations, voiceovers, etc. ",
                    "default": "false"
                  },
                  "speaker_num": {
                    "type": "integer",
                    "format": "int32",
                    "description": "Number of speakers in the video. "
                  },
                  "callback_id": {
                    "type": "string",
                    "description": "Custom ID for callback purposes. Returned in the status/webhook payload for tracking."
                  },
                  "enable_dynamic_duration": {
                    "type": "string",
                    "description": "Stretch or shrink portions of your video to enhance conversational fluidity and translation quality between languages with different speaking rates."
                  },
                  "brand_voice_id": {
                    "type": "string",
                    "description": "Unique identifier of the Brand Glossary. It is used to apply predefined translation and pronunciation rules such as translation exclusions, enforced terms, vocabulary mappings, and tone preferences. Can be retrieved from <a href= \"https://docs.heygen.com/reference/list-brand-voices\" target=\"_blank\"> List Brand Voices </a> endpoint. "
                  },
                  "callback_url": {
                    "type": "string",
                    "description": "URL to notify when video rendering is complete, useful when your callback endpoint is dynamic and each video requires a separate callback. Using a webhook endpoint is still the recommended approach, as it provides more customization options such as secrets, event filtering, and more. If both `webhook` and `callback_url` are used, events will be sent to both endpoints."
                  },
                  "keep_the_same_format": {
                    "type": "boolean",
                    "default": "false",
                    "description": "Set to true to ensure the input quality matches the output quality."
                  },
                  "mode": {
                    "type": "string",
                    "default": "fast",
                    "description": "Specify the mode for video translation quality. Default mode is `fast` for faster generation, ideal for standard translations and videos with limited facial movement. Choosing `quality` mode will ensure highly natural lip-sync with a context-aware model, but will cost 2x more credits."
                  }
                },
                "required": [
                  "video_url",
                  "output_language",
                  "output_languages"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Video translation initiated successfully - Expand to view the detailed response schema.",
            "content": {
              "application/json": {
                "examples": {
                  "Single Language Translation": {
                    "value": {
                      "error": null,
                      "data": {
                        "video_translate_id": "8t4ca15b649d4bc1936f5ca2edd0c1c6-ur_ur-PK",
                        "video_translate_ids": null
                      }
                    },
                    "summary": "Single Language Translation"
                  },
                  "Batch Translation": {
                    "summary": "Batch Translation",
                    "value": {
                      "error": null,
                      "data": {
                        "video_translate_id": null,
                        "video_translate_ids": [
                          "g6rf94f4c74e4556b293cfc37e13260d-en_en-ZA",
                          "g6rf94f4c74e4556b293cfc37e13260d-hi",
                          "g6rf94f4c74e4556b293cfc37e13260d-ur_ur-PK"
                        ]
                      }
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Displays error message when the request fails; null if the request is successful."
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "video_translate_id": {
                          "type": "string",
                          "description": "Unique identifier of the translated video. "
                        },
                        "video_translate_ids": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Unique identifiers of the translated videos, if more than one output language was selected in the request."
                        }
                      },
                      "description": "Contains the translated video ID(s). "
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```