Video Translate API

Programmatically generate translated versions of your videos

HeyGen's Video Translate API allows you to translate videos programmatically. This endpoint supports natural voice cloning and maintains the speaker’s original tone and style for accurate translations.

📘

The video_translate endpoint is available to Scale and Enterprise-tier HeyGen API plan customers.

https://www.heygen.com/video-translate

Quick Guide

Here's a quick guide on utilizing the Video Translate API:

1. List Supported Languages

Before translating a video, you can obtain a list of supported languages using the List Supported Languages API request.

This helps you identify the languages available for translation, which you'll use in the output_language parameter in the next step.

2. Translate the Video

To translate a video, make a request to the video translation endpoint with the necessary parameters.

📘

video_url is required.

Refer to the Translate Video API reference to review the full request and response format.

Ensure to replace <your-api-key>, <video_url> and <output_language> with your API key, the URL of the video you want to translate, and the desired output language, respectively. This request returns a video_translate_id that you'll use to check the video status.

Translate to Multiple Languages (Batch Translation)

You can also pass multiple languages in a single request using output_languages instead of output_language. This speeds up the process when the same source video is being translated into multiple languages.

curl --location 'https://api.heygen.com/v2/video_translate' \
--header 'accept: application/json' \
--header 'x-api-key: <your-api-key>' \
--header 'Content-Type: application/json' \
--data '{
  "video_url": "<video_url>",
  "output_languages": ["English", "Spanish", "French"],
  "title": "Global Campaign"
}'
{
  "error": null,
  "data": {
    "video_translate_id": null,
    "video_translate_ids": [
      "g6rf94f4c74e4556b293cfc37e13260d-en_en-ZA",
      "g6rf94f4c74e4556b293cfc37e13260d-hi",
      "g6rf94f4c74e4556b293cfc37e13260d-ur_ur-PK"
    ]
  }
}
📘

output_languageandoutput_languages cannot be used together in the same request.

Both versions will return video_translate_id(s), which you can use in the next step to monitor the translation status.

3. Check the Video Translation Status

To monitor the status of the video translation, make the Check Translation Status API request.

Based on the response, you can determine whether the translation is successful, failed, pending, or still running. If successful, you'll receive the URL of the translated video file.

📘

The video file URL you get will expire in 7 days. 📆

You can observe this expiration in the URL parameters. Every time you call the video status endpoint, theExpires and other queries are regenerated accordingly.

Conclusion

The Video Translate API simplifies multilingual content creation, helping you translate and distribute videos efficiently.