Skip to main content

Grok Imagine video

Text-to-video, first-frame input and reference images are supported. Reference video, reference audio and paired first/last frames are unsupported. First-frame and ordinary image references have different semantics; image count alone must not switch between them.

Models and specifications

ModelOutput durationResolutionReference-image mode
grok-imagine-video1–15 seconds480p / 720pCurrently up to 7 images, at most 10 seconds
grok-imagine-video-1.51–15 seconds480p / 720p / 1080pCurrently up to 7 images, preset maximum 15 seconds

Use each model's current mode limits. The service document's “≥7” means samples supported at least seven images, not a seven-image minimum or a published hard maximum. PopGo currently allows 1–7 reference images.

Fields and modes

FieldTypeRule
modelstringRequired public model ID from the table
promptstringRequired; at most 4096 UTF-8 bytes
secondsintegerInteger within the mode limits; UI default 8 seconds
resolutionstringSelect per model; UI default 720p
aspect_ratiostring1:1 / 16:9 / 9:16 / 4:3 / 3:4 / 3:2 / 2:3; default 16:9; omit in first-frame mode
input_referenceobjectExactly one first frame; object containing image_url
reference_imagesobject[]Subject/style references; object array with image_url in each item

First-frame input starts the scene from that image. Reference images guide subjects, style and consistency; a single image may still be an ordinary reference. input_reference and reference_images are mutually exclusive. Do not use top-level image_url: an incorrect field may be silently ignored while generation and billing still occur.

Sources, aspect ratio and prompts

The service describes public URLs and complete Data URLs but also records post-creation public-image download failures. PopGo's current Grok preset uses Base64: local uploads are encoded as complete data:image/...;base64,... values. Public images must be fetched and encoded under this policy; browser cross-origin restrictions may prevent that step. Bare Base64, filesystem paths and sharing pages are not image data.

First-frame mode omits aspect_ratio. Output follows the input and may be cropped or resized by the service; crop the image first for a specific composition. Reference-image mode still accepts a ratio. There is no published comprehensive guarantee for arbitrary input proportions.

4096 is a byte limit, not a character limit. Documented Chinese-only samples of 1365 characters used 4095 bytes and passed; 1366 characters used 4098 bytes and failed. Measure UTF-8 bytes for mixed text and shorten the prompt instead of retrying unchanged.

Request examples

The examples show first-frame and ordinary reference-image requests. Replace YOUR_IMAGE_DATA_URL with a complete image Data URL. For text-to-video, omit all reference fields.

{
"model": "YOUR_MODEL",
"prompt": "A person turns naturally toward the camera",
"seconds": 5,
"resolution": "720p",
"input_reference": { "image_url": "YOUR_IMAGE_DATA_URL" }
}
{
"model": "YOUR_MODEL",
"prompt": "Keep the subject and visual style consistent",
"seconds": 8,
"resolution": "720p",
"aspect_ratio": "16:9",
"reference_images": [{ "image_url": "YOUR_IMAGE_DATA_URL" }]
}

Unknown fields and output audio

HTTP 200 does not prove seed, watermark or other undocumented fields took effect. Do not add parameters that the current preset does not expose. generate_audio only controls the output track; it is not an audio-reference input. Unknown fields cannot bypass duration or mutual-exclusion rules.

Errors and corrections

Error or symptomAction
reference-to-video duration exceeds 10sUse at most 10 seconds in the standard model's reference-image mode
Prompt length exceeds 4096Shorten the UTF-8 byte length
Duration must be between 1 and 15 secondsUse integer seconds and obey the stricter mode limit
Cannot specify both image and reference_imagesKeep one first-frame or reference-image representation
grok_media_no_eligible_accountNo eligible capacity; use bounded backoff instead of concurrent creates
imagine:content-moderatedRevise the content; documented errors sometimes had nonzero usage, so check PopGo billing
Success without reference effectInspect outgoing fields, image download and final frames; a task ID does not prove reference use

Keep the returned id and poll queued / in_progress / completed / failed. Query the original job before retrying; a timeout does not prove creation failed. Check permissions, balance and capacity separately. See Video task workflow for polling, downloads, costs and backoff.