Grok Imagine (xAI) API
xAI's Grok Imagine — real-time video and image generation
Overview
Grok Imagine by xAI provides fast AI video and image generation with real-time capabilities. Access all Grok Imagine variants including extend, 6s, 10s, 480p, 720p via AI Generate.
All 12 Grok Imagine (xAI) variants & pricing
Every variant is accessible via the same API endpoint. Switch variants by changing the model parameter. No extra setup.
| Variant | Credits | Price USD | Unit | |
|---|---|---|---|---|
| grok-imagine, text-to-video, 480p | 1.60 | $0.0112 | per second | Details → |
| grok-imagine, image-to-video, 480p | 1.60 | $0.0112 | per second | Details → |
| grok-imagine, text-to-video, 720p | 3.00 | $0.0210 | per second | Details → |
| grok-imagine, image-to-video, 720p | 3.00 | $0.0210 | per second | Details → |
| grok-imagine, text-to-image | 4.00 | $0.0280 | per 6 images | Details → |
| grok-imagine, image-to-image | 4.00 | $0.0280 | per 2 images | Details → |
| grok-imagine, text-to-image(quality) | 5.00 | $0.0350 | per 4 images | Details → |
| grok-imagine, upscale, 360p→720p | 10.00 | $0.0700 | per upscale | Details → |
| grok-imagine/extend, 6s 480p | 10.00 | $0.0700 | per call | Details → |
| grok-imagine/extend, 10s 480p | 20.00 | $0.1400 | per call | Details → |
| grok-imagine/extend, 6s 720p | 20.00 | $0.1400 | per call | Details → |
| grok-imagine/extend, 10s 720p | 30.00 | $0.2100 | per call | Details → |
Use Grok Imagine (xAI) via API
Example call with the default variant. Replace model with any slug from the table above.
curl https://aimarcusimage.eu/api/v1/jobs/createTask \
-H "Authorization: Bearer sk-aig-..." \
-H "Content-Type: application/json" \
-d '{
"model": "grok-grok-imagine-text-to-video-480p",
"input": {
"prompt": "a golden retriever running through autumn leaves, cinematic",
"aspect_ratio": "16:9",
"duration": 5
}
}'
FAQ
How much does Grok Imagine (xAI) cost?
Pricing starts at $0.0112 per second for the most affordable variant. You pay per call from your credit balance — no monthly subscription, no minimum commitment. First $10 on signup are free.
Is this an official xAI API?
AI Generate is an AI model aggregator that routes calls to xAI's upstream API. You get the exact same model outputs with simpler billing (pay per call, no contracts), one API key for 288 models, and the same OpenAI-compatible request shape across all providers.
Can I use Grok Imagine (xAI) in production?
Yes. The endpoint is rate-limited to 20 requests per 10 seconds per API key, retries are idempotent via taskId, and async results are delivered via polling or webhook. Set a spend cap in dashboard settings to protect against runaway usage.
Which Grok Imagine (xAI) variant should I pick?
For first tests, start with the cheapest variant (lowest "Price USD" in the table above). Upgrade to higher-resolution or "Quality" tiers only when you have validated prompts. The Playground (free) lets you A/B test all variants before spending credits.