xAIText to videoComing soon

grok-imagine-video

grok-imagine-video is a text to video tool from xAI that runs in the background and returns video. Coming soon: listed with its price, not yet open to runs.

This tool is listed but not yet available to run.

Price pending

Pricing

Price pending.

Limits

Runs
In the background
Returns
video
Longest queue wait
3600s
Run deadline
3600s
Largest inline input
1024 KB
Largest input file
500 MB
Largest output
4768 MB
Outputs per run
16

Input

FieldKindDefaultDescription
imageJSON—Optional input image for image-to-video generation. If provided, generates video with this image as the first frame. Also accepts `input_reference` for compatibility (same semantics — first frame).
prompttext—Prompt for video generation. Required for text-to-video (T2V) and reference-to-video (R2V). Optional for image-to-video (I2V) — when omitted, the model generates a video from the image alone.
durationnumber (whole)
1 to 15
8Video duration in seconds. Range: [1, 15]. Default: 8. Also accepts `seconds` for OpenAI API compatibility. Accepts both number (8) and string ("8") values.
keyframesJSON—Optional mid-video keyframe anchors, strictly between the endpoint pins (`image` as the first frame, `last_frame` as the last). Each entry pins an image to appear literally at its timestamp. Only supported by select video models; at most 4 entries.
resolutionone of
480p, 720p, 1080p
—Resolution of the generated video.
aspect_ratioone of
1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 21:9, 5:2
—Aspect ratio of the generated video. Ignored for image-to-video (first-frame `image` input): the aspect ratio is always derived from the input image.
reference_audiosJSON—Optional reference audio clips (voice identity) for reference-to-video generation. Each entry supplies a clip via `url` or selects a voice via `voice_id`; caller-supplied clips must be at most 15 seconds long. Only supported by select video models; at most 3 entries. May be provided without `reference_images` (audio-only reference-to-video) — at least one reference of either kind selects the reference-to-video mode.
reference_imagesJSON—Optional reference images for reference-to-video (R2V) generation. When provided generates video using these images as style/content references.

Same request in code

curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "xai",
    "model": "grok-imagine-video",
    "input": {}
  }'