AI Subtitle Recognition

The enum values printed on this page are a snapshot. The machine-readable source of truth is the Enum Catalog — where the two disagree, that one wins.

Run speech recognition on audio or video, generate subtitles automatically, and choose from several subtitle styles and colors. Subtitles can optionally be burned into the video.

This API supports both video and audio files as input. A video upload gets the full feature set; an audio upload (for example, audio extracted locally so a multi-GB source shrinks to tens of MB) goes through the same recognition and subtitle pipeline and produces the same .ass subtitle file, full transcription, and content summary. Audio has no picture, so the burn-in (need_render) and subtitle-removal (need_pure) parameters are unavailable — see "Input Files and Supported Formats" below.

Subtitles can also be translated in the same pass (translate_language), producing translated or bilingual subtitles.

Already have a subtitle file? You do not need this capability — re-running speech recognition is slower and would discard your existing proofreading. Use AI Subtitle Translation instead: it takes .ass / .srt directly and is billed per character.

In one line: use this page to recognize subtitles from audio or video; use AI Subtitle Translation to move existing subtitles into another language.

⚠️ Behavior change (2026-08-22): As of 2026-08-22, this API strips Chinese and English commas and periods from subtitle text by default (strip_punctuation defaults to true, see the parameter table below), so identical requests produce different subtitle text than before the upgrade; timecodes, line counts, and all other output fields are unchanged. To keep the previous behavior, pass strip_punctuation: false explicitly.

Create Task

Basic Information

ItemValue
Request MethodPOST
Request Path/task/video_ai_subtitle
Content-Typeapplication/json
AuthenticationRaw API key in the Authorization header

Request Body

ParameterTypeRequiredDefaultDescription
file_idstringYes-Uploaded video or audio file ID. See "Input Files and Supported Formats" below
languagestringYes-Subtitle source language code. See the full supported list below
translate_languagestringNo-Subtitle target language code for translation. It uses the same supported set as language
need_renderbooleanNofalseWhether to burn subtitles into the video. Video input only: passing true with an audio input is rejected at task creation (HTTP 400, error code 6016)
need_purebooleanNofalseWhether to remove existing subtitles before generating new ones. Video input only: passing true with an audio input is rejected at task creation (HTTP 400, error code 6016)
video_sizearrayNo-Source canvas geometry [width, height] (two positive integers). Effective for audio input only: when uploading locally extracted audio, pass the source video's real dimensions so the server picks the matching subtitle style tier and ASS canvas (PlayResX/Y); without it the server falls back to 1920x1080 (a source with a different aspect ratio will land on the wrong style tier). For video input the probed dimensions win and this field is ignored
lingual_typestringNo"bilingual"monolingual or bilingual. See the gallery below for examples
subtitle_typestringNo"default"Subtitle style preset: default, outline, cinema_yellow, immersive_box, wide_spacing, deep_shadow, or boxed. See the gallery below for examples
subtitle_colorstringNo"雅黑"Subtitle color preset: 雅黑, 淡绿, 森林绿, 湖蓝, 道奇蓝, 钢蓝, 浅粉红, 深橙, 珊瑚橙, 橙红, or 土豪金
strip_punctuationbooleanNotruePunctuation stripping for subtitle text: stripping is on by default (punctuation looks poor in subtitles) — Chinese , 。 and English , . are replaced with spaces, in-word forms are exempt (decimals 3.5, domains example.com, thousands separators 1,000 stay intact), and all other punctuation (quotes, question marks, exclamation marks, dashes, etc.) is kept; consecutive spaces collapse to one and line edges are trimmed. Only the subtitle text is affected — timecodes, line counts, and all other output fields are unchanged. Pass false explicitly to keep punctuation intact
subtitle_formatstringNo"ass"Subtitle output format: ass returns only .ass, srt returns only .srt, both returns both. Style parameters (subtitle_type / subtitle_color) affect the .ass file and the burned-in video only — .srt is a plain-text timecode format and carries no outline, box, or color. Passing them alongside srt is not an error, but the resulting .srt has no styling. Burn-in (need_render) always uses the styled .ass regardless of this setting. For bilingual output the .srt is a single file with two lines per cue (translation on top, source below) rather than two per-language files. Values outside the enum fall back to the default ass without an error

Input Files and Supported Formats

This API accepts both video and audio uploads; the server detects the type from the file extension:

Input typeSupported formats
Video.mp4 .avi .mpg .mov .flv .mxf .mpeg .3gp .wmv .h264 .m4v .ts
Audio.wav .mp3 .m4a .ape .aac .ogg .flac .wma

.ogg is a common container for both audio and video; this API always treats it as audio.

