Video Translation API
Updated: 2026-07-14
- Create video translation tasks and query task results by task ID.
- Supports task creation and result query.
- Tasks are processed asynchronously. After creating a task, the API returns
taskId; clients can poll the result endpoint to get the status and output.
https://video-translation.viitor.com
Authorization: Bearer vt_live_xxx
The server resolves the real user ID from the API Key. The user identity is recognized automatically, and userId is not required.
| Field | Type | Description |
|---|
code | Integer | 0 means success; non-zero means failure |
message | String | Response message |
data | Object / Boolean | Business data |
| Value | Description |
|---|
1 | Created |
2 | Queued |
3 | Running |
4 | Finished |
5 | Failed |
6 | Aborted |
| Value | Stage |
|---|
0 | defaulted |
10 | preprocess |
20 | asr_submit |
30 | asr_result |
40 | doc_translation |
50 | speech_synthesis |
70 | manual_optimization |
90 | text_removal |
100 | ocr_translate |
120 | lip_sync |
150 | merge_video |
9999 | completed |
targetLanguage must use a supported language code. If sourceLanguage is provided, it is validated with the same language code set.
| Language Code | Chinese Name | English Name |
|---|
zh-CN | 中文 | Chinese (Mandarin) |
zh-cn | 中文 | Chinese (Mandarin), lowercase compatible |
zh-tw | 繁体中文 | Chinese Traditional |
zh-yue | 粤语 | Cantonese |
en | 英语 | English |
ja | 日语 | Japanese |
ko | 韩语 | Korean |
ar | 阿拉伯语 | Arabic |
tl | 菲律宾语 | Filipino |
fr | 法语 | French |
de | 德语 | German |
hi | 印地语 | Hindi |
id | 印度尼西亚语 | Indonesian |
it | 意大利语 | Italian |
ms | 马来语 | Malay |
pt | 葡萄牙语 | Portuguese |
ru | 俄语 | Russian |
es | 西班牙语 | Spanish |
th | 泰语 | Thai |
tr | 土耳其语 | Turkish |
vi | 越南语 | Vietnamese |
fa | 波斯语 | Persian |
sk | 斯洛伐克语 | Slovak |
sl | 斯洛文尼亚语 | Slovenian |
cs | 捷克语 | Czech |
pl | 波兰语 | Polish |
ro | 罗马尼亚语 | Romanian |
hu | 匈牙利语 | Hungarian |
sv | 瑞典语 | Swedish |
fi | 芬兰语 | Finnish |
no | 挪威语 | Norwegian |
nl | 荷兰语 | Dutch |
uk | 乌克兰语 | Ukrainian |
- Request URL:
https://video-translation.viitor.com/openapi/v1/video-translation/create - Method:
POST - Content-Type:
application/json
| Header | Required | Type | Description |
|---|
Content-Type | Yes | String | application/json;charset=UTF-8 |
Accept | Recommended | String | application/json;charset=UTF-8 |
Authorization | Yes | String | Bearer <API_KEY> |
| Field | Type | Required | Description |
|---|
sourceVideoUrl | String | Yes | Source video URL |
targetLanguage | String | Yes | Target language code. Must be a supported language |
videoName | String | Yes | Video task name. If it exceeds 255 characters, it is truncated |
sourceVideoDurationMs | Long | Yes | Video duration in milliseconds. Must be greater than 0 |
| Field | Type | Description |
|---|
taskId | String | Task ID |
curl -X POST "https://video-translation.viitor.com/openapi/v1/video-translation/create" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer vt_live_xxx" \
-d '{
"sourceVideoUrl": "https://cdn.example.com/video/source.mp4",
"videoName": "Video translation task 001",
"targetLanguage": "en",
"sourceVideoDurationMs": 111250
}'
{
"code": 0,
"message": "OK",
"data": {
"taskId": "ViiTor_AI_50C7A13A74DC46D8B31EAEF3382895BA"
}
}
- Request URL:
https://video-translation.viitor.com/openapi/v1/video-translation/result - Method:
POST - Headers: same as the create video translation task endpoint
| Field | Type | Required | Description |
|---|
taskId | String | Yes | Task ID |
Successful data fields:
| Field | Type | Description |
|---|
taskId | String | Task ID |
videoName | String | Video name |
taskStatus | Integer | Task status |
errorCode | Integer | Error code |
sourceLanguage | String | Source language |
targetLanguage | String | Target language |
sourceThumbnailUrl | String | Source video thumbnail |
taskProcessStatus | Integer | Processing stage |
targetVideoDuration | Long | Result video duration |
videoDuration | Long | Video duration |
sourceVideoUrl | String | Source video URL |
targetVideoUrl | String | Result video URL |
createTime | Long | Creation time |
curl -X POST "https://video-translation.viitor.com/openapi/v1/video-translation/result" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer vt_live_xxx" \
-d '{
"taskId": "ViiTor_AI_50C7A13A74DC46D8B31EAEF3382895BA"
}'
{
"code": 0,
"message": "OK",
"data": {
"taskId": "ViiTor_AI_50C7A13A74DC46D8B31EAEF3382895BA",
"videoName": "Video translation task 001",
"taskStatus": 4,
"errorCode": 0,
"sourceLanguage": "zh-CN",
"targetLanguage": "en",
"sourceThumbnailUrl": "https://cdn.example.com/video/source-thumbnail.jpg",
"taskProcessStatus": 9999,
"targetVideoDuration": 112000,
"videoDuration": 111250,
"sourceVideoUrl": "https://cdn.example.com/video/source.mp4",
"targetVideoUrl": "https://cdn.example.com/video/result.mp4",
"createTime": 1720000000000
}
}
| code | message | Description |
|---|
0 | OK | Success |
1103 | No Privilege | The account is not VIP or has no permission to call the API |
2001 | Invalid Parameter | Invalid parameter |
400001 | missing_api_key | Missing API Key |
400002 | invalid_api_key | Invalid API Key |
400003 | disabled_api_key | API Key is disabled |
400004 | expired_api_key | API Key has expired |