Creates a new job that generates high-quality captions for a Mux Video asset.
Arbitrary string stored with the job and returned in responses. Useful for correlating jobs with your own systems.
The Mux asset ID of the video to caption.
BCP 47 language code of the audio (e.g. "en", "es"). A best-effort hint that biases transcription toward this language — it is not verified against the audio and does not guarantee the output language. When supplied, language detection is skipped and the captions are labeled with this code. The language will be auto-detected when omitted; existing tracks are then checked against replace_existing_tracks after transcription, so a same-language conflict errors the job at track creation instead of being rejected up front, and a deleting policy only applies when the detection is confident.
What to do when the asset already has a text track in the same language as, or with the same name as, the new caption track. Defaults to fail, which rejects the request before any work is billed. replace_all deletes every such track first. replace_generated deletes only Mux Video auto-generated tracks and rejects if an uploaded track is in the way. Existing tracks are matched by language ignoring region subtags, and by name ignoring case, in any status. When language_code is omitted the detected language is used, and tracks are only deleted when the detection is confident; otherwise the job behaves as fail.
Deprecated: use replace_existing_tracks. true behaves as replace_all and false as fail. true cannot be combined with replace_existing_tracks; false is ignored when both are present.
Custom name for the uploaded Mux text track. Defaults to "{Language} (Generated)", e.g. "English (Generated)". Mux requires text track names to be unique on an asset.
When true, speaker labels are identified and added to each caption cue. Useful for interviews, podcasts, and multi-speaker content.
When true, word-level timestamps are exported as a JSON file accessible via temporary_words_url in the job outputs. The URL expires 7 days after the job completes. Billed at a higher unit rate.
Whether to upload the generated SRT to the Mux asset as a new text track. Defaults to true. When false, no track is created and replace_existing_tracks must be fail; the generated SRT remains available via temporary_srt_url.
Best-effort list of words or short phrases (proper nouns, product names, jargon) likely to appear in the audio, used to bias recognition toward correct spellings. Does not guarantee exact output. Each phrase may contain at most 49 characters and 5 words, and must not contain the characters <, >, {, }, [, ], or .
{
"parameters": {
"asset_id": "mux_asset_123abc",
"language_code": "en",
"replace_existing_tracks": "fail",
"include_speakers": false,
"include_words": false,
"upload_to_mux": true,
"phrases": [
"Mux",
"API"
]
}
}{
"data": {
"id": "rjob_example123",
"workflow": "generate-premium-captions",
"status": "pending",
"units_consumed": 0,
"created_at": 1700000000,
"updated_at": 1700000060,
"parameters": {
"asset_id": "mux_asset_123abc",
"language_code": "en",
"replace_existing_tracks": "fail",
"include_speakers": false,
"include_words": false,
"upload_to_mux": true,
"phrases": [
"Mux",
"API"
]
}
}
}