Skip to Content
Create a 'generate-chapters' job
post

Creates a new job that uses AI to generate chapters for a Mux Video asset. Optional output steering can guide chapter style, granularity, audience, and brand terms without changing the response schema.

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 generate chapters for.

parameters.language_code
string

BCP 47 language code of the caption source. An explicit language must match a ready source exactly, including case; for example, en does not match en-US. Translation target exclusion and track replacement instead compare base languages case-insensitively. When omitted, automatic selection applies. Uses the first ready subtitle in asset track order without English preference. Audio-only assets with one ready text track lacking subtitle metadata can use that legacy transcript.

parameters.output_language_code
string

BCP 47 language code for the output chapter titles. Auto-detected from the transcript if omitted.

Curated output_steering controls for chapter style, granularity, audience, and brand terminology. These controls guide model behavior but do not guarantee exact output.

parameters.output_steering.chapter_style
string
Possible values: "descriptive""punchy""educational""seo""platform_neutral"

Best-effort style guidance for generated chapter titles.

parameters.output_steering.chapter_granularity
string
Possible values: "coarse""balanced""fine"

Best-effort guidance for how coarse or fine chapter boundaries should be.

parameters.output_steering.audience
string

Intended audience used as best-effort model guidance. Does not change the output schema.

parameters.output_steering.brand_terms
array

Preferred brand or domain terms to use when supported by the source content. The combined length of all terms must be 240 characters or fewer.

parameters.update_asset_chapters
boolean

When true, the generated chapters are written back to the Mux asset as a chapters text track once the job completes, making them deliverable with the asset. Overwrites existing chapters: an asset holds a single chapters track, so any chapters track already on the asset is deleted and replaced — including one in a different language, and one you created yourself. Best-effort — a failed write does not fail the job — so check asset_updates.chapters in the job outputs for the outcome.

post
202
https://api.mux.com/robots/v1/jobs/generate-chapters
Request
(application/json)
{
  "parameters": {
    "asset_id": "mux_asset_123abc",
    "update_asset_chapters": true,
    "output_steering": {
      "chapter_style": "descriptive",
      "chapter_granularity": "balanced",
      "audience": "Developers"
    }
  }
}
Response
(application/json)
{
  "data": {
    "id": "rjob_example123",
    "workflow": "generate-chapters",
    "status": "pending",
    "units_consumed": 0,
    "created_at": 1700000000,
    "updated_at": 1700000060,
    "parameters": {
      "asset_id": "mux_asset_123abc",
      "update_asset_chapters": true,
      "output_steering": {
        "chapter_style": "descriptive",
        "chapter_granularity": "balanced",
        "audience": "Developers"
      }
    }
  }
}