Create video task
Last updated September 13, 2026
Generate with `x-ai/grok-imagine-video-1.5` in the unified shape, with `media[]` and callbacks.
Generate video with x-ai/grok-imagine-video-1.5 using this site's unified request shape.
https://gateway.amux.ai/v1/tasksAuthorization
headerAuthorizationstringRequiredBearer <your Amux key> An API key issued by this site.
Request
application/jsonmodelstringRequiredFixed to x-ai/grok-imagine-video-1.5.
promptstringOptional when material is supplied; supplying neither returns a 400.
durationintegerDefault 8Output length in seconds, defaulting to 8.
aspect_ratio"1:1" | "16:9" | "9:16" | "4:3" | "3:4" | "3:2" | "2:3"Default "16:9"⚠️ No effect for image-to-video: the output aspect ratio follows the supplied image.
resolution"480p" | "720p" | "1080p"Default "480p"The pricing tier, defaulting to 480p (the upstream default).
All three tiers are supported.
imageobjectFirst frame image. Supplying it selects image-to-video mode.
›imageobject
urlstringFirst frame address; must be a publicly reachable URL.
last_frameobjectLast frame image. Supplied together with image, it pins both ends.
›last_frameobject
urlstringLast frame address; must be a publicly reachable URL.
reference_imagesarray<object>Style and content reference images, up to 14.
›reference_imagesarray<object>
urlstringReference image address; must be a publicly reachable URL.
audiobooleanDefault trueAudio is generated by default. Pass false to produce output with no audio track.
moderation"low" | "auto" | "high"Moderation strength. The upstream default applies when omitted.
userstringEnd-user identifier for abuse tracing. Send a hash rather than the raw value.
mediaarray<object>The unified way to supply material, as an alternative to the four dedicated fields above. Each entry looks like {{"type":"first_frame","url":"…"}}, where type is first_frame, last_frame or reference_image.
›mediaarray<object>
typestringMaterial role.
urlstringMaterial address.
webhook_urlstringCalled back when the task reaches a terminal state, removing the need to poll.
Response
200responseThe task was created; the unified task shape is returned.
400responseInvalid request (value outside its domain, unsupported material combination, or neither prompt nor material supplied).
402responseInsufficient balance to reserve the cost of this task.
The only difference from the native xAI shape is notation: same model, same value domains, same billing. The unified shape adds two things:
media[]— the unified way to supply material, as an alternative to theimage/last_frame/reference_imagesfields;webhook_url— a callback when the task reaches a terminal state, removing the need to poll.
Prefer this endpoint when scheduling models across vendors from one request builder.
Material notation
// Native xAI shape
{ "image": { "url": "https://…/a.png" } }
// Unified shape
{ "media": [{ "type": "first_frame", "url": "https://…/a.png" }] }type is one of first_frame, last_frame or reference_image.
Value domains and billing
Identical to the native xAI shape; not repeated here.
curl https://gateway.amux.ai/v1/tasks \
-H "Authorization: Bearer $AMUX_API_KEY" \
-d '{
"model": "x-ai/grok-imagine-video-1.5",
"prompt": "A red paper boat drifting down a rain puddle, camera slowly pans out",
"duration": 8,
"resolution": "480p"
}'{
"id": "task_01M2D8FH1TKGP6VJJX1X3SYY7Q",
"status": "queued",
"model": "x-ai/grok-imagine-video-1.5",
"created_at": "<string>",
"output": {
"images": [
{}
],
"videos": [
{
"index": 0,
"url": "<string>"
}
]
},
"usage": {
"input_tokens": 0,
"output_tokens": 0,
"total_tokens": 0,
"output_video_seconds": 0
},
"cost": "0.08",
"notes": [
"<string>"
],
"error": {
"message": "<string>",
"code": "<string>"
}
}