Heygen Video Translate API Documentation
Playground
Try it on WaveSpeedAI!HeyGen Video Translate: translate videos into 70+ languages and 175+ dialects with voice preservation and lip sync. Choose Speed at $0.04/sec or Precision at $0.08/sec. Supports videos up to 120 seconds.
Features
Translate spoken content into 70+ languages while preserving the speaker’s voice, with natural dubbing and lip sync. Each request supports an input video of up to 120 seconds.
Parameters
| Parameter | Required | Description |
|---|---|---|
video | Yes | Publicly accessible source video. Maximum duration: 120 seconds. |
output_language | No | Target language. Defaults to English. |
mode | No | speed for faster turnaround or precision for higher-quality lip sync. Defaults to precision. |
Pricing
Pricing is based on the input video’s duration, rounded up to the next whole second.
| Mode | Price per second | Maximum price for 120s |
|---|---|---|
| Speed | $0.04 / s | $4.80 |
| Precision | $0.08 / s | $9.60 |
Examples
| Input duration | Speed | Precision |
|---|---|---|
| 10s | $0.40 | $0.80 |
| 30s | $1.20 | $2.40 |
| 60s | $2.40 | $4.80 |
| 120s | $4.80 | $9.60 |
Usage notes
- Use Speed when turnaround time matters most.
- Use Precision when lip-sync quality is the priority.
- Clear speech, limited background noise, and a visible, well-lit speaker generally produce the best results.
- Video URLs must be publicly accessible.
- Requests with videos longer than 120 seconds are not supported.
Authentication
For authentication details, please refer to the Authentication Guide.
API Endpoints
Submit Task & Query Result
set -euo pipefail
export WAVESPEED_API_KEY="your-api-key"
REQUEST_BODY=$(cat <<'JSON'
{
"video": "https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4",
"output_language": "English",
"mode": "precision"
}
JSON
)
# 1. Submit the prediction.
SUBMIT_RESPONSE=$(curl --silent --show-error --fail-with-body \
-X POST "https://api.wavespeed.ai/api/v3/heygen/video-translate" \
-H "Authorization: Bearer ${WAVESPEED_API_KEY}" \
-H "Content-Type: application/json" \
-d "${REQUEST_BODY}")
TASK=$(printf '%s' "${SUBMIT_RESPONSE}" | jq 'if type == "object" and has("data") then .data else . end')
PREDICTION_ID=$(printf '%s' "${TASK}" | jq -r '.id // empty')
if [ -z "${PREDICTION_ID}" ]; then
printf 'Submission response did not contain a prediction id
' >&2
exit 1
fi
RESULT_URL="https://api.wavespeed.ai/api/v3/predictions/${PREDICTION_ID}/result"
# 2. Poll until the prediction finishes.
while true; do
RESPONSE=$(curl --silent --show-error --fail-with-body \
"${RESULT_URL}" \
-H "Authorization: Bearer ${WAVESPEED_API_KEY}")
RESULT=$(printf '%s' "${RESPONSE}" | jq 'if type == "object" and has("data") then .data else . end')
STATUS=$(printf '%s' "${RESULT}" | jq -r '.status // empty')
case "${STATUS}" in
completed) printf '%s\n' "${RESULT}" | jq '.outputs'; break ;;
failed|cancelled|timeout|deleted) printf '%s\n' "${RESULT}" | jq . >&2; exit 1 ;;
*) sleep 2 ;;
esac
doneParameters
Task Submission Parameters
Request Parameters
| Parameter | Type | Required | Default | Range | Description |
|---|---|---|---|---|---|
| video | string | Yes | - | The video to translate. Maximum duration: 120 seconds. | |
| output_language | string | No | English | English, Spanish, French, Hindi, Italian, German, Polish, Portuguese, Chinese, Japanese, Dutch, Turkish, Korean, Danish, Arabic, Romanian, Mandarin, Filipino, Swedish, Indonesian, Ukrainian, Greek, Czech, Bulgarian, Malay, Slovak, Croatian, Tamil, Finnish, Russian, Afrikaans (South Africa), Albanian (Albania), Amharic (Ethiopia), Arabic (Algeria), Arabic (Bahrain), Arabic (Egypt), Arabic (Iraq), Arabic (Jordan), Arabic (Kuwait), Arabic (Lebanon), Arabic (Libya), Arabic (Morocco), Arabic (Oman), Arabic (Qatar), Arabic (Saudi Arabia), Arabic (Syria), Arabic (Tunisia), Arabic (United Arab Emirates), Arabic (Yemen), Armenian (Armenia), Azerbaijani (Latin, Azerbaijan), Bangla (Bangladesh), Basque, Bengali (India), Bosnian (Bosnia and Herzegovina), Bulgarian (Bulgaria), Burmese (Myanmar), Catalan, Chinese (Cantonese, Traditional), Chinese (Jilu Mandarin, Simplified), Chinese (Mandarin, Simplified), Chinese (Northeastern Mandarin, Simplified), Chinese (Southwestern Mandarin, Simplified), Chinese (Taiwanese Mandarin, Traditional), Chinese (Wu, Simplified), Chinese (Zhongyuan Mandarin Henan, Simplified), Chinese (Zhongyuan Mandarin Shaanxi, Simplified), Croatian (Croatia), Czech (Czechia), Danish (Denmark), Dutch (Belgium), Dutch (Netherlands), English (Australia), English (Canada), English (Hong Kong SAR), English (India), English (Ireland), English (Kenya), English (New Zealand), English (Nigeria), English (Philippines), English (Singapore), English (South Africa), English (Tanzania), English (UK), English (United States), Estonian (Estonia), Filipino (Philippines), Finnish (Finland), French (Belgium), French (Canada), French (France), French (Switzerland), Galician, Georgian (Georgia), German (Austria), German (Germany), German (Switzerland), Greek (Greece), Gujarati (India), Hebrew (Israel), Hindi (India), Hungarian (Hungary), Icelandic (Iceland), Indonesian (Indonesia), Irish (Ireland), Italian (Italy), Japanese (Japan), Javanese (Latin, Indonesia), Kannada (India), Kazakh (Kazakhstan), Khmer (Cambodia), Korean (Korea), Lao (Laos), Latvian (Latvia), Lithuanian (Lithuania), Macedonian (North Macedonia), Malay (Malaysia), Malayalam (India), Maltese (Malta), Marathi (India), Mongolian (Mongolia), Nepali (Nepal), Norwegian Bokmål (Norway), Pashto (Afghanistan), Persian (Iran), Polish (Poland), Portuguese (Brazil), Portuguese (Portugal), Romanian (Romania), Russian (Russia), Serbian (Latin, Serbia), Sinhala (Sri Lanka), Slovak (Slovakia), Slovenian (Slovenia), Somali (Somalia), Spanish (Argentina), Spanish (Bolivia), Spanish (Chile), Spanish (Colombia), Spanish (Costa Rica), Spanish (Cuba), Spanish (Dominican Republic), Spanish (Ecuador), Spanish (El Salvador), Spanish (Equatorial Guinea), Spanish (Guatemala), Spanish (Honduras), Spanish (Mexico), Spanish (Nicaragua), Spanish (Panama), Spanish (Paraguay), Spanish (Peru), Spanish (Puerto Rico), Spanish (Spain), Spanish (United States), Spanish (Uruguay), Spanish (Venezuela), Sundanese (Indonesia), Swahili (Kenya), Swahili (Tanzania), Swedish (Sweden), Tamil (India), Tamil (Malaysia), Tamil (Singapore), Tamil (Sri Lanka), Telugu (India), Thai (Thailand), Turkish (Türkiye), Ukrainian (Ukraine), Urdu (India), Urdu (Pakistan), Uzbek (Latin, Uzbekistan), Vietnamese (Vietnam), Welsh (United Kingdom), Zulu (South Africa), English - Your Accent, English - American Accent | The target language in which the video will be translated |
| mode | string | No | precision | speed, precision | Translation mode. Speed is optimized for faster turnaround; precision is optimized for higher-quality lip sync. |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data.id | string | Unique identifier for the prediction, Task Id |
| data.model | string | Model ID used for the prediction |
| data.outputs | array | Output values, usually URL strings; some models return text strings or structured result objects (empty when status is not completed) |
| data.urls | object | Object containing related API endpoints |
| data.status | string | Task status. completed is successful; failed, cancelled, timeout, and deleted are failure terminal statuses. |
| data.created_at | string | ISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”) |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |
Result Request Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| id | string | Yes | - | Task ID |
Result Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data | object | The prediction data object containing all details |
| data.id | string | Unique identifier for the prediction |
| data.model | string | Model ID used for the prediction |
| data.outputs | array<string | object> | Array of generated outputs (empty when status is not completed). Items are usually URL strings, but may be text strings or structured result objects, depending on the model. |
| data.urls | object | Object containing related API endpoints |
| data.status | string | Status: completed is successful; failed, cancelled, timeout, and deleted are failure terminal statuses |
| data.created_at | string | ISO timestamp of when the request was created |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |