Skip to main content

Key Takeaways

  • Two models live: grok-imagine-image ($0.02/image) and grok-imagine-image-quality ($0.045/image), callable from the Default Group
  • Flat per-request billing that ignores resolution: xAI lists the quality tier at $0.05 (1K) and $0.07 (2K); we charge a flat $0.045 — about 90% of list at 1K and 64% at 2K, so higher resolution means bigger savings; stacking the top-up bonus brings 2K to roughly 58% of list, or 54% at maximum
  • #2 on both Arena boards: xAI reports Image 2.0 ranks second globally on Arena’s text-to-image and image-edit leaderboards, behind OpenAI’s gpt-image-2 (as of 7 August 2026)
  • Parameters genuinely work: across 20 combinations of 5 aspect ratios x 2 resolution tiers, output pixels matched the request 20/20 exactly, with 16:9 at 2K reaching 2816x1584
  • Editing is real editing: only the specified part changes while art style, composition, palette and subject identity are preserved, with 1-4 image fusion
  • Two conventions you must know: editing requires multipart/form-data (JSON returns 400), and reference images cannot go to the text-to-image endpoint (it returns 200 and silently discards them)

Background

xAI released its next-generation image model Grok Imagine Image 2.0 on 7 August 2026, shipping it as the “Quality Mode” of Grok’s image generator on grok.com/imagine and in the Grok iOS and Android apps. APIYI integrates exactly that official-transit Quality Mode. The biggest change from the first generation is that this is an editing-centric model, not merely a better one-shot generator. xAI’s reported Arena results place it second globally on both the text-to-image and image-edit leaderboards, behind OpenAI’s gpt-image-2. For developers, the most practical gain this generation is not “prettier pictures” — it is that the parameters finally work. We ran roughly 220 real calls against both models on APIYI. On the previous generation, aspect ratio and resolution were silently ignored at the gateway, 2K was unreachable, and multi-image requests returned 500. All of those problems are gone.
Sources: xAI’s official release notes and model documentation at docs.x.ai/developers/models/grok-imagine-image; Arena leaderboard standings cited from xAI’s official announcement (as of 7 August 2026). All API behaviour data in this article comes from APIYI’s own testing on 12 August 2026 (~220 calls).

Deep Dive

Core capabilities

Two tiers, one price

1k at ~1 megapixel and 2k at ~4.2-4.5 megapixels — flat billing regardless of resolution, so 2K costs no extra (xAI charges more)

5 aspect ratios, exact

1:1 / 16:9 / 9:16 / 4:3 / 3:4 — 20 measured combinations matched the request exactly

Up to 10 per call

n accepts 1-10, returning several images in one request — no client-side fan-out loop needed

True reference editing

Changes only what the prompt asks for, preserving everything else; supports 1-4 image fusion

Output geometry: 20/20 exact

This is the most substantive improvement over the previous generation. Across 5 aspect ratios x 2 resolution tiers, both models produced identical results cell for cell: The 2K tier delivers roughly 4.0-4.8x the pixel area of 1K — genuine high-resolution output, not upscaling.
1K returns JPEG and 2K returns PNG, so the format changes with the resolution tier. 2K is lossless PNG at 5-6 MB per image while 1K is JPEG at roughly 220-300 KB — about a 20x difference. For mobile or bulk transfer, prefer 1K; since both tiers cost the same, the choice is purely quality versus bandwidth — and when you do want quality, 2K carries no surcharge while sitting at a deeper discount versus list.

Editing, measured

Editing is the centrepiece of this generation, so we verified it with a controlled experiment (the same prompt run 3 times with and 3 times without a reference image) rather than trusting HTTP 200: The control group (same prompt, no reference image) produced photorealistic new images that were clearly distinguishable in style, subject and framing — proving the reference really is consumed. Fusion is genuine fusion: using 4 references with non-overlapping traits (watercolour fox with a blue scarf, cartoon crowned cat, yellow rubber duck, purple polka-dot teapot) across 2, 3 and 4 inputs, each additional image added a corresponding subject to the output with its distinctive traits intact — the files are consumed, not merely accepted.
Edited output dimensions follow the FIRST reference image: 1280x720 in gives 1280x720 out. resolution and aspect_ratio have no effect on the editing endpoint. Reversing the order of a 4-image set flipped the output from 1280x720 to 1024x1024, following the new first image — so put your most important subject first. Crop or resize the reference if you need a different framing.

Speed and concurrency

100 RPM runs comfortably in our tests — no 429s, no queue rejections, ample channel capacity. Call concurrently without building a serial queue.
Image APIs are synchronous: there is no async task ID, so a disconnected client loses the result while the request is still billed. Set the client timeout to 360 seconds — a 60-second timeout produces many spurious failures.

