API Docs Center

Video Translation API


Updated: 2026-07-14

Overview

  • 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.

Base URL

https://video-translation.viitor.com


Authentication

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.


Common Response Structure

FieldTypeDescription
codeInteger0 means success; non-zero means failure
messageStringResponse message
dataObject / BooleanBusiness data

Task Status Enum

ValueDescription
1Created
2Queued
3Running
4Finished
5Failed
6Aborted

Processing Stage Enum

ValueStage
0defaulted
10preprocess
20asr_submit
30asr_result
40doc_translation
50speech_synthesis
70manual_optimization
90text_removal
100ocr_translate
120lip_sync
150merge_video
9999completed

Supported Language Codes

targetLanguage must use a supported language code. If sourceLanguage is provided, it is validated with the same language code set.

Language CodeChinese NameEnglish 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

1. Create Video Translation Task

Endpoint

  • Request URL: https://video-translation.viitor.com/openapi/v1/video-translation/create
  • Method: POST
  • Content-Type: application/json

HTTP Headers

HeaderRequiredTypeDescription
Content-TypeYesStringapplication/json;charset=UTF-8
AcceptRecommendedStringapplication/json;charset=UTF-8
AuthorizationYesStringBearer <API_KEY>

Request Body

FieldTypeRequiredDescription
sourceVideoUrlStringYesSource video URL
targetLanguageStringYesTarget language code. Must be a supported language
videoNameStringYesVideo task name. If it exceeds 255 characters, it is truncated
sourceVideoDurationMsLongYesVideo duration in milliseconds. Must be greater than 0

Successful data Fields

FieldTypeDescription
taskIdStringTask ID

Request Example

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
  }'

Successful Response Example

{
  "code": 0,
  "message": "OK",
  "data": {
    "taskId": "ViiTor_AI_50C7A13A74DC46D8B31EAEF3382895BA"
  }
}

2. Query Video Translation Result

  • Request URL: https://video-translation.viitor.com/openapi/v1/video-translation/result
  • Method: POST
  • Headers: same as the create video translation task endpoint
FieldTypeRequiredDescription
taskIdStringYesTask ID

Successful data fields:

FieldTypeDescription
taskIdStringTask ID
videoNameStringVideo name
taskStatusIntegerTask status
errorCodeIntegerError code
sourceLanguageStringSource language
targetLanguageStringTarget language
sourceThumbnailUrlStringSource video thumbnail
taskProcessStatusIntegerProcessing stage
targetVideoDurationLongResult video duration
videoDurationLongVideo duration
sourceVideoUrlStringSource video URL
targetVideoUrlStringResult video URL
createTimeLongCreation time

Request Example

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"
  }'

Successful Response Example

{
  "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
  }
}

Common Error Codes

codemessageDescription
0OKSuccess
1103No PrivilegeThe account is not VIP or has no permission to call the API
2001Invalid ParameterInvalid parameter
400001missing_api_keyMissing API Key
400002invalid_api_keyInvalid API Key
400003disabled_api_keyAPI Key is disabled
400004expired_api_keyAPI Key has expired

© 2026 HighRas Limited