Grok Imagine Video is xAI's video generation model, released 2026-05, that creates short clips from text, a still image, or reference images. It outputs 1–15 second videos at 24 fps in 480p or 720p across seven aspect ratios, and supports reference-to-video generation with up to seven images for consistent characters and settings.
Channels
Every channel serves the same model, but they differ in price and stability. On each API key in the Platform, you pick a primary and a backup channel per vendor, and each billing line shows which channel served the request.
Video pricing
Billed per second of generated video. The rate depends on the output resolution, and on whether audio is generated with it.
- Duration
- 1–15s
- Aspect ratios
- 16:9 · 9:16 · 1:1 · 4:3 · 3:4 · 3:2 · 2:3
Capabilities
Parameters
Request parameters this model accepts through the API.
Quick start
# 1. start the job curl https://api.mirapi.ai/v1/video/generations \ -H "Authorization: Bearer $MIRAPI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "grok-imagine-video", "prompt": "A kite over the sea", "duration": 5 }' # 2. poll until status is "completed" curl https://api.mirapi.ai/v1/video/generations/$TASK_ID \ -H "Authorization: Bearer $MIRAPI_API_KEY"
import os, time, requests h = {"Authorization": f"Bearer {os.environ['MIRAPI_API_KEY']}"} job = requests.post( "https://api.mirapi.ai/v1/video/generations", # changed headers=h, json={"model": "grok-imagine-video", "prompt": "A kite over the sea", "duration": 5}, ).json() while job["status"] not in ("completed", "failed"): time.sleep(5) job = requests.get(f"https://api.mirapi.ai/v1/video/generations/{job['id']}", headers=h).json()
const h = { Authorization: `Bearer ${process.env.MIRAPI_API_KEY}`, "Content-Type": "application/json", }; let job = await (await fetch("https://api.mirapi.ai/v1/video/generations", { // changed method: "POST", headers: h, body: JSON.stringify({ model: "grok-imagine-video", prompt: "A kite over the sea", duration: 5 }), })).json(); while (!["completed", "failed"].includes(job.status)) { await new Promise((r) => setTimeout(r, 5000)); job = await (await fetch(`https://api.mirapi.ai/v1/video/generations/${job.id}`, { headers: h })).json(); }
Links
1M free tokens to start, no card required. It’s OpenAI-compatible, so you only change the base URL.