Generate a title, description, and keyword tags for a video using the Mux Robots API.
Generate a title, description, and keyword tags for a video. This is useful for auto-populating metadata in a CMS, improving search and discovery, or creating social media descriptions from video content. See the Summarize API referenceAPI for the full endpoint specification.
Summarization works best when your asset has a text track. Without one, the workflow relies on sampled stills from the video, which can reduce accuracy. For the best results, make sure your asset has captions, either auto-generated or manually added, before running a summarize job.
summarize jobcurl https://api.mux.com/robots/v0/jobs/summarize \
-H "Content-Type: application/json" \
-X POST \
-d '{
"parameters": {
"asset_id": "YOUR_ASSET_ID",
"tone": "neutral"
}
}' \
-u ${MUX_TOKEN_ID}:${MUX_TOKEN_SECRET}| Parameter | Type | Description |
|---|---|---|
asset_id | string | Required. The Mux asset ID of the video to summarize. |
tone | string | Tone for the generated summary. neutral for straightforward, factual analysis. playful for witty, conversational copy (good for social media). professional for polished, executive-level language (good for reports or investor updates). |
title_length | integer | Maximum title length in words. |
description_length | integer | Maximum description length in words. |
tag_count | integer | Number of tags to generate. Defaults to 10. |
language_code | string | BCP 47 language code of the caption track to analyze (e.g. en, fr). When omitted, the SDK uses the default track. |
output_language_code | string | BCP 47 language code for the generated summary output (e.g. en, fr, ja). Auto-detected from the transcript if omitted. |
prompt_overrides | object | Override specific sections of the summarization prompt. See below. |
Prompt overrides let you replace specific sections of the instruction that gets sent to the AI. This is useful when the default behavior doesn't match your use case. For example, you might want titles optimized for SEO, descriptions written for a specific audience, or tags drawn from a controlled vocabulary.
| Override | Description |
|---|---|
prompt_overrides.task | Replace the high-level instruction that tells the AI what to do with the video. |
prompt_overrides.title | Replace the rules for how the title should be generated. |
prompt_overrides.description | Replace the rules for how the description should be generated. |
prompt_overrides.keywords | Replace the rules for how tags/keywords should be extracted. |
prompt_overrides.quality_guidelines | Replace the quality standards the AI uses to evaluate its own output. |
Here's an example that tailors summarization for an e-commerce platform:
{
"parameters": {
"asset_id": "YOUR_ASSET_ID",
"tone": "professional",
"prompt_overrides": {
"task": "Analyze this product video and extract information that would help a shopper decide whether to buy the product.",
"title": "Generate a product-focused title under 60 characters. Include the product name if visible. Do not use clickbait.",
"description": "Write a 2-3 sentence product description highlighting key features and benefits shown in the video. Write for an online shopper, not a general viewer.",
"keywords": "Extract tags relevant to e-commerce search. Include product category, material, color, and use case. Do not include generic tags like 'video' or 'product'."
}
}
}When the job completes, the outputs object contains:
| Field | Type | Description |
|---|---|---|
title | string | Generated title capturing the essence of the video. |
description | string | Generated description of the video content (typically 2-4 sentences). |
tags | array | Generated keyword tags for the video. |
{
"data": {
"id": "job_abc123",
"workflow": "summarize",
"status": "completed",
"units_consumed": 1,
"parameters": {
"asset_id": "YOUR_ASSET_ID",
"tone": "professional",
"prompt_overrides": {
"task": "Analyze this product video and extract information that would help a shopper decide whether to buy the product.",
"title": "Generate a product-focused title under 60 characters. Include the product name if visible. Do not use clickbait.",
"description": "Write a 2-3 sentence product description highlighting key features and benefits shown in the video. Write for an online shopper, not a general viewer.",
"keywords": "Extract tags relevant to e-commerce search. Include product category, material, color, and use case. Do not include generic tags like 'video' or 'product'."
}
},
"outputs": {
"title": "Ember Ceramic Mug 2 — Temperature Control Demo",
"description": "A hands-on look at the Ember Ceramic Mug 2, demonstrating its app-controlled temperature settings, battery life, and auto-sleep feature on the charging coaster.",
"tags": ["ceramic mug", "temperature control", "smart mug", "kitchen gadget", "gift idea", "coffee accessories", "app-controlled", "rechargeable", "white", "14oz"]
}
}
}