# Find Key Moments

> Robots API reference, generated from the OpenAPI spec.

Identify key moments in a video.

HTML version: https://www.mux.com/docs/api-reference/robots/find-key-moments. Full OpenAPI spec: https://www.mux.com/api-spec.json

Operations on this page:

- Create a 'find-key-moments' job: `POST /robots/v1/jobs/find-key-moments`
- Get a 'find-key-moments' job: `GET /robots/v1/jobs/find-key-moments/{JOB_ID}`

## Create a 'find-key-moments' job

`POST https://api.mux.com/robots/v1/jobs/find-key-moments`

Creates a new job that uses AI to identify key moments in a Mux Video asset. Set use_shots to true to automatically generate or reuse Mux shots and use visual evidence during selection, with transcript evidence incorporated when available; otherwise selection uses transcript evidence and the asset must have a caption track. Audio-only assets always use transcript evidence and require a caption track. Optional output steering can restrict execution to a time scope in seconds and guide selection strategy, title style, audience, topic taxonomy, and scoring priorities without changing the response schema. Scoped results retain absolute timestamps on the original asset timeline. 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. Audio-only analysis requires a caption source; video analysis can proceed without automatic captions when the selected mode permits it.

Operation ID: `create-find-key-moments-job`. HTML version: https://www.mux.com/docs/api-reference/robots/find-key-moments/create-find-key-moments-job

### Request body

- `passthrough` (string): Arbitrary string stored with the job and returned in responses. Useful for correlating jobs with your own systems.
- `parameters` (object, required)
  - `asset_id` (string, required, minLength: 1): The Mux asset ID of the video to analyze.
  - `max_moments` (integer, minimum: 1, maximum: 25): Maximum number of key moments to extract. When omitted, defaults to 10 for assets up to one hour and 25 for longer assets.
  - `use_shots` (boolean): Controls whether video assets are analyzed using Mux shots. When true, shots are generated or reused and visual evidence drives selection. When false or omitted, selection uses transcript evidence and the asset must have a caption track. Not supported for audio-only assets.
  - `output_steering` (object): Curated output_steering controls for execution scope, selection strategy, title style, audience, taxonomy, and rubric tie-breakers. Scope is enforced; other controls guide model behavior but do not guarantee exact output.
    - `scope` (object): Optional execution window in seconds on the original asset timeline. Omit start_time to begin at the asset start and omit end_time to continue through the asset end. Returned moment timestamps remain absolute asset timestamps. At least one of start_time and end_time is required, and start_time must be less than end_time. An end_time past the end of the media is clamped to it, and a window that starts at or after the end of the media is rejected.
      - `start_time` (number, minimum: 0): Start of the execution window in seconds from the beginning of the media. When omitted, the window starts at the beginning.
      - `end_time` (number, exclusiveMinimum: 0): End of the execution window in seconds from the beginning of the media. When omitted, the window extends to the end.
    - `selection_strategy` (string): Best-effort guidance for what qualifies as a strong standalone key moment. Possible values: `"standalone_hooks"`, `"educational_takeaways"`, `"story_beats"`, `"product_moments"`, `"speaker_highlights"`.
    - `title_style` (string): Best-effort title style guidance for generated moment titles. Possible values: `"descriptive"`, `"punchy"`, `"educational"`, `"social"`.
    - `audience` (string, minLength: 1, maxLength: 160): Intended audience used as best-effort model guidance. Does not change the output schema.
    - `brand_terms` (array of string, minItems: 1, maxItems: 10): 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. Each item: minLength: 1, maxLength: 40.
    - `topic_taxonomy` (object): Controlled vocabulary used to steer notable audible concepts without changing the response schema.
      - `name` (string, minLength: 1, maxLength: 100): Optional customer-facing name for the taxonomy.
      - `values` (array of object, required, minItems: 1, maxItems: 50): Controlled vocabulary values used as best-effort model guidance.
        - `label` (string, required, minLength: 1, maxLength: 100): Canonical taxonomy value to prefer when supported by the source content.
        - `description` (string, minLength: 1, maxLength: 300): Short explanation of when this value applies.
        - `aliases` (array of string, maxItems: 10): Accepted alternate names that should normalize to the canonical label. Each item: minLength: 1, maxLength: 100.
      - `allow_other` (boolean, required): When false, the model should prefer values from the taxonomy. When true, non-taxonomy values may be used when no taxonomy value applies.
    - `rubric_priorities` (array of string, minItems: 1, maxItems: 4): Rubric dimensions to use as tie-breakers after applying selection strategy. Best-effort guidance only. Possible values: `"clarity_in_isolation"`, `"emotional_intensity"`, `"novelty"`, `"soundbite_quality"`.
  - `target_duration` (object): Preferred highlight duration range in seconds. Best-effort guidance, with millisecond precision.
    - `min` (number, required, exclusiveMinimum: 0, maximum: 9007199254740.99): Preferred minimum highlight duration in seconds, with millisecond precision.
    - `max` (number, required, exclusiveMinimum: 0, maximum: 9007199254740.99): Preferred maximum highlight duration in seconds, with millisecond precision.

