Grok Imagine Image API
xAI's image generation model. Call it on 666 AI with the same API key as every other model. Pay as you go; prices follow the upstream in real time and this page updates hourly.
| Vendor | xAI |
| Type | image generation |
| Price | $0.027 per image |
| Context window | 131K tokens |
| Model ID (use this in your request) | x-ai/grok-imagine-image |
How to call Grok Imagine Image
The API is OpenAI-compatible. Replace YOUR-ENDPOINT with the endpoint shown on your API Key page after you sign up, and YOUR-KEY with your key.
curl https://YOUR-ENDPOINT/v1/images/generations \
-H "Authorization: Bearer YOUR-KEY" \
-H "Content-Type: application/json" \
-d '{"model": "x-ai/grok-imagine-image", "prompt": "a red panda reading a book", "size": "1024x1024"}'from openai import OpenAI
client = OpenAI(base_url="https://YOUR-ENDPOINT/v1", api_key="YOUR-KEY")
r = client.images.generate(model="x-ai/grok-imagine-image", prompt="a red panda reading a book", size="1024x1024")
print(r.data[0].url or r.data[0].b64_json[:60])Similar models — price comparison
| Model | Price |
|---|---|
| GPT Image 2.5 Flare | $0.0313 per image |
| GPT Image 2.5 Sunburst | $0.0313 per image |
| FLUX.2 Flex | $0.0405 per image |
| GPT Image 1.5 | $0.0459 per image |
| Flash Image 2.5 | $0.0527 per image |
| Seedream 4.5 | $0.054 per image |
More models from xAI
| Model | Price |
|---|---|
| Grok 4.20 0309 Reasoning | $1.86 per 1M input tokens · $3.71 per 1M output tokens |
| Grok 4.20 Multi Agent 0309 | $1.86 per 1M input tokens · $3.71 per 1M output tokens |
| Grok 4.5 | $2.7 per 1M input tokens · $8.1 per 1M output tokens |
| Grok 4.6 | $2.7 per 1M input tokens · $8.1 per 1M output tokens |
| Grok 4.7 | $2.97 per 1M input tokens · $8.91 per 1M output tokens |
| Grok 4.20 Multi Agent | $3.38 per 1M input tokens · $6.75 per 1M output tokens |
| Grok Imagine Image Pro | $0.0945 per image |
| Grok Imagine Video | $0.0675 – $0.0945 per second |
FAQ
How much does the Grok Imagine Image API cost?
On 666 AI, Grok Imagine Image costs $0.027 per image. You pay only for what you use — no monthly fee. Prices follow the upstream in real time; this page updates every hour.
Can I use the official OpenAI SDK?
Yes. The API is OpenAI-compatible: in the OpenAI Python or Node.js SDK just change base_url and api_key, and set model to x-ai/grok-imagine-image.
How do I pay?
Bank card (including Google Pay / Apple Pay), USDT / ETH, or bank wire. Top up once and usage is deducted as you go.