The video subtitle translation operator supports extracting subtitles from videos and translating them into multiple languages. Users can choose to recognize embedded subtitles in the video using OCR, or extract audio subtitles using ASR, then refine and translate the recognized subtitles, and output subtitle files in various formats.
http/https and tos://.mp4, mov, avi, mkv, flv, webm..txt, .srt, .xml, .vtt.Subtitle source | Description | Applicable scenarios |
|---|---|---|
ocr_low_precision | OCR low accuracy, extracts embedded subtitles from the video frame | Video resolution must be at least 360p, subtitle text occupies more than 5% of the frame, suitable for quick processing |
ocr_high_precision | OCR high accuracy, extracts embedded subtitles from the video frame | There is a large amount of non-subtitle text content in the video, and subtitles occupy less than 5% of the frame; high subtitle accuracy is required |
asr_low_precision | ASR low accuracy, extracts subtitles from audio | Videos without embedded subtitles or with unclear subtitles, clear pronunciation, and standard speech |
asr_high_precision | ASR high accuracy, audio extraction plus refined subtitle editing based on video understanding | Educational scenarios with complex professional terminology and pronounced accent phenomena |
The following languages are supported for audio recognition and subtitle translation:
Language code | Language name |
|---|---|
zh-CN | Chinese (Simplified) |
en-US | English (United States) |
ja-JP | Japanese |
id-ID | Indonesian |
es-MX | Spanish (Mexico) |
pt-BR | Portuguese (Brazil) |
de-DE | German |
fr-FR | French |
ko-KR | Korean |
fil-PH | Filipino |
ms-MY | Malay |
th-TH | Thai |
ar-SA | Arabic |
it-IT | Italian |
bn-BD | Bengali |
el-GR | Greek |
nl-NL | Dutch |
ru-RU | Russian |
tr-TR | Turkish |
vi-VN | Vietnamese |
pl-PL | Polish |
ro-RO | Romanian |
ne-NP | Nepali |
uk-UA | Ukrainian |
yue-CN | Cantonese |
Billing standards
Breakdown | Description of billing standards |
|---|---|
Billing item | Billing is based on the input video duration, and includes two billing items: subtitle recognition fee and subtitle translation fee. The total amount payable is the sum of all billing items. |
Billing type | Pay-as-you-go, unit: |
Unit price | The unit price for each billing item is tiered based on the input length when calling the model. The unit price varies depending on the input length tier.
|
Billing details
Billing formula:
Total Cost = Subtitle Recognition Cost + Subtitle Translate Cost = (Subtitle Recognition Unit Price × Input Video Duration) + (Subtitle Translate Unit Price × Input Video Duration × Number of languages to be translated)
Billing item | Unit price |
|---|---|
Subtitle recognition | Video subtitle source method - OCR low accuracy: 0.15 CNY/minute |
Video subtitle source method - OCR high accuracy: 0.25 CNY/minute | |
Video subtitle source method - ASR low accuracy: 0.015 CNY/minute | |
Video subtitle source method - ASR high accuracy: 1.5 CNY/minute | |
Subtitle translation | Fixed unit price: 0.1 CNY/minute/item |
Billing example
Total cost = 0.25 CNY/minute * 5 minutes + 0.1 CNY/minute/item * 5 minutes * 2 items = 2.25 CNYDetails | Caution and prerequisites |
|---|---|
Costs | Before calling an operator, you need to understand the model invocation costs associated with using the operator. For details, see Large model invocation billing. |
Authentication (API Key) | Before calling an operator, you need to generate an API Key for operator invocation. It is recommended to configure the API Key as an environment variable to ensure safer operator calls. For details, see Obtain and configure API Key. |
BaseURL | Before calling an operator, you need to determine the BaseURL for operator invocation based on the region where your current LAS service is deployed. This is used to configure the path parameter values for operator calls. |
Invoke the video subtitle translation operator to submit asynchronous tasks, supporting subtitle extraction, translation, and multi-format output.
Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
operator_id | string | Yes | las_video_subtitle_translate | Operator ID. |
operator_version | string | Yes | v1 | Operator version. |
data | VideoCaptioningInfo | Yes | Video subtitle translation request parameters. | |
video_url | string | Yes | https://example.com/video.mp4 | Enter the video address. Supports http/https, tos://bucket/key. |
caption_source | string | Yes | ocr_high_precision | Subtitle source type. Optional values: ocr_low_precision, ocr_high_precision, asr_low_precision, asr_high_precision. |
output_language | list of string | Yes | [en-US] | Output language, must be one of the supported language codes. |
audio_language | string | Conditionally required | zh-CN | Audio language. When caption_source is asr_low_precision or asr_high_precision, this field is required. Must be one of the supported language codes. |
caption_output_path | string | Yes | tos://bucket/output/ | Subtitle output directory. |
caption_format | list of string | No | [.srt] | Subtitle format. Optional .txt, .srt, .xml, .vtt. Multiple formats can be specified at the same time. The default is .srt. |
Parameter | Type | Example value | Description |
|---|---|---|---|
metadata | metadata | Request metadata. | |
task_id | string | task-xxx | Task ID in asynchronous mode, used for job status queries. |
task_status | string | PENDING | Task status in asynchronous mode.
|
business_code | string | 0 | Business code. |
error_msg | string | If there is an exception, detailed error information will be returned. |
curl --location "https://operator.las.ap-southeast-1.volces.com/api/v1/submit" --header "Content-Type: application/json" --header "Authorization: Bearer $LAS_API_KEY" --data '{ "operator_id": "las_video_subtitle_translate", "operator_version": "v1", "data": { "video_url": "https://example.com/sample_video.mp4", "caption_source": "ocr_high_precision", "output_language": ["en-US"], "caption_format": [".srt"] } }'
{ "metadata": { "task_id": "task-20260323153012-abc123", "task_status": "PENDING", "business_code": "0", "error_msg": "" } }
HttpCode | Error code | Error message | Description |
|---|---|---|---|
400 | Parameter.Invalid | The parameter is invalid.. | Invalid parameter |
401 | Authorization.Missing | Missing Authorization | Returned when authentication information is missing. |
401 | ApiKey.InValid | The api key is invalid | Returned when the API key is invalid. |
Query the execution status and results of video subtitle translation tasks.
Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
operator_id | string | Yes | las_video_subtitle_translate | Operator ID |
operator_version | string | Yes | v1 | Operator version |
task_id | string | Yes | task-xxx | Task ID |
Parameter | Type | Example value | Description |
|---|---|---|---|
metadata | metadata | Request metadata. | |
task_id | string | task-xxx | Task ID in asynchronous mode. |
task_status | string | COMPLETED | Task status in asynchronous mode.
|
submit_time | string | 2026-07-21T16:04:06+08:00 | Task submission time, in ISO 8601 timestamp format. |
end_time | string | 2026-07-21T16:04:06+08:00 | Task end time, in ISO 8601 timestamp format. |
business_code | string | 0 | Business code. |
error_msg | string | If there is an exception, detailed error information will be returned. | |
data | VideoCaptioningResponse | Returned data. | |
video_url | string | https://example.com/video.mp4 | Enter the video address. |
video_duration | float | 98.4 | Total duration of the input video (seconds). |
final_captions | list of FinalCaption | Final subtitle result list. | |
tos_path | string | tos://bucket/path/en-US_caption.srt | Subtitle file TOS path. |
presigned_url | string | https://... | Pre-signed access URL, valid for 3 days. |
language | string | en-US | Subtitle language. |
format | string | srt | Subtitle format. |
curl --location "https://operator.las.ap-southeast-1.volces.com/api/v1/poll" --header "Content-Type: application/json" --header "Authorization: Bearer $LAS_API_KEY" --data '{ "operator_id": "las_video_subtitle_translate", "operator_version": "v1", "task_id": "task-20260323153012-abc123" }'
{ "metadata": { "task_id": "task-20260323153012-abc123", "task_status": "COMPLETED", "submit_time": "2026-07-21T16:04:06+08:00", "end_time": "2026-07-21T16:04:06+08:00", "business_code": "0", "error_msg": "" }, "data": { "video_url": "https://example.com/sample_video.mp4", "video_duration": 98.4, "final_captions": [ { "tos_path": "tos://bucket/captions/20260323/account/trace/en-US_caption_xxx.srt", "presigned_url": "https://...", "language": "en-US", "format": "srt" } ] } }
HttpCode | Error code | Error message | Description |
|---|---|---|---|
400 | Video.Invalid | Video file is invalid or format not supported | Returned when the video file cannot be parsed or the format is not supported. |
400 | Video.DownloadFailed | Video download failed | Returned when video download fails. |
400 | Video.DurationTooShort | Video duration is less than 10 seconds | Returned when video duration is less than 10 seconds. |
400 | Video.DurationTooLong | Video duration exceeds 4-hour limit | Returned when video duration exceeds 4 hours. |
400 | Video.FrameExtractionFailed | Frame extraction failed | Returned when frame extraction fails in ASR high precision mode. |
400 | Video.OcrFailed | OCR processing failed | Returned when OCR recognition processing fails. |
400 | Video.AsrFailed | ASR processing failed | Returned when ASR speech recognition processing fails. |
400 | Video.RefineFailed | Subtitle refinement failed | Returned when subtitle refinement fails in ASR high-precision mode. |
400 | Video.TranslateFailed | Subtitle translation failed | Returned when subtitle translation fails. |
400 | Video.CaptionUploadFailed | Subtitle file upload failed | Returned when subtitle file upload fails. |
400 | Parameter.Invalid | Unsupported video format/invalid language code, and so on | Returned when parameter values are invalid, such as unsupported video format, invalid language code, and so on. |
400 | Parameter.Missing | Missing required parameter | Returned when a required parameter is missing, such as not providing audio_language when using ASR mode. |
401 | Authorization.Missing | Missing Authorization | Returned when authentication information is missing. |
401 | ApiKey.InValid | The api key is invalid | Returned when the API Key is invalid. |
500 | Internal.ServerError | Internal server error | Returned when an internal server error occurs. |