The Mux Robots API runs AI workflows on your videos with one API request. Use it to summarize, moderate, caption, or translate videos without your own AI pipeline.
The Mux Robots API uses AI to extract structured data from your videos. Instead of integrating third-party AI services, managing async job queues, handling retries and failures, and writing custom glue code to tie it all together, you can send a single API request with an asset ID and get results back directly.
The Robots API is our recommended, batteries-included approach for adding AI to your video workflows — it handles model selection, prompting, retries, and webhook delivery so you can focus on using the results.
Robots is priced per Mux AI unit consumed by each job. The first 100,000 units each month are free. See Mux Robots pricing for rates.
Workflows that analyze, generate, or translate language share a set of verified languages and language tags. Languages outside that set are processed on a best-effort basis.
Running more than one workflow?
To run several workflows against the same asset in the right order, or to trigger them automatically when an asset is ingested, use Directives. Directives are the orchestration layer that dispatches Robots jobs on your behalf.
Need more control?
If you want to build your own AI workflows from lower-level primitives (transcripts, embeddings, custom prompts, your choice of LLM provider), check out @mux/ai — our open-source TypeScript SDK. It's a great fit when you need to customize the pipeline beyond what the Robots API exposes.
Start with the result you need and how much of the pipeline you want to own:
| Approach | Choose it when | Examples | What you manage |
|---|---|---|---|
| Mux Robots | A workflow from the full catalog fits and you want Mux to run it as a managed job. | Moderate uploads, generate chapters, summarize a library, or translate captions. Use Directives to coordinate workflows on new uploads. | Mux credentials, workflow parameters, prerequisites, and consuming the results. Mux manages models, provider credentials, execution, and job status. |
@mux/ai | You need custom prompts, model/provider choices, or a pipeline beyond the Robots controls. | Customize a video-analysis workflow or compose transcript and frame primitives with your own logic. | Your application runtime, chosen provider credentials and costs, orchestration, persistence, and failure handling. |
| Your own transcript + LLM call | A narrow text task only needs an existing transcript and you are comfortable owning the integration. | Classify one transcript using an existing application prompt. | Transcript access, provider credentials and costs, context limits, retries, and result validation. Add a video/frame pipeline if the task needs visual evidence. |
For production apps, prefer Robots when a built-in workflow meets the need. Use its documented parameters and output_steering controls before building a custom pipeline. Frame analysis is available in both Robots and @mux/ai; visual input alone does not require choosing one over the other. A transcript-only call cannot establish what is visible in the video.
All three approaches may involve Mux asset/storage costs. Robots jobs consume Mux AI units; custom pipelines use your own AI-provider billing. See pricing and the chosen workflow's prerequisites before running a batch.
| Workflow | Category | Description |
|---|---|---|
| Generate premium captions | Accessibility | Generate high-accuracy captions from a video's audio, with optional speaker diarization and word-level timestamps |
| Edit a video's captions | Accessibility | Edit an existing caption track with static replacements and profanity censoring |
| Translate captions | Accessibility | Translate existing captions to another language |
| Translate audio | Accessibility | Translate (dub) a video's spoken audio into another language |
| Summarize | Insights | Generate a title, description, and tags for a video |
| Ask questions | Insights | Ask questions about a video and get structured answers |
| Find key moments | Insights | Identify the most compelling moments in a video |
| Find best thumbnails | Insights | Sample, score, and rank the best thumbnail frames from a video |
| Generate engagement insights | Insights | Turn viewer engagement data into plain-language insights for a video |
| Generate contextual text | Insights | Create social posts, blog posts, and other written artifacts from video or audio |
| Analyze structure | Structure | Generate a title, summary, tags, chapters, scenes, and key moments together |
| Generate chapters | Structure | Create timestamped chapters from video content |
| Moderate | Trust & Safety | Analyze a video for inappropriate content |
Most workflows accept output_steering to guide style, audience, terminology, and which part of the video is analyzed. See each workflow's guide for its options.
Use a ready asset in the same environment as your token. It must no longer be live and must have a public or signed playback ID; DRM-only playback IDs are not supported. Pass the asset ID to the job, even when the workflow reads media through a playback ID.
Required resources must be ready before a standalone job is created. Recommended resources improve output, but are not mandatory unless the table identifies a specific input or mode that requires them.
| Workflow | Caption or transcript requirement | Other inputs and readiness |
|---|---|---|
| Generate premium captions | No existing captions needed. | Requires audio. Reuses or temporarily creates an audio-only static rendition. Keep upload_to_mux: true when another workflow needs the generated track. |
| Edit captions | Required: a specific ready source track, selected by track_id. | The track must belong to the asset. Check the replacement policy before writing edited captions back. |
| Translate captions | Required: a specific ready source track, selected by track_id. | Choose output_language_code; check existing target-language tracks and the replacement policy. |
| Translate audio | No caption prerequisite. | Requires audio. Reuses or temporarily creates an audio-only static rendition. For an audio-only asset, set upload_to_mux: false to receive downloadable audio. |
| Summarize | Recommended for video; required for audio-only assets. | Video can fall back to sampled visual content. |
| Ask questions | Recommended for video; required for audio-only assets. | Provide questions that the available transcript or visual evidence can answer. |
| Find key moments | Required for transcript-based selection. Optional for video with use_shots: true. | Shot-based selection generates or reuses shots and is not supported for audio-only assets. |
| Find best thumbnails | No caption prerequisite. | Requires video; audio-only assets are rejected. Shot detection can improve sampling but is not a resource you must prepare first. |
| Generate engagement insights | No caption prerequisite. | Requires accumulated Mux Data engagement metrics; a fresh asset without viewing data has nothing to analyze. |
| Generate contextual text | Required: ready captions or a supported audio-only transcript. | A storyboard adds context for video. use_shots: true generates or reuses shots and is rejected for audio-only assets. |
| Analyze structure | Recommended for video; required for audio-only assets. | Visual evidence can be used for video without captions. See the guide for shot-analysis controls. |
| Generate chapters | Required: ready captions. | The asset must also contain audio. |
| Moderate | Optional for video; required for audio-only assets. | Video moderation samples frames and also moderates the transcript when captions are ready, unless include_transcript is false. Audio-only moderation uses the transcript. |
This table covers the public v1 workflows. Check each workflow's guide and API reference for duration limits, supported languages, and parameter-specific restrictions.
For new uploads, enable auto-generated captions in the asset inputs. For an existing asset, request captions or upload subtitles, or run Generate premium captions.
Retrieve the asset and wait for the source text track to have status: "ready". In v1, caption sources are subtitle tracks (type: "text", text_type: "subtitles"). An audio-only asset may also use its single ready legacy text transcript without subtitle metadata. A chapter track is not a subtitle source. Asset readiness and caption readiness are separate: video.asset.ready does not guarantee the track is ready. Use video.asset.track.ready or bounded polling of the asset's tracks.
When language_code selects a caption source, it must match the ready track's language exactly, including case and region: en does not match en-US. Without it, automatic selection uses the first ready subtitle in asset track order. Edit and translate captions instead identify the source with track_id. Retrieve that ID from the asset; do not use a job ID or a playback ID.
If a source track is still preparing, wait. If it failed, is missing, or is in the wrong language, repair or choose the source before retrying the same job. A successful premium-caption job with upload_to_mux: false supplies a temporary subtitle URL, not a track that downstream workflows can select.
For recurring work, declare prerequisites as resources and reference them in each binding's inputs. This v1 configuration generates subtitles when needed and waits for them before chapter generation:
{
"name": "Prepare subtitles and generate chapters",
"subject": { "type": "video.asset" },
"resources": [
{
"reference_id": "captions",
"type": "video.asset.track",
"kind": "subtitles",
"source": { "via": "mux_api", "action": "generate_subtitles" }
}
],
"bindings": [
{
"reference_id": "chapters",
"workflow": "generate-chapters",
"inputs": ["captions"],
"parameters": {}
}
]
}Create the Directive with POST /robots/v1/directives, then attach it to new assets or start a run for an existing asset as described in the Directives guide. A subtitle-generating action still needs an audio source. Inspect the run's node states if a resource or producer fails; declaring the dependency does not guarantee it can be produced. Shot generation may incur separate Mux Video charges.
The Robots API is organized around jobs. A job represents a single unit of work — one row from the table above. Each type of work is called a workflow.
The general pattern is:
pending → processing → completed (or errored). A job can also be cancelled via the cancel endpoint. We strongly encourage using webhooks for status changes, but jobs can also be retrieved through the GET /robots/v1/jobs/{workflow}/{JOB_ID} endpoint.outputs field once the status is completed.Jobs are automatically deleted after 30 days.
Every status change fires a webhook event. This lets you react to completed jobs without polling. The event type follows the pattern robots.v1.job.{workflow}.{status}:
| Event type | Description |
|---|---|
robots.v1.job.{workflow}.pending | Job was created and is waiting to be picked up. |
robots.v1.job.{workflow}.processing | Job is actively running. |
robots.v1.job.{workflow}.completed | Job finished successfully. The full job object, including outputs, is in event.data. |
robots.v1.job.{workflow}.errored | Job failed. Check event.data.errors for details. |
robots.v1.job.{workflow}.cancelled | Job was cancelled before it completed. |
For example, a completed moderation job sends a robots.v1.job.moderate.completed event. A completed summarization job sends robots.v1.job.summarize.completed.
Note that multi-word workflow names use underscores in event types (e.g. robots.v1.job.ask_questions.completed, robots.v1.job.find_key_moments.completed), even though the API endpoints use hyphens.
The webhook payload's data field contains the full job object — the same shape you'd get from polling the job endpoint — so you can read outputs directly from the event without making an additional API call.
All Robots API endpoints live under /robots/v1/.
The Robots API uses the same Mux API token authentication as the rest of the Mux API. Include your token ID and secret using HTTP Basic Auth.
Required permissions
Select Mux Robots when creating an access token in the Mux Dashboard. Use Read (robots:read) to read workflows, jobs, and Directives, and Write (robots:write) to create jobs or manage Directives. Select both for a create-and-retrieve workflow. Also select Mux Video permissions for asset operations your integration performs.
Existing tokens cannot gain permissions: create a replacement if yours lacks Robots access, then update your application credentials. Tokens must belong to the same environment as the assets and jobs. If the organization has not enabled Robots, an admin must complete the enablement step linked in the API error.
curl https://api.mux.com/robots/v1/jobs/summarize \
-H "Content-Type: application/json" \
-X POST \
-d '{ "parameters": { "asset_id": "YOUR_ASSET_ID" } }' \
-u ${MUX_TOKEN_ID}:${MUX_TOKEN_SECRET}Every job includes the following common fields:
| Field | Description |
|---|---|
id | Unique job identifier |
status | Current status: pending, processing, completed, errored, or cancelled |
workflow | The workflow type (e.g. summarize, moderate) |
created_at | Unix timestamp when the job was created |
updated_at | Unix timestamp when the job was last updated |
passthrough | An arbitrary string you can include when creating the job, returned as-is in responses |
parameters | The input parameters for this job. Varies by workflow — see each workflow's guide for details. |
outputs | Workflow results, present when status is completed |
units_consumed | Number of Mux AI units consumed by this job |
errors | Error details, present when status is errored. See the Robots API referenceAPI for the full error structure. |
resources | Related Mux resources linked to this job |
directive | The Directive and run that dispatched this job, with id and run_id. Absent for jobs created with a direct API request. |
You can retrieve, list, and cancel jobs across all workflows.
Retrieve a job by workflow and job ID:
curl https://api.mux.com/robots/v1/jobs/{workflow}/{JOB_ID} \
-u ${MUX_TOKEN_ID}:${MUX_TOKEN_SECRET}Replace {workflow} with the workflow name used when the job was created (e.g. summarize, moderate, generate-chapters). The response includes the full job object with outputs when the job is completed.
List jobs with optional filters:
curl "https://api.mux.com/robots/v1/jobs?workflow=summarize&status=completed&limit=10" \
-u ${MUX_TOKEN_ID}:${MUX_TOKEN_SECRET}You can filter by workflow, status, asset_id, and paginate with limit (default 25, max 100) and page (default 1). Each entry is a summary with id, workflow, status, created_at, updated_at, and _links.self; follow _links.self.href to retrieve the full job.
Cancel a job that is pending or processing. The job's status will transition to cancelled:
curl -X POST https://api.mux.com/robots/v1/jobs/{JOB_ID}/cancel \
-u ${MUX_TOKEN_ID}:${MUX_TOKEN_SECRET}