Example request body:

```json
{
  "parameters": {
    "asset_id": "mux_asset_123abc",
    "max_moments": 10,
    "target_duration": {
      "min": 15.123,
      "max": 45.456
    }
  }
}
```

### Response `202`

Key moments job queued

- `data` (object, required)
  - `id` (string, required): Unique job identifier.
  - `passthrough` (string): Arbitrary string supplied at creation, returned as-is.
  - `units_consumed` (integer, required, minimum: 0): Number of Mux AI units consumed by this job.
  - `directive` (object): The directive run that dispatched this job. Absent for jobs created via direct API POST.
    - `id` (string, required): ID of the directive that dispatched this job.
    - `run_id` (string, required): ID of the specific directive run that dispatched this job.
  - `created_at` (integer, required, minimum: 0): Unix timestamp (seconds) when the job was created.
  - `updated_at` (integer, required, minimum: 0): Unix timestamp (seconds) of the job's last state transition (e.g. when it started processing or reached a terminal state).
  - `workflow` (string, required) Possible values: `"find-key-moments"`.
  - `parameters` (object, required)
    - `asset_id` (string, required, minLength: 1): The Mux asset ID of the video to analyze.
    - `max_moments` (integer, minimum: 1, maximum: 25): Maximum number of key moments to extract. When omitted, defaults to 10 for assets up to one hour and 25 for longer assets.
    - `use_shots` (boolean): Controls whether video assets are analyzed using Mux shots. When true, shots are generated or reused and visual evidence drives selection. When false or omitted, selection uses transcript evidence and the asset must have a caption track. Not supported for audio-only assets.
    - `output_steering` (object): Curated output_steering controls for execution scope, selection strategy, title style, audience, taxonomy, and rubric tie-breakers. Scope is enforced; other controls guide model behavior but do not guarantee exact output.
      - `scope` (object): Optional execution window in seconds on the original asset timeline. Omit start_time to begin at the asset start and omit end_time to continue through the asset end. Returned moment timestamps remain absolute asset timestamps. At least one of start_time and end_time is required, and start_time must be less than end_time. An end_time past the end of the media is clamped to it, and a window that starts at or after the end of the media is rejected.
        - `start_time` (number, minimum: 0): Start of the execution window in seconds from the beginning of the media. When omitted, the window starts at the beginning.
        - `end_time` (number, exclusiveMinimum: 0): End of the execution window in seconds from the beginning of the media. When omitted, the window extends to the end.
      - `selection_strategy` (string): Best-effort guidance for what qualifies as a strong standalone key moment. Possible values: `"standalone_hooks"`, `"educational_takeaways"`, `"story_beats"`, `"product_moments"`, `"speaker_highlights"`.
      - `title_style` (string): Best-effort title style guidance for generated moment titles. Possible values: `"descriptive"`, `"punchy"`, `"educational"`, `"social"`.
      - `audience` (string, minLength: 1, maxLength: 160): Intended audience used as best-effort model guidance. Does not change the output schema.
      - `brand_terms` (array of string, minItems: 1, maxItems: 10): 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. Each item: minLength: 1, maxLength: 40.
      - `topic_taxonomy` (object): Controlled vocabulary used to steer notable audible concepts without changing the response schema.
        - `name` (string, minLength: 1, maxLength: 100): Optional customer-facing name for the taxonomy.
        - `values` (array of object, required, minItems: 1, maxItems: 50): Controlled vocabulary values used as best-effort model guidance.
          - `label` (string, required, minLength: 1, maxLength: 100): Canonical taxonomy value to prefer when supported by the source content.
          - `description` (string, minLength: 1, maxLength: 300): Short explanation of when this value applies.
          - `aliases` (array of string, maxItems: 10): Accepted alternate names that should normalize to the canonical label. Each item: minLength: 1, maxLength: 100.
        - `allow_other` (boolean, required): When false, the model should prefer values from the taxonomy. When true, non-taxonomy values may be used when no taxonomy value applies.
      - `rubric_priorities` (array of string, minItems: 1, maxItems: 4): Rubric dimensions to use as tie-breakers after applying selection strategy. Best-effort guidance only. Possible values: `"clarity_in_isolation"`, `"emotional_intensity"`, `"novelty"`, `"soundbite_quality"`.
    - `target_duration` (object): Preferred highlight duration range in seconds. Best-effort guidance, with millisecond precision.
      - `min` (number, required, exclusiveMinimum: 0, maximum: 9007199254740.99): Preferred minimum highlight duration in seconds, with millisecond precision.
      - `max` (number, required, exclusiveMinimum: 0, maximum: 9007199254740.99): Preferred maximum highlight duration in seconds, with millisecond precision.
  - `status` (string, required): Current job status. Possible values: `"pending"`, `"processing"`, `"completed"`, `"errored"`, `"cancelled"`.
  - `errors` (array of object): Error details. Present when status is 'errored'.
    - `type` (string, required): Stable public error category identifier. New types may be added, so handle unknown values.
    - `code` (string): Identifies the specific condition that failed, when it has a public code. Absent for other failures. New codes may be added, so handle unknown values.
    - `message` (string, required): Human-readable public error message.
    - `retryable` (boolean): Whether retrying this job may resolve the error.
  - `resources` (object): Related Mux resources linked to this job.
    - `assets` (array of object, required): Mux assets associated with this job.
      - `id` (string, required): Mux asset ID.
      - `meta` (object): Mux asset metadata, if available.
        - `title` (string): Asset title from Mux metadata.
        - `creator_id` (string): Creator identifier from Mux metadata.
        - `external_id` (string): External identifier from Mux metadata.
      - `passthrough` (string): Passthrough string from the Mux asset.
      - `_links` (object, required): Hypermedia links for the asset.
        - `self` (object, required)
          - `href` (string, required): URL to the Mux asset resource.
  - `outputs` (object): Workflow results. Present when status is 'completed'.
    - `moments` (array of object, required): Extracted key moments, ordered by their absolute position on the original asset timeline.
      - `cues` (array of object, required): Contiguous transcript segments that comprise this moment. Empty when video selection identifies the moment without transcript evidence.
        - `text` (string, required, minLength: 1): Transcript text for this cue.
        - `start_time` (number, required, minimum: 0): Cue start time in seconds on the original asset timeline. Fractional seconds are supported.
        - `end_time` (number, required, minimum: 0): Cue end time in seconds on the original asset timeline. Fractional seconds are supported.
      - `overall_score` (number, required, minimum: 0, maximum: 1): Weighted quality score from 0.0 to 1.0 based on the audible and/or visual evidence available to the selected analysis mode.
      - `title` (string, required, minLength: 1): Short catchy title for the moment (3-8 words).
      - `quotable_segment` (object): Best short, verbatim quote from within this moment. Omitted when the selected video moment has no source-grounded transcript quote.
        - `text` (string, required, minLength: 1): Verbatim transcript quote selected from within the key moment.
        - `time` (number, required, minimum: 0): Quote start timestamp in seconds on the original asset timeline. Fractional seconds are supported.
      - `audible_narrative` (string, required): One-sentence summary of what is being said during the moment. Empty when no transcript evidence is available.
      - `notable_audible_concepts` (array of string, required): Multi-word descriptive phrases (2-5 words each) capturing key audible concepts. Empty when no transcript evidence is available. Each item: minLength: 3.
      - `visual_narrative` (string, minLength: 1): One-sentence summary of what is visually happening. Present for video assets only.
      - `notable_visual_concepts` (array of object, minItems: 1): Scored visual concepts extracted from sampled frames. Present for video assets only.
        - `concept` (string, required, minLength: 3): Multi-word visual concept (2-5 words).
        - `score` (number, required, minimum: 0, maximum: 1): Relevance score from 0.0 to 1.0 measuring how important the visual concept is to the moment's available evidence.
        - `rationale` (string, required, minLength: 1): Brief explanation of the relevance score.
      - `start_time` (number, required, minimum: 0): Key moment start time in seconds on the original asset timeline. Fractional seconds are supported.
      - `end_time` (number, required, minimum: 0): Key moment end time in seconds on the original asset timeline. Fractional seconds are supported.

