Grok Imagine Image 2.0
import { experimental_generateImage as generateImage } from 'ai';
const result = await generateImage({ model: 'spacexai/grok-imagine-image-2.0', prompt: 'A red balloon on a wooden table.'});Copy link to headingPlayground
Try out Grok Imagine Image 2.0 by SpaceXAI. Usage is billed to your team at API rates. Free users (those who haven't made a payment) get $5 of credits every 30 days.
Your generated image will appear here
Copy link to headingProviders
Route requests across multiple providers. Copy a provider slug to set your preference. Visit the docs for more info. Using a provider means you agree to their terms, listed under Legal.
| Provider |
|---|
Copy link to headingAbout Grok Imagine Image 2.0
Grok Imagine Image 2.0 was released August 7, 2026 as SpaceXAI's text-to-image and image editing model. It generates images from a prompt and edits existing ones, and the emphasis across both is consistency: a subject, style, or product should survive an edit rather than drift into something new.
Typography is the clearest improvement. Grok Imagine Image 2.0 plans layout and small text the way a designer would, which makes it usable for posters, product shots, and interface mockups where legible text decides whether an image is usable at all.
Editing works at the region level. You point at an area and change only that area, select precise regions through segmentation, or remove a background to export a subject on transparency. Up to five reference images can be supplied at once to hold a character, style, or product consistent across a set. Smart Resize recomposes a finished image into other aspect ratios by filling the new frame rather than cropping it.
On Arena leaderboard standings at launch, Grok Imagine Image 2.0 placed second worldwide in both text-to-image and image editing. Leaderboard positions move week to week, so treat that as a snapshot.
A request can return up to 10 images, at 1K or 2K resolution. Generate images with generateImage from the AI SDK, and pass images in the prompt to edit them.
Copy link to headingWhat To Consider When Choosing a Provider
- Configuration: Edits bill for both the input image and the output image, so an iterative workflow that refines the same frame repeatedly costs more than the per-image rate suggests. Check the pricing panel on this page and budget for the number of passes your workflow actually takes.
- Configuration: Text rendering is strong in English and less reliable in Simplified Chinese, so verify output before shipping localised assets. Independent reviews also report that style transfer is less dependable than subject consistency: Grok Imagine Image 2.0 is a better choice when you need a character or product to persist across edits than when you need a specific artistic style reproduced faithfully.
- Configuration: Image models on AI Gateway are called through
generateImagein the AI SDK. The Chat Completions, Responses, and Messages APIs do not serve image generation. - Zero Data Retention: Zero Data Retention is offered on a per-provider and model basis. See the documentation for details.
- Authentication: AI Gateway authenticates requests using an API key or OIDC token. You do not need to manage provider credentials directly.
Copy link to headingWhen to Use Grok Imagine Image 2.0
Best for
- Typography-Heavy Images: Posters, product shots, and mockups where small text has to stay legible
- Region-Level Editing: Changing one part of a frame while the rest of the image holds
- Consistent Subjects: Up to five reference images keeping a character or product stable across a set
- Aspect Ratio Variants: Smart Resize recomposing a finished image instead of cropping it
- Transparent Exports: Background removal producing subjects ready for compositing
Consider alternatives when
- Faithful Style Transfer: Reviews report style reproduction is less reliable than subject consistency
- Simplified Chinese Text: Text compliance is weaker outside English
- Video Output: Grok Imagine Video generates moving footage rather than stills
- Single Cheap Generations: Grok Imagine Image costs less when you do not need editing or references
Copy link to headingConclusion
Grok Imagine Image 2.0 is SpaceXAI's image model for assets that get edited rather than generated once, with typography-aware layout, region-level edits, and up to five reference images for consistency. Call spacexai/grok-imagine-image-2.0 through generateImage in the AI SDK, and remember that edits bill for both the input and the output image.