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 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.