### Errors

- `400`: Malformed JSON request body.
- `401`: Missing or invalid Mux credentials
- `403`: The access token lacks robots:write (insufficient_scope), or Robots access is inactive or suspended. A free-plan workflow or unit limit can also prevent creation. For insufficient_scope, use credentials with the required permission. If using an API access token, create a replacement token with that permission. Enabling Robots for an organization does not grant token permissions.
- `409`: Resource conflict. See the error type and messages for details.
- `422`: Asset not found or errored, missing required media evidence, invalid parameters, or a missing or ineligible caption source required by the asset or analysis mode. parameters.target_duration.min cannot exceed the asset duration or the duration selected by output_steering.scope.
- `500`: Server error

Every error response has this body:

- `error` (object, required)
  - `type` (string, required): Machine-readable error type. New types may be added, so handle unknown values.
  - `code` (string): Identifies the specific condition that failed, when it has a public code. Absent for other errors. New codes may be added, so handle unknown values.
  - `messages` (array of string, required): Individual error messages describing what went wrong.

## Get a 'find-key-moments' job

`GET https://api.mux.com/robots/v1/jobs/find-key-moments/{JOB_ID}`

Retrieves the current status and results of a 'find-key-moments' job. Jobs are automatically deleted after 30 days.

Operation ID: `get-find-key-moments-job`. HTML version: https://www.mux.com/docs/api-reference/robots/find-key-moments/get-find-key-moments-job