Behavior differences for audio input (all other parameters and outputs match video exactly):

  • Outputs: the .ass subtitle file, full transcription JSON, and content summary are produced as usual; rendered_file_id and pure_file_id (and their download URLs) are always empty strings.
  • need_render / need_pure unavailable: both are picture operations. Passing true with an audio input is rejected at task creation (HTTP 400, error code 6016, with the rejected parameters named in the message); passing false explicitly, or omitting them, is accepted as usual.
  • Pass video_size when you can: audio has no picture to probe, so send the source video's real [width, height] to keep the subtitle style tier and canvas aligned with the source.
  • Same billing: billed by media duration in minutes, identical to video.

Typical usage: for a large video, extract the audio locally and upload only the audio together with video_size — the subtitle output matches a full-video upload while the upload shrinks from several GB to tens of MB.

Supported Language Codes

language (the source language for recognition) and translate_language (the translation target language) are drawn from the same code table, but their available sets differ — recognition requires a matching speech recognition engine, translation does not. The table below marks availability per parameter:

Language codeLanguage nameAs language (source language)As translate_language (translation target)
zh-CHTTraditional Chinese✅✅
zh-CHSSimplified Chinese✅✅
zh-CNChinese✅✅
ja-JPJapanese✅✅
en-USEnglish✅✅
es-ESSpanish✅✅
ru-RURussian✅✅
ko-KRKorean✅✅
fr-FRFrench✅✅
pt-PTPortuguese✅✅
vi-VNVietnamese✅✅

All 11 codes above are usable in both parameter positions. Passing a code outside the table returns error code 6015 synchronously at submission — no charge, no queueing.

Tip: When lingual_type is bilingual, explicitly pass translate_language and make sure it also comes from the list above.

The gallery below covers all 7 currently supported subtitle_type presets, with examples for:

  • monolingual and bilingual
  • 1080x1920, 1920x1080, 2160x3840, 3840x2160, 480x848, and 848x480

Use the matching subtitle_type parameter value shown in each style section.

Default

default

Each style includes 12 example images

Bilingual / bilingual

Portrait / portrait

Default subtitle style example, Bilingual / bilingual, 480x848
480x848
Default subtitle style example, Bilingual / bilingual, 1080x1920
1080x1920
Default subtitle style example, Bilingual / bilingual, 2160x3840
2160x3840

Landscape / landscape

Default subtitle style example, Bilingual / bilingual, 848x480
848x480
Default subtitle style example, Bilingual / bilingual, 1920x1080
1920x1080
Default subtitle style example, Bilingual / bilingual, 3840x2160
3840x2160

Monolingual / monolingual

Portrait / portrait

Default subtitle style example, Monolingual / monolingual, 480x848
480x848
Default subtitle style example, Monolingual / monolingual, 1080x1920
1080x1920
Default subtitle style example, Monolingual / monolingual, 2160x3840
2160x3840

Landscape / landscape

Default subtitle style example, Monolingual / monolingual, 848x480
848x480
Default subtitle style example, Monolingual / monolingual, 1920x1080
1920x1080
Default subtitle style example, Monolingual / monolingual, 3840x2160
3840x2160

Outline

outline

Each style includes 12 example images

Bilingual / bilingual

Portrait / portrait

Outline subtitle style example, Bilingual / bilingual, 480x848
480x848
Outline subtitle style example, Bilingual / bilingual, 1080x1920
1080x1920
Outline subtitle style example, Bilingual / bilingual, 2160x3840
2160x3840

Landscape / landscape

Outline subtitle style example, Bilingual / bilingual, 848x480
848x480
Outline subtitle style example, Bilingual / bilingual, 1920x1080
1920x1080
Outline subtitle style example, Bilingual / bilingual, 3840x2160
3840x2160

Monolingual / monolingual

Portrait / portrait

Outline subtitle style example, Monolingual / monolingual, 480x848
480x848
Outline subtitle style example, Monolingual / monolingual, 1080x1920
1080x1920
Outline subtitle style example, Monolingual / monolingual, 2160x3840
2160x3840

Landscape / landscape

Outline subtitle style example, Monolingual / monolingual, 848x480
848x480
Outline subtitle style example, Monolingual / monolingual, 1920x1080
1920x1080
Outline subtitle style example, Monolingual / monolingual, 3840x2160
3840x2160

Cinema Yellow

cinema_yellow

Each style includes 12 example images

Bilingual / bilingual

Portrait / portrait

Cinema Yellow subtitle style example, Bilingual / bilingual, 480x848
480x848
Cinema Yellow subtitle style example, Bilingual / bilingual, 1080x1920
1080x1920
Cinema Yellow subtitle style example, Bilingual / bilingual, 2160x3840
2160x3840

Landscape / landscape

Cinema Yellow subtitle style example, Bilingual / bilingual, 848x480
848x480
Cinema Yellow subtitle style example, Bilingual / bilingual, 1920x1080
1920x1080
Cinema Yellow subtitle style example, Bilingual / bilingual, 3840x2160
3840x2160

