You need to enable JavaScript to run this app.
Lake AI Service

Lake AI Service

Copy page
Download PDF
Video Translation
Video subtitle translation
Copy page
Download PDF
Video subtitle translation

Operator introduction

Description

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.

Limitations

  • The input video must be accessible by the service and supports http/https and tos://.
  • Video duration limit: minimum 10 seconds, maximum 4 hours.
  • Supported input video formats: mp4, mov, avi, mkv, flv, webm.
  • Supported output subtitle formats: .txt, .srt, .xml, .vtt.

Key features

  • Dual subtitle sources: Supports two methods—recognizing embedded subtitles in the video using OCR and extracting audio subtitles using ASR.
  • Multiple accuracy levels: Each subtitle source supports both low and high accuracy configurations to meet different scenario requirements.
  • Multilingual translation: Supports subtitle translation in 25 languages, including Chinese, English, Japanese, Korean, French, German, Spanish, and more.
  • Multi-format output: Supports simultaneous output of subtitle files in multiple formats.
  • Bilingual subtitle recognition: The OCR mode supports recognition of translation-type bilingual subtitles and dialogue-type bilingual subtitles.

Applicable scenarios

  • Video globalization: Enables video communication across different countries, covering short dramas, animation, movies, e-commerce videos, and many other fields.
  • Education industry: Translates professional videos and adapts to videos with different accents, expression habits, and complex technical terms.

Advantages

  • Comprehensiveness: Provides diversified subtitle generation methods. For scenarios where there are no subtitles in the video, subtitles can also be generated from audio.
  • Accuracy: Offers higher subtitle extraction accuracy, especially in educational scenarios with complex technical terms and strong accent phenomena; provides higher translation accuracy for videos with accents.
  • Cost-effective: Offers multiple modes to choose from, providing the most cost-effective solutions for different scenarios.

Description of subtitle sources

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

Supported languages

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

Performance description

  • Total processing time is mainly affected by video duration, subtitle source type, number of output languages, and number of subtitle formats.
  • Processing time for OCR mode is proportional to video duration and mode accuracy.
  • ASR high-accuracy mode requires longer processing time due to refined subtitle editing based on video understanding.
  • Translation time is proportional to the number of subtitle lines and the number of output languages.

Billing
  • 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: CNY/minute, billed hourly based on actual usage.

    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.

    • Video subtitle recognition: The cost for intelligently recognizing subtitles from the input video. The unit price depends on the subtitle source method used.
    • Video subtitle translation: The unit price is fixed, but the total cost also depends on the number of target languages. When using the operator for subtitle translation, if translation into multiple languages is required, a subtitle translation fee will be incurred for each language.
  • 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

    • Example scenario: Input a 5-minute Chinese video, select OCR high accuracy as the subtitle source method, and translate the video subtitles into English and Japanese.
    • Cost details:
      Total cost = 0.25 CNY/minute * 5 minutes + 0.1 CNY/minute/item * 5 minutes * 2 items = 2.25 CNY

Caution and prerequisites

Details

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.
For details, see Obtain the Base URL. The Examples below are for reference only; when making actual calls, replace the path values with those corresponding to your region.

Rest API invocation

Submit

Interface description

Invoke the video subtitle translation operator to submit asynchronous tasks, supporting subtitle extraction, translation, and multi-format output.

Request parameters

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.

Response parameters

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.
  • PENDING, request received
  • RUNNING, running
  • COMPLETED, completed
  • FAILED, failed
  • TIMEOUT, timed out
business_code
string
0
Business code.
error_msg
string
If there is an exception, detailed error information will be returned.

Examples

Request example

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

Response example

{
    "metadata": {
        "task_id": "task-20260323153012-abc123",
        "task_status": "PENDING",
        "business_code": "0",
        "error_msg": ""
    }
}

Error codes

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.

Poll

Interface description

Query the execution status and results of video subtitle translation tasks.

Request parameters

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

Response parameters

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.
  • PENDING, task submitted and queued
  • RUNNING, running
  • COMPLETED, completed
  • FAILED, failed
  • TIMEOUT, timed out
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.

Examples

Request example

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

Response example

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

Error codes

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.

Last updated: 2026.07.28 16:11:37