Skip to Content
Create a 'moderate' job
post

Creates a new job that uses AI to analyze a Mux Video asset for inappropriate content.

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 moderate.

parameters.language_code
string
(default: en)

BCP 47 language code for transcript analysis. Used only for audio-only assets; ignored for video assets with visual content. If omitted for audio-only assets, the first ready text track is used. Defaults to "en".

Score thresholds that determine whether content is flagged. When combined with sampling_interval or max_samples, the exceeds_threshold flag reflects whether any category's highest observed score exceeds its configured threshold. Defaults to {sexual: 0.7, violence: 0.8}.

parameters.thresholds.sexual
number
(min: 0, max: 1)

Score threshold for sexual content. Content scoring above this value triggers exceeds_threshold.

parameters.thresholds.violence
number
(min: 0, max: 1)

Score threshold for violent content. Content scoring above this value triggers exceeds_threshold.

parameters.sampling_interval
integer
(min: 5)

Interval, in seconds, between sampled thumbnails. Minimum 5 seconds. When max_samples is also set, the actual sampling density is the more restrictive of the two constraints.

parameters.max_samples
integer
(min: 1)

Maximum number of thumbnails to sample. Acts as a cap — if sampling_interval produces fewer samples than this limit, the interval is respected; otherwise samples are evenly distributed with first and last frames pinned.

post
202
/robots/v0/jobs/moderate
Request
(application/json)
{
  "parameters": {
    "asset_id": "mux_asset_123abc",
    "thresholds": {
      "sexual": 0.7,
      "violence": 0.8
    }
  }
}
Response
(application/json)
{
  "data": {
    "id": "rjob_example123",
    "workflow": "moderate",
    "status": "pending",
    "units_consumed": 0,
    "created_at": 1700000000,
    "updated_at": 1700000060,
    "parameters": {
      "asset_id": "mux_asset_123abc",
      "thresholds": {
        "sexual": 0.7,
        "violence": 0.8
      }
    }
  }
}