Grok Imagine covers xAI's image models released in January 2026, offered at a flat per-image rate in two quality tiers, standard and high, picked with the quality field. One request returns up to 4 images in 13 aspect ratios plus auto, from 1:1 to tall 9:20 and wide 20:9, at 1k or 2k (a 16:9 image at 2k is 2816x1584). It can also edit a single source image. Prompts go up to 10,000 characters and are rendered as written.
Best for
- Phone wallpapers and stories in tall 9:19.5 or 9:20 formats
- Batches of up to 4 variations per prompt
- Simple edits of one photo, such as restyling or adding an object
- Draft rounds in standard quality before a final pass in high
Prompting tips
- Explore with
quality: standard, then switch tohighfor the images you will publish. - Match the ratio to the screen: 9:19.5 and 9:20 fit modern phones, 19.5:9 and 20:9 fit wide banners.
- For edits, send exactly one image in
image_urlsand describe the change. - Your prompt is not rewritten, so spell out style and lighting yourself.
FAQ
How much does the Grok Imagine API cost?
Grok Imagine is billed at one flat rate per image, the same in both quality tiers: $0.0246 per image. Failed generations are not charged.
What resolution does Grok Imagine output?
1k or 2k. At 2k, a 16:9 image comes out at 2816x1584.
Can Grok Imagine combine several reference images?
No, editing takes one source image. For multi-reference edits try Qwen Image 2.1 or Nano Banana 2.
How to call Grok Imagine via API
curl https://jantaris.com/v1/generate?wait=60 \
-H "Authorization: Bearer $JANTARIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-imagine",
"input": {
"prompt": "Product photo of a matte black ceramic coffee cup on a travertine table, soft window light, 50mm",
"aspect_ratio": "auto",
"resolution": "1k"
}
}'import os, time, requests
API = "https://jantaris.com/v1"
H = {"Authorization": f"Bearer {os.environ['JANTARIS_API_KEY']}"}
task = requests.post(f"{API}/generate", headers=H, json={
"model": "grok-imagine",
"input": {
"prompt": "Product photo of a matte black ceramic coffee cup on a travertine table, soft window light, 50mm",
"aspect_ratio": "auto",
"resolution": "1k"
}
}).json()
while task["status"] in ("queued", "running"):
time.sleep(3)
task = requests.get(f"{API}/tasks/{task['id']}", headers=H).json()
print(task["status"], task["cost"], [o["url"] for o in task["output"]])const API = "https://jantaris.com/v1";
const headers = { Authorization: `Bearer ${process.env.JANTARIS_API_KEY}`, "Content-Type": "application/json" };
let task = await (await fetch(`${API}/generate`, {
method: "POST",
headers,
body: JSON.stringify({
"model": "grok-imagine",
"input": {
"prompt": "Product photo of a matte black ceramic coffee cup on a travertine table, soft window light, 50mm",
"aspect_ratio": "auto",
"resolution": "1k"
}
}),
})).json();
while (task.status === "queued" || task.status === "running") {
await new Promise((r) => setTimeout(r, 3000));
task = await (await fetch(`${API}/tasks/${task.id}`, { headers })).json();
}
console.log(task.status, task.cost, task.output.map((o) => o.url));
Parameters
| Parameter | Type | Allowed | Default |
|---|---|---|---|
prompt * | string | ≤ 10000 chars | |
aspect_ratio | string | auto 1:1 3:4 4:3 9:16 16:9 2:3 3:2 9:19.5 19.5:9 9:20 20:9 1:2 2:1 | auto |
resolution | string | 1k 2k | 1k |
quality | string | standard high | standard |
num_images | integer | 1-4 | 1 |
image_urls | array | max 1 |
The same schema is available from GET /v1/models/grok-imagine.
