Monolingual / monolingual

Portrait / portrait

Cinema Yellow subtitle style example, Monolingual / monolingual, 480x848
480x848
Cinema Yellow subtitle style example, Monolingual / monolingual, 1080x1920
1080x1920
Cinema Yellow subtitle style example, Monolingual / monolingual, 2160x3840
2160x3840

Landscape / landscape

Cinema Yellow subtitle style example, Monolingual / monolingual, 848x480
848x480
Cinema Yellow subtitle style example, Monolingual / monolingual, 1920x1080
1920x1080
Cinema Yellow subtitle style example, Monolingual / monolingual, 3840x2160
3840x2160

Immersive Box

immersive_box

Each style includes 12 example images

Bilingual / bilingual

Portrait / portrait

Immersive Box subtitle style example, Bilingual / bilingual, 480x848
480x848
Immersive Box subtitle style example, Bilingual / bilingual, 1080x1920
1080x1920
Immersive Box subtitle style example, Bilingual / bilingual, 2160x3840
2160x3840

Landscape / landscape

Immersive Box subtitle style example, Bilingual / bilingual, 848x480
848x480
Immersive Box subtitle style example, Bilingual / bilingual, 1920x1080
1920x1080
Immersive Box subtitle style example, Bilingual / bilingual, 3840x2160
3840x2160

Monolingual / monolingual

Portrait / portrait

Immersive Box subtitle style example, Monolingual / monolingual, 480x848
480x848
Immersive Box subtitle style example, Monolingual / monolingual, 1080x1920
1080x1920
Immersive Box subtitle style example, Monolingual / monolingual, 2160x3840
2160x3840

Landscape / landscape

Immersive Box subtitle style example, Monolingual / monolingual, 848x480
848x480
Immersive Box subtitle style example, Monolingual / monolingual, 1920x1080
1920x1080
Immersive Box subtitle style example, Monolingual / monolingual, 3840x2160
3840x2160

Wide Spacing

wide_spacing

Each style includes 12 example images

Bilingual / bilingual

Portrait / portrait

Wide Spacing subtitle style example, Bilingual / bilingual, 480x848
480x848
Wide Spacing subtitle style example, Bilingual / bilingual, 1080x1920
1080x1920
Wide Spacing subtitle style example, Bilingual / bilingual, 2160x3840
2160x3840

Landscape / landscape

Wide Spacing subtitle style example, Bilingual / bilingual, 848x480
848x480
Wide Spacing subtitle style example, Bilingual / bilingual, 1920x1080
1920x1080
Wide Spacing subtitle style example, Bilingual / bilingual, 3840x2160
3840x2160

Monolingual / monolingual

Portrait / portrait

Wide Spacing subtitle style example, Monolingual / monolingual, 480x848
480x848
Wide Spacing subtitle style example, Monolingual / monolingual, 1080x1920
1080x1920
Wide Spacing subtitle style example, Monolingual / monolingual, 2160x3840
2160x3840

Landscape / landscape

Wide Spacing subtitle style example, Monolingual / monolingual, 848x480
848x480
Wide Spacing subtitle style example, Monolingual / monolingual, 1920x1080
1920x1080
Wide Spacing subtitle style example, Monolingual / monolingual, 3840x2160
3840x2160

Deep Shadow

deep_shadow

Each style includes 12 example images

Bilingual / bilingual

Portrait / portrait

Deep Shadow subtitle style example, Bilingual / bilingual, 480x848
480x848
Deep Shadow subtitle style example, Bilingual / bilingual, 1080x1920
1080x1920
Deep Shadow subtitle style example, Bilingual / bilingual, 2160x3840
2160x3840

Landscape / landscape

Deep Shadow subtitle style example, Bilingual / bilingual, 848x480
848x480
Deep Shadow subtitle style example, Bilingual / bilingual, 1920x1080
1920x1080
Deep Shadow subtitle style example, Bilingual / bilingual, 3840x2160
3840x2160

Monolingual / monolingual

Portrait / portrait

Deep Shadow subtitle style example, Monolingual / monolingual, 480x848
480x848
Deep Shadow subtitle style example, Monolingual / monolingual, 1080x1920
1080x1920
Deep Shadow subtitle style example, Monolingual / monolingual, 2160x3840
2160x3840

Landscape / landscape

Deep Shadow subtitle style example, Monolingual / monolingual, 848x480
848x480
Deep Shadow subtitle style example, Monolingual / monolingual, 1920x1080
1920x1080
Deep Shadow subtitle style example, Monolingual / monolingual, 3840x2160
3840x2160

Boxed

boxed

Each style includes 12 example images

Bilingual / bilingual

Portrait / portrait

