xAI retired the grok-imagine-image-quality model slug on November 2, 2026, consolidating image generation and editing under grok-imagine-image-2.0 with explicit quality, aspect_ratio, and resolution controls on /v1/images/generations and /v1/images/edits. Existing requests to grok-imagine-image-quality (and legacy redirects from grok-imagine-image-pro) are automatically routed to grok-imagine-image-2.0 at quality: "low", reducing cost by $0.01 per image compared to the retired slug’s pricing.
What Changed With grok-imagine-image-quality
Following a 60-day notice period that started September 2, 2026, grok-imagine-image-quality became a migration path rather than a standalone target model on November 2, 2026.
- Automatic routing: Calls to
grok-imagine-image-qualityon/v1/images/generationsor/v1/images/editsexecute ongrok-imagine-image-2.0withquality: "low". - Lower per-image cost: Running
grok-imagine-image-2.0atlowquality costs $0.01 less per image thangrok-imagine-image-qualityat every supported resolution. - Verification: You can confirm active routing by checking
usage.cost_in_usd_ticksin API responses or inspectingmodelreporting (such asgrok-imagine-image-2.0-lowin gRPC SDK responses). - Migration: Update your
modelparameter fromgrok-imagine-image-qualitytogrok-imagine-image-2.0, and explicitly passqualitywhen you want predictable behavior rather than relying on redirect defaults.
Controlling aspect_ratio and quality in Image Generations
When generating images via /v1/images/generations or the xAI SDKs on grok-imagine-image-2.0, you can control framing, quality tier, resolution, batch count, and output format.
aspect_ratio
- Default (
auto): Omittingaspect_ratio(or settingauto) lets the model select dimensions suited to the prompt. - Supported ratios: Common ratios include
16:9and9:16(widescreen, mobile, stories) and4:3and3:4(presentations, portraits), alongside wider ratios such as21:9and5:2available ongrok-imagine-image-2.0.
quality and resolution
- Allowed
qualityvalues:low,medium, andauto(supported ongrok-imagine-image-2.0). - How
autobehaves: Whenqualityis omitted or set toauto, the service chooses dynamically—currently defaulting tolowfor image generation andmediumfor image editing. - Resolutions: Supported presets are
1k(default) and2k. According to xAI’s prompting guidance, pinningmediumquality and2kresolution is best when fine details must stay clearly recognizable, whilelowquality and1kresolution suit fast iteration and drafts. - Billing alignment: Images are billed according to the quality and resolution served, so pinning
lowormediumavoids surprises ifautochanges or if you want explicit cost control.
Practical Request Parameters and Patterns
| Parameter / Option | Behavior on /v1/images/generations |
Notes |
|---|---|---|
model |
Target model ID (grok-imagine-image-2.0) |
Replace grok-imagine-image-quality directly |
aspect_ratio |
Controls output framing (auto default, plus ratios like 16:9, 9:16, 4:3, 3:4, 21:9, 5:2) |
Pick explicit ratios for fixed UI or layout slots |
quality |
low, medium, or auto (grok-imagine-image-2.0 only) |
auto uses low for generation and medium for edits |
resolution |
1k (default) or 2k |
Higher resolution paired with medium quality preserves fine detail |
n |
Batch count from 1 to 10 (defaults to 1 on REST/OpenAI-compatible) |
Python SDK uses sample() for 1 image and sample_batch(n=...) for batches |
response_format |
url (default temporary URL) or base64 for direct embedding |
Deferred requests support url only and retain results for 24 hours |
For long-running batches or decoupled pipelines, you can set deferred: true to receive a request_id and poll GET /v1/images/{request_id}, or configure webhooks for image.generation.completed and image.generation.failed events. When generating distinct prompts concurrently, using an async client with parallel task execution is faster than sequential requests.
Leave a Reply