Skip to Content
Create a 'generate-premium-captions' job
post

Creates a new job that generates high-quality captions for a Mux Video asset and uploads the resulting VTT as a text track.

Request body params
passthrough
string

Arbitrary string stored with the job and returned in responses. Useful for correlating jobs with your own systems.

parameters.asset_id
string

The Mux asset ID of the video to caption.

parameters.language_code
string

BCP 47 language code of the audio (e.g. "en", "es"). The language will be auto-detected when omitted.

parameters.replace_existing
boolean
(default: false)

When true, any existing text track with the same language code is deleted before uploading the new caption track. When false (default), the request is rejected if a matching track already exists.

parameters.track_name
string

Custom name for the uploaded Mux text track. Defaults to "{Language} (Generated)" using the resolved language code.

parameters.include_speakers
boolean
(default: false)

When true, speaker labels are identified and added to each caption cue. Useful for interviews, podcasts, and multi-speaker content.

parameters.include_words
boolean
(default: false)

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.

parameters.upload_to_mux
boolean
(default: true)

Whether to upload the generated VTT to the Mux asset as a new text track. Defaults to true. When false, no track is created and replace_existing must also be false; the generated SRT remains available via temporary_srt_url.

parameters.phrases
array

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.

post
202
https://api.mux.com/robots/v0/jobs/generate-premium-captions
Request
(application/json)
{
  "parameters": {
    "asset_id": "mux_asset_123abc",
    "language_code": "en",
    "replace_existing": false,
    "include_speakers": false,
    "include_words": false,
    "upload_to_mux": true,
    "phrases": [
      "Mux",
      "API"
    ]
  }
}
Response
(application/json)
{
  "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": false,
      "include_speakers": false,
      "include_words": false,
      "upload_to_mux": true,
      "phrases": [
        "Mux",
        "API"
      ]
    }
  }
}