Grok Imagine 2 API
XAI's image model built for text, layouts and precise edits
xAI's Imagine Image 2.0 plans typography before it paints, edits only the region you pick and blends up to five reference images, and it launched at number two on both Arena image leaderboards.
- Kind: image
- Made by: xAI
- Price: 4 credits per image (from $0.04; 1 credit = $0.01 on monthly plans, $0.015 as a top-up)
- Released: 2026-08-07
- Open weights: no (Proprietary, API and Grok apps only; no weights published)
- Official name: Imagine Image 2.0 (grok-imagine-image-2.0)
- Modes: Text to image, multi-reference edit, segment edit
- Reference images: Up to 5
- Aspect ratios on Unicorn: 1:1, 2:3, 3:2, 16:9, 9:16
- Images per request: 1 to 4
- Arena rank at launch: #2 text-to-image, #2 image edit
- Weights: Closed, API only
- Inputs: n, prompt, ref_images, aspect_ratio
Call it with POST https://api.unicornapi.net/v1/jobs and model grok-imagine-2, or try it in the Playground.
Where it shines
- Plans typography and layout before rendering, so small text stays legible
- Segment map splits an image into named regions
- Segment edit changes only the regions you pick
- Blends up to five reference images in one request
- Number two on both Arena image leaderboards at launch
Watch out for
- Human realism, especially full-body figures, trails the best models
- Reflections and material detail can look less convincing than GPT Image 2
- No resolution or quality switch on Unicorn
- Closed model with no published architecture or weights
Made with Grok Imagine 2



