id for polling. Grok supports both text-to-video and image-to-video modes, with four distinct model variants offering different duration ranges, resolution caps, and reference image constraints.
Base URL
Endpoint
Authentication
Models
Choose the model that best fits your duration, resolution, and billing needs:grok_video3_max and grok_video3_stable require reference images to be publicly accessible URLs — base64-encoded images are not supported for these models.Request Parameters
string
required
The Grok model to use. See the model table above for capabilities.Supported values:
grok_video3grok_video3_progrok_video3_maxgrok_video3_stable
string
required
Text description of the video you want to generate. Include subject, action, camera movement, and visual style for best results.Example:
"A cat dancing in the rain, cinematic style"integer
Output video duration in seconds. Behavior varies by model:
string
Output video aspect ratio. Defaults to
16:9 for all models.string
Output resolution. Defaults to
720p for all models.array
Array of reference image URLs for image-to-video generation. When omitted, the request is treated as text-to-video.Constraints by model:
grok_video3— up to 7 imagesgrok_video3_pro— reference images supportedgrok_video3_max— up to 5 images; must be public URLsgrok_video3_stable— up to 7 images; must be public URLs
["https://example.com/ref1.jpg", "https://example.com/ref2.jpg"]Response Fields
string
Unique task identifier. Save this — you’ll use it to poll the Query Video Task endpoint.
string
Object type. Always
"video".integer
Unix timestamp of when the task was created.
string
The model name used for this task.
string
Task status at creation. Always
"queued" on successful submission.string
Error message.
null on successful submission.Code Examples
Example Response
Key Constraints
- Omit
image_urlsfor text-to-video; include it for image-to-video - For
grok_video3_max: only the enumerated duration values are accepted — do not pass arbitrary seconds - For
grok_video3_stable: reference images must be publicly accessible URLs (no base64) - More reference images generally means longer queue and generation time
grok_video3_prohas a fixed 10-second duration — do not set thedurationfield
Next Steps
Use the returnedid to poll the Query Video Task endpoint for status updates and to retrieve video_url when generation completes.