Skip to Content
Create a 'translate-captions' job
post

Creates a new job that translates captions on a Mux Video asset from one language to another.

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 whose captions will be translated.

parameters.track_id
string

The Mux text track ID of the source caption track to translate. The asset must have a ready text track matching this ID or the request will be rejected.

parameters.to_language_code
string

BCP 47 language code for the translated output (e.g. "es", "ja"). The asset must not already have a text track for this language.

parameters.upload_to_mux
boolean
(default: true)

Whether to upload the translated VTT and attach it as a text track on the Mux asset. Defaults to true.

post
202
/robots/v0/jobs/translate-captions
Request
(application/json)
{
  "parameters": {
    "asset_id": "mux_asset_123abc",
    "track_id": "track_en_abc123",
    "to_language_code": "es",
    "upload_to_mux": true
  }
}
Response
(application/json)
{
  "data": {
    "id": "rjob_example123",
    "workflow": "translate-captions",
    "status": "pending",
    "units_consumed": 0,
    "created_at": 1700000000,
    "updated_at": 1700000060,
    "parameters": {
      "asset_id": "mux_asset_123abc",
      "track_id": "track_en_abc123",
      "to_language_code": "es",
      "upload_to_mux": true
    }
  }
}