xAI's video generation model. Generates, edits, and extends videos from text and image inputs with native synchronized audio including dialogue, sound effects, and music. Supports multiple creative modes (normal, fun, custom).
Grok Imagine Video (xai/grok-imagine-video) is a video model from xAI, released 2026-05-22. Pricing via AIgateway: $0.050–$0.070 per second by resolution. Call it via https://api.aigateway.sh/v1/videos/generations — set model="xai/grok-imagine-video".
curl https://api.aigateway.sh/v1/videos/generations \
-H "Authorization: Bearer $AIGATEWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"xai/grok-imagine-video","prompt":"a slow drone shot over a mountain lake","duration":5,"resolution":"480p"}'{
"model": "xai/grok-imagine-video",
"prompt": "A drone shot of a mountain lake at golden hour",
"duration": 5, // seconds
"aspect_ratio": "16:9",
"resolution": "480p" // 480p $0.05/s, 720p $0.07/s
}
// optional "image_url" to animate a seed image
// Response is an async job — poll /v1/jobs/<id> until status === "completed".{
"id": "job_abc123",
"status": "queued", // queued | processing | completed | failed
"model": "xai/grok-imagine-video",
"created": 1776947082
}
// After completion:
{
"id": "job_abc123",
"status": "completed",
"result": {
"url": "https://media.aigateway.sh/video/abc123.mp4",
"duration": 5,
"resolution": "1920x1080"
}
}# See docs at https://aigateway.sh/docs