The Video Translation API translates a video's speech and on-screen text into a target language. You can translate speech into subtitles, translate on-screen text, or do both. This API is ideal for multilingual e-commerce video distribution, international social media marketing, and global brand advertising. The API is asynchronous: after you submit a translation task, you receive a TaskId. You can then use this ID to poll the task status through a query interface and retrieve the results upon completion.
Scenarios
Cross-border e-commerce video localization: Translate subtitles and on-screen text in your product videos into the languages of your target markets to support promotion on international platforms.
International social media marketing: Localize subtitles and on-screen text in your content for platforms like TikTok, Instagram, and YouTube to improve user comprehension and increase conversion rates.
Global brand advertising: Automatically generate localized video versions for each target region to reduce manual production costs.
Training and product demonstrations: Translate subtitles and on-screen text in training courses or product demo videos into multiple languages to make them accessible to your global teams.
Features
Capability | Identifier | Description |
speech and subtitle translation |
| Translates the video's spoken audio into target-language dubbing. You can choose to "remove original subtitles" or "replace with translated subtitles". By default, original subtitles are not processed, and no new subtitles are added. |
visual text translation |
| Translates recognizable text in the source language, or removes the text without translation. You can also choose to remove the brand logo. |
The speech and subtitle translation (speech) capability generates target-language dubbing from the spoken content in the video. It then processes subtitles based on the selected handling option and merges them into the output video. The term "original subtitles" refers to the existing on-screen subtitles that correspond to the spoken audio. The "replace with translated subtitles" option first removes the original subtitles and then adds new subtitles synchronized with the translated dubbing.
Visual text translation (visual) targets recognizable text in the source language within the video, such as titles, product selling points, and descriptive text. This capability can be used independently of speech and subtitle translation, and the on-screen text does not need to be spoken in the audio. This capability can also process original subtitles that fall within its processing scope.
When both speech and visual are selected, the service first performs speech and subtitle translation to generate an intermediate video. It then performs visual text translation on this video while retaining the translated dubbing to produce the final video. The order of capabilities in the input array does not affect this execution order. Therefore, choosing not to process original subtitles applies only to the speech and subtitle translation stage, where no subtitles are removed or added. Subsequent visual text translation may still modify these subtitles. The visual text translation stage preserves any previously added translated subtitles.
API reference
1. Submit a task
Request
POST /api/v1/video/translation
Parameter | Type | Required | Description | Example |
VideoUrl | String | Yes | The URL of the video (MP4/MOV, ≤ 200MB). | https://cdn.example.com/product-demo.mp4 |
Capabilities | Array of strings | Yes | A list of translation capabilities. Supported values are | ["speech", "visual"] |
TargetLanguage | String | Conditionally | Required if | en |
SourceLanguage | String | No | The source language of the video. For a list of supported languages, see "Language Support". | zh |
SubtitleMode | String | No | Applies only when | replace |
EraseOnly | Boolean | No | Applies only when | false |
RemoveLogo | Boolean | No | Applies only when | false |
EnableQualityCheck | Boolean | No | Defaults to | true |
The SubtitleMode parameter does not affect speech translation. Using replace adds new subtitles using a default font, size, and position that correspond to the target language audio. The API preserves these new subtitles during any subsequent visual text processing. If the original video has no subtitles but contains valid speech, replace can still add target language subtitles.
EraseOnly affects only the source language visual text; it does not disable speech translation or subtitle processing. When both speech and visual are selected, TargetLanguage is still required even if EraseOnly is set to true. Both speech and visual text processing use the same source and target languages.
Boolean parameters accept only true or false. To use the default behavior, omit the parameter. The API does not support null, empty string, or undefined values for these parameters. The API returns an InvalidParameter error if you pass SubtitleMode without including speech in Capabilities, or if you pass EraseOnly or RemoveLogo (even with a value of false) without including visual.
Request examples
Translate speech, keeping original subtitles
{
"VideoUrl": "https://cdn.example.com/product-demo.mp4",
"Capabilities": [
"speech"
],
"TargetLanguage": "en",
"SourceLanguage": "zh"
}
Translate speech and erase original subtitles
{
"VideoUrl": "https://cdn.example.com/product-demo.mp4",
"Capabilities": [
"speech"
],
"TargetLanguage": "en",
"SourceLanguage": "zh",
"SubtitleMode": "erase"
}
Translate speech and replace original subtitles
{
"VideoUrl": "https://cdn.example.com/product-demo.mp4",
"Capabilities": [
"speech"
],
"TargetLanguage": "en",
"SourceLanguage": "zh",
"SubtitleMode": "replace"
}
Translate visual text
{
"VideoUrl": "https://cdn.example.com/product-demo.mp4",
"Capabilities": [
"visual"
],
"TargetLanguage": "en",
"SourceLanguage": "zh"
}
Erase visual text without translation
{
"VideoUrl": "https://cdn.example.com/product-demo.mp4",
"Capabilities": [
"visual"
],
"SourceLanguage": "zh",
"EraseOnly": true
}
Translate visual text and remove the logo
{
"VideoUrl": "https://cdn.example.com/product-demo.mp4",
"Capabilities": [
"visual"
],
"TargetLanguage": "en",
"SourceLanguage": "zh",
"RemoveLogo": true
}
Translate both speech and visual text
{
"VideoUrl": "https://cdn.example.com/product-demo.mp4",
"Capabilities": [
"speech",
"visual"
],
"TargetLanguage": "en",
"SourceLanguage": "zh"
}
Translate speech and visual text, and erase original subtitles
{
"VideoUrl": "https://cdn.example.com/product-demo.mp4",
"Capabilities": [
"speech",
"visual"
],
"TargetLanguage": "en",
"SourceLanguage": "zh",
"SubtitleMode": "erase"
}
Translate speech and visual text, and replace original subtitles
{
"VideoUrl": "https://cdn.example.com/product-demo.mp4",
"Capabilities": [
"speech",
"visual"
],
"TargetLanguage": "en",
"SourceLanguage": "zh",
"SubtitleMode": "replace"
}
Translate speech, erase visual text, and replace original subtitles
{
"VideoUrl": "https://cdn.example.com/product-demo.mp4",
"Capabilities": [
"speech",
"visual"
],
"TargetLanguage": "en",
"SourceLanguage": "zh",
"SubtitleMode": "replace",
"EraseOnly": true
}
Translate speech and visual text, replace original subtitles, and remove the logo
{
"VideoUrl": "https://cdn.example.com/product-demo.mp4",
"Capabilities": [
"speech",
"visual"
],
"TargetLanguage": "en",
"SourceLanguage": "zh",
"SubtitleMode": "replace",
"EraseOnly": false,
"RemoveLogo": true
}
Translate speech and visual text, replace original subtitles, remove the logo, and enable quality check
{
"VideoUrl": "https://cdn.example.com/product-demo.mp4",
"Capabilities": [
"speech",
"visual"
],
"TargetLanguage": "en",
"SourceLanguage": "zh",
"SubtitleMode": "replace",
"EraseOnly": false,
"RemoveLogo": true,
"EnableQualityCheck": true
}
2. Query a task
Request
GET /api/v1/video/translation/{TaskId}
Parameter | Location | Type | Required | Description |
TaskId | path | String | Yes | The task ID returned from the submission request. |
Response parameters
Parameter | Type | Description |
Code | String | The status code. |
Data.TaskId | String | The asynchronous task ID. Use this ID for subsequent queries. |
Message | String | A descriptive message about the response status. |
RequestId | String | The unique ID for tracing the request. |
Success | Boolean | Indicates if the request succeeded.
|
If speech, subtitle, or visual text processing fails, the task status is set to failed. If you select multiple capabilities, the API returns the final video after all selected processing steps are complete.
Response example — in progress
{
"Data": {
"Status": "IN_PROGRESS",
"TaskId": "vtj_053c17758bf04064896d107d1b787319"
},
"Message": "Success",
"RequestId": "01A15744-EEE5-58A0-8B51-291052C7B689",
"Code": "success",
"Success": true
}Response example — completed
{
"Data": {
"Status": "COMPLETED",
"UsageMap": {
"SubtitleTranslationSeconds": 0,
"SpeechTranslationSeconds": 14,
"LipsyncTranslationSeconds": 0,
"VisualTranslationSeconds": 0
},
"TaskId": "vtj_053c17758bf04064896d107d1b787319",
"Result": "{\"duration\":14.0,\"videoUrl\":\"<source video URL>\",\"resultUrl\":\"<result video URL>\",\"targetAudioUrl\":\"<translated audio URL>\"}"
},
"Message": "Success",
"RequestId": "01A15746-36D5-5D2D-AD03-233899637E9B",
"Code": "success",
"Success": true
}Response example — failed
{
"Code": "Success",
"Message": "Success",
"RequestId": "req_20260608_jkl012",
"Data": {
"TaskId": "task_7f3a9b2e-4c1d-4e8f-b6a5-1234567890ab",
"Status": "failed",
"Error": {
"ErrorCode": "PROCESSING_TIMEOUT",
"ErrorMessage": "Task processing timeout. Please try again.",
"Retryable": true
}
}
}
Language support
✓ indicates support, and — indicates no support. When you select both the visual and speech capabilities, the available source and target languages are the intersection of those supported by each capability. The service returns LangNotSupported for unsupported language combinations.
1. Source languages
If you do not specify a source language, the system defaults to Chinese. If you provide a specific language code, the system forces recognition in that language.
Language code | Language | Visual | Speech | Visual and speech |
zh | Chinese | ✓ | ✓ | ✓ |
en | English | ✓ | ✓ | ✓ |
ja | Japanese | — | ✓ | — |
ko | Korean | — | ✓ | — |
yue | Cantonese | — | ✓ | — |
de | German | — | ✓ | — |
fr | French | — | ✓ | — |
es | Spanish | — | ✓ | — |
pt | Portuguese | — | ✓ | — |
ru | Russian | — | ✓ | — |
tr | Turkish | — | ✓ | — |
2. Target languages
Language code | Language | Visual | Speech | Visual and speech |
zh | Chinese | ✓ | ✓ | ✓ |
en | English | ✓ | ✓ | ✓ |
ja | Japanese | ✓ | ✓ | ✓ |
ko | Korean | ✓ | ✓ | ✓ |
ar | Arabic | ✓ | ✓ | ✓ |
de | German | ✓ | ✓ | ✓ |
es | Spanish | ✓ | ✓ | ✓ |
fr | French | ✓ | ✓ | ✓ |
hi | Hindi | ✓ | — | — |
id | Indonesian | ✓ | ✓ | ✓ |
it | Italian | ✓ | — | — |
ms | Malay | ✓ | ✓ | ✓ |
nl | Dutch | ✓ | — | — |
pl | Polish | ✓ | — | — |
pt | Portuguese | ✓ | ✓ | ✓ |
ru | Russian | ✓ | ✓ | ✓ |
th | Thai | ✓ | ✓ | ✓ |
tl | Filipino | ✓ | — | — |
tr | Turkish | ✓ | ✓ | ✓ |
uk | Ukrainian | ✓ | — | — |
ur | Urdu | ✓ | — | — |
vi | Vietnamese | ✓ | ✓ | ✓ |
bn | Bengali | ✓ | — | — |
zh-tw | Traditional Chinese / Taiwan Chinese | — | ✓ | — |
yue | Cantonese | — | ✓ | — |
sichuan | Sichuanese | — | ✓ | — |
dongbei | Northeastern Mandarin | — | ✓ | — |
tianjin | Tianjin Dialect | — | ✓ | — |
shaanxi | Shaanxi Dialect | — | ✓ | — |
Dialects use custom language codes. For example, the Shaanxi dialect uses shaanxi.
Error codes
Code | Message | Notes |
InvalidVideoFormat | The video format is not supported. Please use MP4 or MOV. | |
VideoTooLong | The video duration exceeds the 3-minute limit. | |
VideoTooLarge | The video file size exceeds the 200 MB limit. | |
VideoDownloadFailed | Failed to download the video from the provided URL. | |
LangNotSupported | The specified language combination is not supported. | |
InvalidParameter | Invalid request parameter: %s | |
CallerTypeNotSupported | Caller type not supported: %s (allowed types are 'customer' for main accounts and 'sub' for sub-accounts). | |
UserStatusInvalid | Invalid user status: %s | |
ServiceNotOpened | This service is not activated. Please activate the service to continue: %s | |
ServiceStatusInvalid | The service status is invalid. Please contact the administrator for assistance: %s | |
ServiceSuspended | Service suspended due to an overdue payment. Please settle the payment to continue: %s | |
FreeQuotaExhausted | You have exhausted the free quota. To continue, disable the 'stop-when-exhausted' switch or purchase a package: %s | |
PriorityUnavailable | The request priority feature is unavailable: %s | |
InputContentBlocked | The input content violates the content policy. Please modify the content and retry: %s | |
OutputContentBlocked | The generated output violates the content policy: %s | |
DownstreamUnavailable | A downstream service is temporarily unavailable. Details: %s | |
UsageParseFail | Internal system error: %s | |
BillingPushFail | Internal system error: %s | |
InternalError | The system is busy. Please try again later: %s | |
ServiceUnavailable | The service is unavailable due to a server failure. | |
Throttling | Request denied due to flow control. | |
Throttling.Api | Request denied due to API flow control. | |
Throttling.User | Request denied due to user flow control. | |
NoPermission | You are not authorized to perform this action. | |
UnknownError | The request failed due to an unknown error. | |
InternalError | The system is busy. Please try again later: %s | |
InvalidParameter | The specified parameter "%s" is invalid. | |
IncompleteSignature | The request signature does not conform to Alibaba Cloud standards. | |
MissingXXXXX | The XXXXX parameter is required. |
Limits
Item | Limit |
Video format | MP4, MOV |
Video size | ≤ 200 MB |
Result retention period | 7 days (resubmit after expiration) |
FAQ
Q: How long does it take to get results after submitting a task?
Processing time is typically comparable to the video's duration. You can monitor real-time progress in the Progress field of the query API response.
Q: How do I retry a failed task?
If the query result shows Error.Retryable = true, you can resubmit the task with the same parameters. Each submission generates a new TaskId.
Billing method
On the International site, billing is based on the selected capabilities. If you select both, the unit prices are added together.
Capability | Identifier | Unit price |
speech subtitle translation | speech | $0.015/second |
visual text translation | visual | $0.024/second |
speech subtitle translation and visual text translation | speech + visual | $0.039/second ($0.015 + $0.024) |