Generate Contextual Text
Create a 'generate-contextual-text' job
Changed onGenerates customizable text, such as social posts, blog posts, and newsletter entries, from a Mux video or audio asset. Describe each piece of text you want as an artifact, and request named variants to get several versions of the whole set. Optional output steering limits the time range used and guides audience, voice, call to action, and brand terminology.
post/robots/v1/jobs/generate-contextual-text
Request
- Base URLhttps://api.mux.com
- Auth
- HTTP basic
- or HTTP bearer
Request body
Example request
{
"parameters": {
"asset_id": "mux_asset_123abc",
"output_steering": {
"audience": "Video developers",
"voice": "conversational"
},
"variants": [
{
"key": "product_led",
"instructions": "Use a promotional, product-led angle."
},
{
"key": "insight_led",
"instructions": "Use an educational, insight-led angle."
}
],
"artifacts": [
{
"key": "x_post",
"channel": "x",
"max_length": {
"unit": "characters",
"value": 280
}
},
{
"key": "blog_post",
"max_length": {
"unit": "words",
"value": 1200
},
"format": "markdown"
}
]
}
}Response
Job queued
Example response
{
"data": {
"parameters": {
"asset_id": "mux_asset_123abc",
"output_steering": {
"audience": "Video developers",
"voice": "conversational"
},
"variants": [
{
"key": "product_led",
"instructions": "Use a promotional, product-led angle."
},
{
"key": "insight_led",
"instructions": "Use an educational, insight-led angle."
}
],
"artifacts": [
{
"key": "x_post",
"channel": "x",
"max_length": {
"unit": "characters",
"value": 280
}
},
{
"key": "blog_post",
"max_length": {
"unit": "words",
"value": 1200
},
"format": "markdown"
}
]
},
"resources": {
"assets": [
{
"id": "abc123asset",
"meta": {
"title": "My Video",
"creator_id": "user123",
"external_id": "ext456"
},
"_links": {
"self": {
"href": "/video/v1/assets/abc123asset"
}
}
}
]
},
"outputs": {
"variants": [
{
"key": "insight_led",
"artifacts": [
{
"key": "x_post",
"content": "The hard part of repurposing video isn't generating more words. It's keeping every piece grounded in the original story."
},
{
"key": "blog_post",
"content": "# Why video repurposing breaks down after the first draft\n\nMost content workflows treat every deliverable as a separate generation problem. A shared source keeps the whole set grounded."
}
]
}
]
}
}
}Changes
- info
endpoint added
- info