Boxed subtitle style example, Bilingual / bilingual, 480x848
480x848
Boxed subtitle style example, Bilingual / bilingual, 1080x1920
1080x1920
Boxed subtitle style example, Bilingual / bilingual, 2160x3840
2160x3840

Landscape / landscape

Boxed subtitle style example, Bilingual / bilingual, 848x480
848x480
Boxed subtitle style example, Bilingual / bilingual, 1920x1080
1920x1080
Boxed subtitle style example, Bilingual / bilingual, 3840x2160
3840x2160

Monolingual / monolingual

Portrait / portrait

Boxed subtitle style example, Monolingual / monolingual, 480x848
480x848
Boxed subtitle style example, Monolingual / monolingual, 1080x1920
1080x1920
Boxed subtitle style example, Monolingual / monolingual, 2160x3840
2160x3840

Landscape / landscape

Boxed subtitle style example, Monolingual / monolingual, 848x480
848x480
Boxed subtitle style example, Monolingual / monolingual, 1920x1080
1920x1080
Boxed subtitle style example, Monolingual / monolingual, 3840x2160
3840x2160

Optional content Object

You can pass extra context through content to improve subtitle accuracy.

ParameterTypeDescription
content.video_titlestringVideo title
content.video_infostringSummary or description of the video

Request Example

curl -X POST https://api.ai-mcn.tv:10000/task/video_ai_subtitle \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "file_id": "537489015178246",
    "language": "zh-CN",
    "translate_language": "en-US",
    "need_render": true,
    "lingual_type": "bilingual",
    "subtitle_type": "outline",
    "subtitle_color": "雅黑"
  }'

Success Example

{
  "code": 200,
  "msg": "success",
  "data": {
    "task_id": "537489015178247",
    "task_type": "video_ai_subtitle",
    "status": "queued"
  }
}

Query Task Result

Basic Information

ItemValue
Request MethodGET
Request Path/task/video_ai_subtitle/{task_id}
AuthenticationRaw API key in the Authorization header

Output Result (output_result)

ParameterTypeDescription
rendered_file_idstringVideo file ID with burned-in subtitles, non-empty only when need_render: true
rendered_file_download_urlstringDownload URL of the rendered video
pure_file_idstringCleaned (subtitle-removed) video file ID, non-empty only when need_pure: true
pure_file_download_urlstringDownload URL of the cleaned video
subtitle_file_idstringASS subtitle file ID. Always refers to the .ass file; its meaning does not change with subtitle_format. Empty string when subtitle_format is srt
subtitle_file_download_urlstringDownload URL of the ASS subtitle file
srt_file_idstringSubRip (.srt) subtitle file ID. Non-empty when subtitle_format is srt or both, empty string otherwise
srt_file_download_urlstringDownload URL of the SubRip subtitle file
summarystringVideo content summary (at most 500 characters)
asr_file_idstringFile ID of the full transcription JSON (word-level timestamps word_tc_list plus full text asr_text)
asr_download_urlstringDownload URL of the full transcription JSON

The full transcription is delivered as a JSON file instead of being inlined in output_result. Output files share the same lifecycle as other media outputs (cleaned up on expiry); download and archive them promptly after the task completes.

For audio input, rendered_file_id / pure_file_id and their download URLs are always empty strings (audio has no picture to burn into or clean up).

Success Example

{
  "code": 200,
  "msg": "success",
  "data": {
    "task_id": "537489015178247",
    "status": "completed",
    "progress": 100,
    "output_result": {
      "rendered_file_id": "537489015178248",
      "rendered_file_download_url": "https://api.ai-mcn.tv:9000/cloud/file/cd/537489015178248.mp4",
      "pure_file_id": "",
      "pure_file_download_url": "",
      "subtitle_file_id": "537489015178249",
      "subtitle_file_download_url": "https://api.ai-mcn.tv:9000/cloud/file/ef/537489015178249.ass",
      "srt_file_id": "",
      "srt_file_download_url": "",
      "summary": "A short demo video about the test clip.",
      "asr_file_id": "537489015178250",
      "asr_download_url": "https://api.ai-mcn.tv:9000/cloud/file/ab/537489015178250.json"
    },
    "create_time": "2026-04-05T08:00:00Z",
    "update_time": "2026-04-05T08:01:30Z"
  }
}

Error Codes

Error CodeHTTP StatusDescriptionResolution
6013400Missing file_id or languageAdd the required fields
6015400Unsupported language codeUse one of the supported language codes listed above
6016400Invalid parameters: need_render / need_pure passed as true with an audio input, or malformed video_sizeFor audio input, drop the two parameters to get subtitles only (or upload a video instead); pass video_size as two positive integers [width, height]
6014400File extension does not match this task typeUse a video or audio format listed under "Input Files and Supported Formats"
6004404File not foundVerify the file_id
6502401Authentication failedCheck the Authorization header
6202402Insufficient balanceRecharge in the Dashboard