Skip to main content
POST
Grok Imagine Video Series
The xAI Grok Imagine video line offers three model IDs. The official grok-imagine-video-1.5 reaches 1080p, starts at 1 second and takes multiple reference images; the official grok-imagine-video generates at 480p / 720p and adds a video edit action, edit; the economy grok-imagine-video-1.5-rev offers 480p / 720p only, starts at 6 seconds, and takes up to 7 reference images with no extra fee. For images, see Grok Imagine Series.

Quick start

A successful submission returns a task_id. Retrieve the result with GET /v1/tasks/{task_id}, wait inline with Prefer: wait, or configure a webhook.

Request parameters

string
required
One of three IDs; see Available models.
string
default:"generate"
  • generate — text-to-video or image-to-video, on all three models; sending image_urls makes it image-to-video
  • edit — video edit, grok-imagine-video only; video_urls is required
string
required
Description of the video or the edit instruction, in English or Chinese.
integer
Output length in whole seconds; required under action: "generate". grok-imagine-video and grok-imagine-video-1.5 accept 1–15; grok-imagine-video-1.5-rev accepts 6–15. Under action: "edit", omit it or send 0; the output length follows the source video.
string
default:"480p"
Output resolution. grok-imagine-video-1.5 supports 480p, 720p and 1080p; the other two models support 480p and 720p. No effect under action: "edit", where the output keeps the source resolution (up to 720p).
string
Frame ratio; the accepted set differs by model, see Available models. grok-imagine-video-1.5 defaults to auto and needs an explicit ratio when reference images are sent; grok-imagine-video and grok-imagine-video-1.5-rev default to 16:9. No effect under action: "edit", where the source ratio is kept.
string[]
Reference image URLs, publicly reachable, for action: "generate" only. grok-imagine-video and grok-imagine-video-1.5 take multiple images; grok-imagine-video-1.5-rev takes up to 7.
string[]
Source video URLs, accepted only by action: "edit" on grok-imagine-video; one clip, up to 8.7 seconds.
See Submit Task for callback_url, callback_events, Prefer: wait, Idempotency-Key and the maximum-cost header. n is not supported — a task produces one result. seed, generate_audio and audio_urls are not supported. Any other parameter returns 400 and is not billed.

Limits

Pricing

Billing is resolution tier × seconds; each resolution tier has its own per-second rate. grok-imagine-video freezes quota at submission (edit freezes at the duration cap) and settles on the actual result when the task completes, refunding the difference.
Per-model rates are in price_config on GET /v1/models, and in the console’s Model Market.What a single call actually cost is the cost field on the task response — an integer quota at 500,000 quota = 1 USD.
You are only billed for a successfully generated video. Failed and cancelled tasks, and tasks that return no usable video, are refunded in full. The final charge is the cost field on the task response — an integer quota, not dollars.

Response

Completed task
result.videos carries the generated video, one per task. Video links expire, so store them once retrieved. Full field reference: Query Task Status.

Available models

Aspect ratio sets:
  • grok-imagine-video-1.5: auto, 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3 (auto cannot be used with reference images)
  • grok-imagine-video: 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3
  • grok-imagine-video-1.5-rev: 16:9, 9:16, 1:1, 3:2, 2:3

Official vs reverse

The economy model shares the task endpoint and the parameter names with the official ones. Four things differ:
  • Resolution — 1080p exists only on grok-imagine-video-1.5; the economy model tops out at 720p.
  • Duration — the two official models start at 1 second, the economy model at 6 seconds; all cap at 15.
  • Reference images — both official models charge per image; grok-imagine-video-1.5-rev takes up to 7 with no extra fee.
  • Video edit — only grok-imagine-video supports action: "edit".