Create a video with Grok
Create asynchronous Grok Imagine Video 1.5 jobs from text, a source image, or image and preset-voice references.
request_id immediately, so treat it as the first step in an async workflow.
Always send model: grok-imagine-video-1.5 explicitly. model and prompt are required for the 1.5 request shapes documented here.
Choose an input mode
data:image/png;base64,<BASE64_IMAGE_DATA>. Each reference_images item uses the same url field. A reference audio item uses a preset voice_id, such as eve. In the prompt, tags such as <IMAGE_0> and <AUDIO_0> can identify the corresponding reference.
Start with a small request
- Use
model: grok-imagine-video-1.5 - For a first request, keep
durationat1andresolutionat480p - Keep
promptexplicit so the scene and motion are clear - Add one input mode at a time before combining reference images and voices
Duration and resolution
duration, resolution, and aspect_ratio explicitly when your application depends on a particular output shape.
Task flow
Create the job
request_id.Poll for completion
status becomes done, failed, or expired. An initial response can contain only the echoed request_id while task metadata is prepared.Persist the output
video.url into your own storage if you need it after the temporary delivery window.Authorizations
Use your CometAPI API key as the bearer value.
Body
The Grok video model ID. Send this field explicitly so the request uses Grok Imagine Video 1.5.
grok-imagine-video-1.5 "grok-imagine-video-1.5"
A description of the scene, motion, and audio. Reference-to-video prompts can identify inputs with tags such as <IMAGE_0> and <AUDIO_0>.
1"A paper boat glides across a quiet pond at sunrise."
The output duration in seconds. Use an integer from 1 through 15.
1 <= x <= 15The output aspect ratio. Text-to-video uses 16:9 when omitted. Image-to-video uses the source image's aspect ratio when omitted.
1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3 "16:9"
The output resolution. Reference-to-video requests support 480p and 720p; text-to-video and image-to-video also support 1080p.
480p, 720p, 1080p The source image for image-to-video. Do not combine this field with reference_images or reference_audios.
Visual references for reference-to-video. Each item accepts a public image URL or image data URI. Do not combine this field with image.
1 - 7 elementsPreset voice references for reference-to-video. Do not combine this field with image.
1 - 3 elementsResponse
Request accepted.
The deferred request ID used to poll GET /grok/v1/videos/{request_id}.