Two Conventions You Must Work Around

These are the two easiest places to get caught. Read them before integrating.

1. Editing requires multipart — JSON always returns 400

/v1/images/edits accepts only multipart/form-data file uploads. Sending JSON — including the {"image": {"type": "image_url", "url": "..."}} form shown in some upstream vendor documentation — always returns 400:
We exhausted 20 JSON variations with no exceptions. The correct form is a file upload:
The upside: file upload means no image hosting required — send the local file directly, which is simpler than preparing a public URL. The file field must be named image or image[]; images / image_file return 415.

2. Reference images must not go to the text-to-image endpoint

This one is subtler: passing image / image_url / images to /v1/images/generations raises no error. It returns 200 and generates an entirely new image from the prompt, ignoring the reference completely — and billing you as usual. In our test, uploading a watercolour fox illustration with “change the scarf to red” returned a photorealistic middle-aged man in a red scarf — nothing to do with the input. With no error signal, this typically surfaces only when someone notices the output does not match the input. Any workflow involving a reference image must use /v1/images/edits.
Also note that validation is lenient: invalid aspect_ratio (e.g. 5:7), resolution (e.g. 1K, 1024x1024) and response_format values all silently fall back to defaults and still return an image rather than a 400. When output does not match expectations, check parameter spelling first.The one exception is resolution: "4k", which returns 503 model_service_unavailable — that means the tier is unsupported, not that the channel is down. Retrying will not help; switch back to 1k / 2k.

Practical Use

Cost-sensitive batch generation

Flat per-image pricing with no 2K surcharge; n up to 10 turns batch selection into a single request

Local tweaks, not redraws

High editing fidelity suits “change one thing, leave the rest” iteration — recolouring, adding accessories, swapping backgrounds

Multi-image composition

Fuse 1-4 references to place subject A into scene and style B

Fixed-format asset production

Reliable aspect ratios make 16:9 covers and 9:16 vertical posters reproducible at scale

Code examples

Text-to-image (OpenAI SDK):
Image editing (multipart required):

Best practices

  1. Pick the endpoint first: no reference image means generation, any reference image means editing — the wrong choice fails silently with a wrong image
  2. Say “keep everything else unchanged” when editing: the model follows this constraint closely and preserves the source
  3. Refer to “image 1 / image 2” explicitly when fusing: this maps to image[] upload order and beats letting the model guess
  4. Do not rely on seed: it is unsupported, and the same prompt yields different results across calls
  5. Do not reconcile billing from usage: prompt_tokens is always 1000 x n, a placeholder — use the Console billing records

Pricing and Availability

Both variants use flat per-request billing, and editing costs the same as text-to-image. An easily missed detail: xAI prices the quality tier by resolution ($0.05 at 1K, $0.07 at 2K), while APIYI charges a flat $0.045 for both. In other words, the higher the resolution you generate, the more you save — roughly 90% of list at 1K and 64% at 2K. For workloads that need high-resolution output anyway, that gap is far more meaningful than a token discount. Group: the Default Group at 1.0x — no Group switching required. Set the Token billing model to Pay-as-you-go Priority.

Effective cost with top-up bonuses

Per-request billing stacks with the tiered top-up bonus (calculated per single top-up, not cumulatively). Taking the quality tier at 2K: In other words, at the common $100 tier a 2K image costs roughly 58% of xAI’s list price, dropping to about 54% at the maximum bonus. The standard grok-imagine-image stacks the same way — $0.02 becomes roughly $0.0167 per image at the 20% bonus.

Summary and Recommendations

On APIYI, Grok Imagine 2 is an image model with controllable parameters, predictable cost and high editing fidelity. Compared with the previous generation’s gateway behaviour, aspect ratio, resolution and multi-image support are all fixed, 2K is genuinely reachable, and latency roughly halved. Choose it when you need cost accurate to the image (flat pricing, no 2K surcharge), several images per call, or high-fidelity “change one thing, leave the rest” editing. Stay on GPT-Image-2 when you need mask inpainting, pixel-exact custom sizes, or fusion across more than 4 references — Grok Imagine 2 supports none of these today, and gpt-image-2 does still hold the #1 Arena position. The two coexist without conflict and the same Token calls both. Teams already integrated with GPT-Image-2 should read the Migrating from GPT-Image-2 section — the endpoints are identical but the parameter system is not, and the inverted default response format is the easiest thing to miss.
About the data: all API behaviour, geometry, latency and editing results in this article come from APIYI testing on 12 August 2026 (UTC+8) across roughly 220 real calls. Model release details and Arena standings are cited from xAI’s official announcement (7 August 2026). Pricing may change with vendor policy — the Console billing record is authoritative.