Creates a new job that edits an existing Mux text track using static replacements, speaker-label replacements, and optional profanity censoring. Provide at least one of replacements, speaker_replacements, or auto_censor_profanity.
Arbitrary string stored with the job and returned in responses. Useful for correlating jobs with your own systems.
The Mux asset ID whose existing text track should be edited.
The existing ready Mux text track ID to edit and optionally replace.
Optional LLM-driven profanity detection and censorship rules applied to the selected caption track.
How profanity is detected. Currently only llm is supported, which uses an LLM to identify profanity in cue text.
Replacement strategy for detected profanity: blank inserts bracketed underscores, remove drops the match, and mask replaces characters with question marks. Defaults to "blank".
Additional words or short phrases that should always be censored even if the model does not detect them.
Words or short phrases that should never be censored even if the model flags them.
Optional static word or phrase replacements applied directly to cue text.
Exact word or phrase to replace in cue text.
Replacement text to insert when a match is found.
When true, find is matched only with exact case. Defaults to false (case-insensitive matching), so "gonna" also matches "Gonna" and "GONNA".
Optional replacements for bracketed speaker labels at the start of caption cues. Values omit the surrounding square brackets, and matching spoken text is not changed.
Existing speaker label without the surrounding square brackets.
New speaker label without the surrounding square brackets.
Whether to upload the edited VTT back to the Mux asset as a text track. Defaults to true.
What to do with the source track. Defaults to replace: the source is deleted and the edited track takes its place under the same name, language and closed-captions setting; no other track is touched, and the source is restored if the edited track can't be added. fail deletes nothing and adds the edited track alongside the source, so it requires a track_name different from the source's. Either way the request is rejected if a track other than the source already has the edited track's name. replace requires upload_to_mux to be true.
Name for the edited Mux text track. Defaults to the source track's name. Required and must differ from the source's name when replace_existing_tracks is fail. Mux requires text track names to be unique on an asset.
Deprecated: use replace_existing_tracks. When set, the previous behavior applies: the edited track is added as <source name> (<track_name_suffix>), then the source is deleted if this is true. Cannot be combined with replace_existing_tracks or track_name.
Deprecated: use track_name. Selects the previous naming scheme, appending this suffix to the source track's name (default "edited"). Cannot be combined with replace_existing_tracks or track_name.
{
"parameters": {
"asset_id": "mux_asset_123abc",
"track_id": "text_track_456def",
"replacements": [
{
"find": "Mucks",
"replace": "Mux",
"case_sensitive": true
},
{
"find": "gonna",
"replace": "going to"
}
],
"speaker_replacements": [
{
"find": "speaker_0",
"replace": "Alice"
}
],
"upload_to_mux": true,
"replace_existing_tracks": "replace"
}
}{
"data": {
"id": "rjob_example123",
"workflow": "edit-captions",
"status": "pending",
"units_consumed": 0,
"created_at": 1700000000,
"updated_at": 1700000060,
"parameters": {
"asset_id": "mux_asset_123abc",
"track_id": "text_track_456def",
"replacements": [
{
"find": "Mucks",
"replace": "Mux",
"case_sensitive": true
},
{
"find": "gonna",
"replace": "going to"
}
],
"speaker_replacements": [
{
"find": "speaker_0",
"replace": "Alice"
}
],
"upload_to_mux": true,
"replace_existing_tracks": "replace"
}
}
}