OpenAI Format
Grok Imagine Video
Use POST /v1/videos with the grok-imagine-video model to submit JSON video generation tasks.
POST
Grok Imagine Video
grok-imagine-video is the video generation model of the Grok Imagine series. It uses a JSON request body and supports text-to-video and reference-image video generation.
- The endpoint path is
POST /v1/videos. - The request format is
application/json. - Text-to-video only requires
model,prompt,seconds,aspect_ratio, andresolution. - For image-to-video, use
imagefor a single image andimagesfor multiple images. resolutionsupports480Pand720P.promptsupports up to4096characters.
Method and Path
Response Example
Authentication
Body
string
required
Always pass
grok-imagine-video.string
required
Video generation prompt. Up to
4096 characters.string
Target duration in seconds. Minimum is
1 second; passing it as a string is recommended, e.g. "6".string
Aspect ratio. Supports common presets
1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 2:1, 1:2, 19.5:9, 9:19.5, 20:9, 9:20, as well as custom number:number ratios.string
Output resolution. Supports
480P and 720P; numeric forms like 480 and 720 are also accepted.string
Single reference image, as a data URI such as
data:image/png;base64,....array<string>
Multiple reference images. Each array member is a data URI such as
data:image/png;base64,.... Do not pass image together with images.Response
string
Task ID. Query the result later with
GET /v1/videos/{id}.string
Object type, usually
video.string
The model name actually submitted.
string
Task status. Common values are
queued, processing, completed, failed, cancelled.integer
Task progress percentage.
string
Video URL after the task completes. You can also download the result with
GET /v1/videos/{task_id}/content.