### Path parameters

- `JOB_ID` (string, required, minLength: 1, maxLength: 255): Robots job ID returned by job creation or listing (rjob_...).

### Response `200`

Current status for the requested job

- `data` (object, required)
  - `id` (string, required): Unique job identifier.
  - `passthrough` (string): Arbitrary string supplied at creation, returned as-is.
  - `units_consumed` (integer, required, minimum: 0): Number of Mux AI units consumed by this job.
  - `directive` (object): The directive run that dispatched this job. Absent for jobs created via direct API POST.
    - `id` (string, required): ID of the directive that dispatched this job.
    - `run_id` (string, required): ID of the specific directive run that dispatched this job.
  - `created_at` (integer, required, minimum: 0): Unix timestamp (seconds) when the job was created.
  - `updated_at` (integer, required, minimum: 0): Unix timestamp (seconds) of the job's last state transition (e.g. when it started processing or reached a terminal state).
  - `workflow` (string, required) Possible values: `"find-key-moments"`.
  - `parameters` (object, required)
    - `asset_id` (string, required, minLength: 1): The Mux asset ID of the video to analyze.
    - `max_moments` (integer, minimum: 1, maximum: 25): Maximum number of key moments to extract. When omitted, defaults to 10 for assets up to one hour and 25 for longer assets.
    - `use_shots` (boolean): Controls whether video assets are analyzed using Mux shots. When true, shots are generated or reused and visual evidence drives selection. When false or omitted, selection uses transcript evidence and the asset must have a caption track. Not supported for audio-only assets.
    - `output_steering` (object): Curated output_steering controls for execution scope, selection strategy, title style, audience, taxonomy, and rubric tie-breakers. Scope is enforced; other controls guide model behavior but do not guarantee exact output.
      - `scope` (object): Optional execution window in seconds on the original asset timeline. Omit start_time to begin at the asset start and omit end_time to continue through the asset end. Returned moment timestamps remain absolute asset timestamps. At least one of start_time and end_time is required, and start_time must be less than end_time. An end_time past the end of the media is clamped to it, and a window that starts at or after the end of the media is rejected.
        - `start_time` (number, minimum: 0): Start of the execution window in seconds from the beginning of the media. When omitted, the window starts at the beginning.
        - `end_time` (number, exclusiveMinimum: 0): End of the execution window in seconds from the beginning of the media. When omitted, the window extends to the end.
      - `selection_strategy` (string): Best-effort guidance for what qualifies as a strong standalone key moment. Possible values: `"standalone_hooks"`, `"educational_takeaways"`, `"story_beats"`, `"product_moments"`, `"speaker_highlights"`.
      - `title_style` (string): Best-effort title style guidance for generated moment titles. Possible values: `"descriptive"`, `"punchy"`, `"educational"`, `"social"`.
      - `audience` (string, minLength: 1, maxLength: 160): Intended audience used as best-effort model guidance. Does not change the output schema.
      - `brand_terms` (array of string, minItems: 1, maxItems: 10): 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. Each item: minLength: 1, maxLength: 40.
      - `topic_taxonomy` (object): Controlled vocabulary used to steer notable audible concepts without changing the response schema.
        - `name` (string, minLength: 1, maxLength: 100): Optional customer-facing name for the taxonomy.
        - `values` (array of object, required, minItems: 1, maxItems: 50): Controlled vocabulary values used as best-effort model guidance.
          - `label` (string, required, minLength: 1, maxLength: 100): Canonical taxonomy value to prefer when supported by the source content.
          - `description` (string, minLength: 1, maxLength: 300): Short explanation of when this value applies.
          - `aliases` (array of string, maxItems: 10): Accepted alternate names that should normalize to the canonical label. Each item: minLength: 1, maxLength: 100.
        - `allow_other` (boolean, required): When false, the model should prefer values from the taxonomy. When true, non-taxonomy values may be used when no taxonomy value applies.
      - `rubric_priorities` (array of string, minItems: 1, maxItems: 4): Rubric dimensions to use as tie-breakers after applying selection strategy. Best-effort guidance only. Possible values: `"clarity_in_isolation"`, `"emotional_intensity"`, `"novelty"`, `"soundbite_quality"`.
    - `target_duration` (object): Preferred highlight duration range in seconds. Best-effort guidance, with millisecond precision.
      - `min` (number, required, exclusiveMinimum: 0, maximum: 9007199254740.99): Preferred minimum highlight duration in seconds, with millisecond precision.
      - `max` (number, required, exclusiveMinimum: 0, maximum: 9007199254740.99): Preferred maximum highlight duration in seconds, with millisecond precision.
  - `status` (string, required): Current job status. Possible values: `"pending"`, `"processing"`, `"completed"`, `"errored"`, `"cancelled"`.
  - `errors` (array of object): Error details. Present when status is 'errored'.
    - `type` (string, required): Stable public error category identifier. New types may be added, so handle unknown values.
    - `code` (string): Identifies the specific condition that failed, when it has a public code. Absent for other failures. New codes may be added, so handle unknown values.
    - `message` (string, required): Human-readable public error message.
    - `retryable` (boolean): Whether retrying this job may resolve the error.
  - `resources` (object): Related Mux resources linked to this job.
    - `assets` (array of object, required): Mux assets associated with this job.
      - `id` (string, required): Mux asset ID.
      - `meta` (object): Mux asset metadata, if available.
        - `title` (string): Asset title from Mux metadata.
        - `creator_id` (string): Creator identifier from Mux metadata.
        - `external_id` (string): External identifier from Mux metadata.
      - `passthrough` (string): Passthrough string from the Mux asset.
      - `_links` (object, required): Hypermedia links for the asset.
        - `self` (object, required)
          - `href` (string, required): URL to the Mux asset resource.
  - `outputs` (object): Workflow results. Present when status is 'completed'.
    - `moments` (array of object, required): Extracted key moments, ordered by their absolute position on the original asset timeline.
      - `cues` (array of object, required): Contiguous transcript segments that comprise this moment. Empty when video selection identifies the moment without transcript evidence.
        - `text` (string, required, minLength: 1): Transcript text for this cue.
        - `start_time` (number, required, minimum: 0): Cue start time in seconds on the original asset timeline. Fractional seconds are supported.
        - `end_time` (number, required, minimum: 0): Cue end time in seconds on the original asset timeline. Fractional seconds are supported.
      - `overall_score` (number, required, minimum: 0, maximum: 1): Weighted quality score from 0.0 to 1.0 based on the audible and/or visual evidence available to the selected analysis mode.
      - `title` (string, required, minLength: 1): Short catchy title for the moment (3-8 words).
      - `quotable_segment` (object): Best short, verbatim quote from within this moment. Omitted when the selected video moment has no source-grounded transcript quote.
        - `text` (string, required, minLength: 1): Verbatim transcript quote selected from within the key moment.
        - `time` (number, required, minimum: 0): Quote start timestamp in seconds on the original asset timeline. Fractional seconds are supported.
      - `audible_narrative` (string, required): One-sentence summary of what is being said during the moment. Empty when no transcript evidence is available.
      - `notable_audible_concepts` (array of string, required): Multi-word descriptive phrases (2-5 words each) capturing key audible concepts. Empty when no transcript evidence is available. Each item: minLength: 3.
      - `visual_narrative` (string, minLength: 1): One-sentence summary of what is visually happening. Present for video assets only.
      - `notable_visual_concepts` (array of object, minItems: 1): Scored visual concepts extracted from sampled frames. Present for video assets only.
        - `concept` (string, required, minLength: 3): Multi-word visual concept (2-5 words).
        - `score` (number, required, minimum: 0, maximum: 1): Relevance score from 0.0 to 1.0 measuring how important the visual concept is to the moment's available evidence.
        - `rationale` (string, required, minLength: 1): Brief explanation of the relevance score.
      - `start_time` (number, required, minimum: 0): Key moment start time in seconds on the original asset timeline. Fractional seconds are supported.
      - `end_time` (number, required, minimum: 0): Key moment end time in seconds on the original asset timeline. Fractional seconds are supported.

### Errors

- `401`: Missing or invalid Mux credentials
- `403`: The access token lacks robots:read (insufficient_scope), or Robots access is inactive or suspended. For insufficient_scope, use credentials with the required permission. If using an API access token, create a replacement token with that permission. Enabling Robots for an organization does not grant token permissions.
- `404`: No job exists for the supplied id
- `422`: Invalid job ID
- `500`: Server error

Every error response has this body:

- `error` (object, required)
  - `type` (string, required): Machine-readable error type. New types may be added, so handle unknown values.
  - `code` (string): Identifies the specific condition that failed, when it has a public code. Absent for other errors. New codes may be added, so handle unknown values.
  - `messages` (array of string, required): Individual error messages describing what went wrong.
