Video Generation
Generate videos from text prompts, a starting image, or reference images. The REST API is asynchronous: submit the job, then poll GET /v1/videos/{request_id} until it is done.
CLI
progrok video "a drone flying over mountains at sunrise" --duration 5 --resolution 480p
progrok video "animate this night sky" --model grok-imagine-video-1.5-preview --image sky.png
progrok video "openai-compatible duration alias" --seconds 5 API
# Submit generation request
curl -X POST http://localhost:18645/v1/videos/generations -H 'Authorization: Bearer anything' -H 'Content-Type: application/json' -d '{
"model": "grok-imagine-video",
"prompt": "a drone flying over mountains at sunrise"
}'
# Poll for result
curl http://localhost:18645/v1/videos/vg_abc123 -H 'Authorization: Bearer anything' Parameters
| Parameter | Type | Description |
|---|---|---|
| prompt | string | Text description of the video |
| duration / seconds | integer | Length in seconds. seconds is the OpenAI-compatible alias. |
| aspect_ratio | string | 16:9, 9:16, 1:1, 4:3, 3:4, 3:2, or 2:3 |
| resolution | string | 480p or 720p confirmed. Treat 1080p as conflicting until live smoke confirms it. |
| image | object | {url | file_id} for image-to-video. |
| reference_images | array | [{url | file_id}], max 7, max 10 second output. |
| output.upload_url | string | Optional signed PUT destination for the result. |
Mode Rules
REST has no mode body field. Text-to-video is prompt only, image-to-video adds image, and reference-to-video adds reference_images. Do not combine image and reference_images; xAI returns 400 Bad Request.
grok-imagine-video-1.5-preview is live-smoked as image-to-video only. Prompt-only T2V and reference_images currently return xAI 400 errors for that preview model.
Status Values
pending — Generation in progress.
done — Video ready for download.
failed — Generation failed.
expired — Download URL has expired.