Grok Imagine 2 is xAI's second-generation image model, released on 7 August 2026 under the official name Imagine Image 2.0. It generates pictures from text, edits them from up to five reference images, and lets you change a single region of a picture, one jacket, one label, one tabletop, without disturbing the rest. xAI's stated goal for the release is short and telling: images you can use in real work.
That goal shows in where the effort went. The first Grok Imagine was known for speed, a loose and vivid style, and a permissive "Spicy" mode. Version 2 is tuned for the jobs designers, marketers and shop owners actually do every day: posters with real copy, infographics with many small labels, one product shot in several formats, a headshot with the background swapped. xAI says the model plans typography and layout before it paints, so dense compositions keep their structure and small text stays legible. It launched at number two on both of Arena's public image leaderboards, text to image and image editing, behind only OpenAI's GPT Image 2.
On Unicorn API the release arrives as three endpoints: grok-imagine-2 for generation and reference-based editing, a segment map that splits an image into named regions, and a segment edit that changes only the regions you choose. It succeeds the first Grok Imagine, which stays in the catalog alongside it.
Where Grok Imagine 2 comes from
Grok Imagine is the image and video arm of the Grok product line from xAI, the AI company founded by Elon Musk that also builds the Grok chat models. The Imagine brand started inside the Grok apps in 2025 on an image model derived from Aurora, xAI's earlier in-house image generator. That model was fast and drew attention mostly for its Spicy mode, which brought scrutiny from regulators including Britain's Ofcom in early 2026. It was weak at anything that needed legible text: signage, book covers, UI mockups, packaging.
xAI opened the Grok Imagine API in January 2026, with a standard image model alongside editing and video endpoints. A higher-tier Quality Mode followed through the API in May. Imagine Image 2.0 replaces that Quality Mode. From launch day it is the default Quality Mode on grok.com/imagine and in the Grok apps for iOS and Android, and it is listed on the xAI API as grok-imagine-image-2.0. On Arena it appears under the SpaceXAI name.
The model is closed: no weights, no self-hosting licence, no technical report. In the consumer apps it is limited to SuperGrok accounts, since other accounts lost image generation in March 2026.
What changed from the first Grok Imagine
The headline change is a shift in philosophy. The first Grok Imagine was a text-to-image model with editing attached. Version 2 assumes the first output is a draft and gives you tools to fix it precisely.
- Typography and layout planning. xAI trained the model with a focus on photography, design and illustration, and says it plans text placement the way a designer would before generating pixels. Multi-part visuals such as infographics, posters, menus and title screens hold their grid, and small type stays sharp instead of dissolving into letter-shaped noise.
- Closer instruction following. Detailed prompts with many explicit elements, positions and strings of copy are followed more literally than before.
- Region editing. The Grok apps add a magic wand that selects an area with one click and a segmentation tool that snaps a rough selection to the object's real edges, so you can recolour one garment or rewrite one label and leave everything else alone. Background removal exports the subject with transparency.
- Multi-reference input. Up to five images can go into a single generation or edit, each with its own role in the prompt: this product, that room, this character's face, that colour palette.
- Smart Resize. In the apps, one image can be recomposed into nine aspect ratios from a 1:2 tall banner to a 2:1 wide one by extending the scene rather than cropping it.
- Consistency across images. xAI pitches still-image "world-building": keeping a character, a location or a set of props consistent across a series.
- Templates. The apps ship packaged workflows such as Professional Headshot, E-Commerce Photos, Product Color Change, Editorial Product Poster, Mascot Maker, Icon Maker, Character Sprite, Props & UI Kit and Merch Maker.
Most of those app features map to the API. On Unicorn, region editing comes as the segment map and segment edit pair, and multi-reference input is the ref_images field on grok-imagine-2. Smart Resize and the templates are app features; through the API you get the same result by choosing an aspect ratio and writing the template's intent into the prompt.
How it works, as far as xAI says
xAI has not published an architecture, a parameter count or details of its training data. What it has described is behaviour: a planning step for text and layout ahead of rendering, a training emphasis on photography, design and illustration, and editing that preserves the content outside the area you change.
The segment tools reveal a little more about the design. The segment map takes an image and returns a list of regions, each with an index, a plain-language name such as "red apple" or "wooden table" and a mask. The segment edit then takes the id of an earlier generation, a prompt and the mask_indexs you want changed. In other words, the model understands its own output as a set of named objects, and you edit it by naming which objects change.
Specs on Unicorn API
grok-imagine-2 | Segment map | Segment edit | |
|---|---|---|---|
| Does | Text to image, edits from references | Splits an image into named regions | Changes chosen regions only |
| Inputs | prompt, aspect_ratio, n, ref_images | A prior generation | prompt, task_id, mask_indexs |
| Aspect ratios | 1:1, 2:3, 3:2, 16:9, 9:16 | n/a | n/a |
| Images per request | 1 to 4 (n) | One map | One image |
| Reference images | Up to 5 | None | None |
The segment edit prompt can run to 65,000 characters, which is far more than any edit needs but means long, structured instructions are never cut off. Unicorn does not expose xAI's resolution or quality settings for this model; there is no field for either.
Where Grok Imagine 2 is strongest
Text-heavy design. This is the model's reason to exist, and independent testing backs it up. On ImageBench, a 192-prompt benchmark across six categories, it scored full marks for text rendering and for professional studio work. In PicLumen's side-by-side tests against GPT Image 2, Nano Banana 2 and Seedream 5.0 Pro, it reproduced every required string on a typographic poster and respected the layout constraints. Posters, event flyers, menus, packaging fronts with a product name, batch code and short paragraph, slide title cards and simple infographics are all in its comfort zone.
Doing what the prompt says. Reviewers consistently note that it follows explicit instructions closely and keeps object and scene structure intact. If a brief lists six elements and where they go, Grok Imagine 2 tends to place all six.
Precise iteration. The segment workflow suits the way commercial images are actually made: generate a base image, then fix the one thing the client wants changed. Because the segment map names the regions and the segment edit touches only the ones you list, each round of fixes changes exactly what was asked for and nothing else.
Compositing from references. Five reference slots cover most product and character work: a packshot plus a setting, a character sheet plus a pose, a logo-free brand palette plus a layout sketch.
Leaderboard standing. At launch the Arena text-to-image board put it at 1,320 points against GPT Image 2's 1,380, and the image-edit board at 1,439 against 1,463. Second on both boards is a large step for a model line that was not near the top before.
Weak spots to plan around
People, especially full bodies. ImageBench's weakest category for the model was human realism, and full-body figures in particular scored poorly, while faces and expressions held up much better. In PicLumen's documentary-photo test GPT Image 2 delivered the more convincing people. Headshots and portraits are fine; crowded street scenes with whole figures need more retries.
Materials and physics. Reflections, glass, liquid and polished metal are less convincing than in GPT Image 2, and ImageBench marked physics and reflections as a weak area. Product shots keep their structure, but a chrome kettle may look a little flat.
Busy compositions. The model sometimes fills a frame more densely than the brief asks. If you want negative space, say so explicitly, and say how much.
Leaderboard positions move. The number-two placement is xAI's launch-day snapshot. Arena ratings shift as votes come in, and other snapshots in the days after launch placed it lower. Treat the rank as a sign it belongs in the top group, not as a fixed ordering.
Moderation and openness. xAI's launch material focuses on the new tools and does not spell out updated moderation rules for them, and the consumer apps moderate more strictly than the web version. The model is closed, so there is no fine-tuning or local deployment.
Prompting Grok Imagine 2
Write prompts like a design brief. Name the format, list every piece of copy in quotation marks, and say where each element goes. The model's layout planning works best when it has an explicit hierarchy to plan.
Event poster, 2:3, dark navy background with a single large brass trumpet illustration. Top: "JAZZ ON THE PIER" in tall condensed capitals. Middle right: "Friday 22 August · 8 pm". Bottom: "Free entry · Bring a blanket" in small caps. Generous margins, no other text.
For reference edits, give every image a job and say what must not change:
Use the sneaker from image 1 and the colour palette from image 2. Show the sneaker on a concrete step in morning light. Keep the sole shape, stitching and lace pattern exactly as in image 1.
For segment edits, run the segment map first, read the region names, and keep the edit prompt about those regions only:
Change the jacket to a deep olive waxed cotton with brass buttons. Keep the fit and folds.
Some general habits pay off. Put the text you need in quotation marks and spell it exactly. Use n set to 4 when you are exploring composition, so you can compare four drafts from one request. Pick the aspect ratio up front rather than describing the shape in words. And for people, frame closer: waist-up and headshot compositions are where the model is most reliable.
Grok Imagine 2 compared with other image models
GPT Image 2 is the model Grok Imagine 2 is measured against, and it holds first place on both Arena boards. It wins on human realism, materials and the very densest copy. Pick GPT Image 2 for photoreal people and hero product shots; pick Grok Imagine 2 for typographic layouts, high-volume variations and region edits.
Nano Banana 2 from Google is quick, and Nano Banana Pro is Google's premium tier. Grok Imagine 2 placed above both on the launch-day Arena boards, and its segment editing gives tighter control over exactly what changes.
Seedream 5 Pro from ByteDance offers coordinate-based editing, layer decomposition and text in sixteen languages, and in side-by-side tests it handled scale and negative space better. Pick it for multilingual layouts and layered output; pick Grok Imagine 2 for named-region edits and close instruction following.
Grok Imagine, the predecessor, returns six variations per prompt in a looser, more cinematic style. Keep it for stylised imagery and its image-to-video pairing; move to version 2 for anything with words, layout or precise edits.
A typical fix loop
The three endpoints are meant to be used in sequence. Start with grok-imagine-2, with n set to 4, to explore layouts, and keep the id of the generation you like. Run the segment map on it and read the region names it returns: "wooden table", "red apple", "jacket" and so on, each with an index. Then send a segment edit with that generation's id, a prompt about those regions only, and the mask_indexs you want changed.
Two habits make the loop dependable. Keep the edit prompt focused on the selected regions and state what must stay, such as the fit and folds of a garment or the wording on a label. And when a change spans several objects, list all their indexes in mask_indexs in a single edit. For changes that are not tied to one object, such as a new setting or a different light, a reference-based edit on grok-imagine-2 is the better tool.
Getting started
Open the Grok Imagine 2 playground to try prompts and reference images in the browser. For code, create an API key and send a job to /v1/jobs with model set to grok-imagine-2, a prompt and optionally aspect_ratio, n and ref_images. For region edits, call grok-imagine-image-2-0-segment-map on a finished generation, pick the regions by name, then call grok-imagine-image-2-0-segment-edit with the generation's id and the mask_indexs to change. The docs explain how jobs are submitted and collected, and the API tab on this page has full request examples.
Verdict
Grok Imagine 2 turns xAI's image model from a fast, loose generator into a practical design tool. Its typography and instruction following put it in the top group of image models at launch, and its segment editing is one of the cleanest ways to change exactly one thing in a picture. People and reflective materials are still better served elsewhere. For posters, product variations and anything with words on it, it is an easy model to recommend.
Best for
- Posters and title cards with real text
- Infographics and dense layouts
- E-commerce and product variations
- Targeted edits to one object or surface
- Compositing from several references
- Mascots, icons and game props
Frequently asked questions
Is Grok Imagine 2 open source?
No. xAI offers Imagine Image 2.0 only through the Grok apps, grok.com and its API. No weights, licence for self-hosting, parameter count or technical report have been published.
What aspect ratios does Grok Imagine 2 support?
On Unicorn API grok-imagine-2 accepts 1:1, 2:3, 3:2, 16:9 and 9:16, with one to four images per request. There is no separate resolution or quality setting.
Is Grok Imagine 2 better than GPT Image 2?
At launch GPT Image 2 held first place on both Arena image leaderboards and Grok Imagine 2 second. GPT Image 2 is stronger on human realism and materials; Grok Imagine 2 is close on text and layout and adds segment-level editing.
Can Grok Imagine 2 edit just part of an image?
Yes. Run the segment map on a generation to get named regions with index numbers, then send a segment edit with the indexes to change; the rest of the picture is left alone.
How many reference images does Grok Imagine 2 accept?
Up to five. Pass them in ref_images and describe in the prompt what to take from each, for example the product from one image and the setting from another.
Can Grok Imagine 2 render text in images?
Yes, it is the model's main focus. xAI says it plans typography and layout before generating, and independent tests found it reproduces poster copy and small labels reliably.