Grok Imagine Image 2.0 API

The second generation of xAI's image model for generation and editing, with close instruction following, sharp small text and edits from up to 5 reference images.

Modalities
Text, ImageImage
Price
$0.04per generation
Model type
Image generation
Released
Oct 14, 2026

Grok Imagine Image 2.0 overview

Resolution
Aspect ratio
Quality
Sample Grok Imagine Image 2.0 image generated through AI/ML API: A ginger cat asleep on a stack of exactly three hardcover books in a rainy bookshop window at dusk. Gold lette

Grok Imagine Image 2.0 by xAI

Send a prompt, and optionally up to 5 reference images, to the image endpoints and receive generated or edited images.

Grok Imagine Image 2.0 specs

Model ID
x-ai/grok-imagine-image-2.0
Developer
xAI
Input
Text, Image
Output
Image
Endpoint
POST https://api.aimlapi.com/v1/images/generations

What Is Grok Imagine Image 2.0?

Grok Imagine Image 2.0 is the second generation of xAI's image model, covering both image generation and image editing. It follows detailed instructions closely, renders small text and typography sharply, and edits from up to 5 reference images. It is available on AI/ML API as x-ai/grok-imagine-image-2.0 through the image generation and image editing endpoints.

It succeeds Grok Imagine Image and Grok Imagine Image Pro, released in March 2026. Instead of separate standard and Pro models, the second generation exposes two quality settings and three output resolutions on one model.

Specifications

  • Available on AI/ML API since: 14 October 2026
  • Input: text prompt, plus up to 5 reference images for editing, output: image
  • Quality: low or medium (medium renders more detail)
  • Aspect ratios: 1:1, 3:4, 4:3, 9:16, 16:9, 2:3, 3:2, 9:19.5, 19.5:9, 9:20, 20:9, 1:2, 2:1, 21:9, 5:2 or auto
  • Endpoints: POST /v1/images/generations, POST /v1/images/edits

Use cases

Images that contain text: posters, packaging, social media graphics, slides and UI mockups, where small type has to stay legible.

Edits that combine several sources, using up to 5 reference images to keep a product, character or style consistent in a new scene.

Detailed prompts with many constraints on composition, objects and style, where close instruction following reduces the number of retries.

Cost-controlled batches: low quality at 1K for drafts and exploration, medium quality at 2K for the final asset.

Grok Imagine Image 2.0 benchmarks by Artificial Analysis

Human-preference results for Grok Imagine Image 2.0 in text to image, next to models available on AI/ML API. Data retrieved Nov 3, 2026.

Text to image

Elo · text-to-image arena

AI/ML API price

USD per generation

Models on AI/ML API

Arena results for models you can call with the same API key.

Text to image

Blind pairwise human votes on images generated from text prompts. Grok Imagine Image 2.0 ranks #5 of 98.

Grok Imagine Image 2.0 API pricing

Grok Imagine Image 2.0 pricing in US dollars
UsagePriceUnit
Image generation$0.04per generation

Prices from the AI/ML API price list, checked on Nov 4, 2026.

Grok Imagine Image 2.0 vs other image models: prices

AI/ML API rates for 5 models, per generation.

AI/ML API prices in USD per generation
ModelPer generation
Grok Imagine Image 2.0$0.04
Grok Imagine$0.02
Flux pro 1.1$0.04
Flux.1 Kontext$0.04
Grok Imagine Image Pro$0.05

How to use the Grok Imagine Image 2.0 API

View docs

Build with your agent

Give your agent the model details, code and documentation.

1Get your API key

Create API key
export AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"

2Make your first request

curl 'https://api.aimlapi.com/v1/images/generations' \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "x-ai/grok-imagine-image-2.0",
  "prompt": "A ginger cat asleep on a stack of exactly three hardcover books in a rainy bookshop window at dusk. Gold lettering on the glass reads OPEN LATE. Warm lamp light inside, raindrops and blurred neon reflections outside, 35mm film photo."
}'

Grok Imagine Image 2.0 FAQ

Is Grok Imagine Image 2.0 available on AI/ML API?

Yes. Grok Imagine Image 2.0 is live on AI/ML API as x-ai/grok-imagine-image-2.0, on POST /v1/images/generations for generation and POST /v1/images/edits for editing.

How many reference images can Grok Imagine Image 2.0 edit from?

Up to 5 reference images per editing request.

What resolutions and quality levels are available?

Quality low or medium, at 1k, 1.5k or 2k resolution, with aspect ratios from 1:1 to 21:9 or auto.

How is it different from Grok Imagine Image Pro?

Grok Imagine Image 2.0 is the next generation of xAI's image model. It replaces the split between Grok Imagine Image and Image Pro with quality and resolution settings on one model, and is described as following instructions more closely and rendering small text more sharply.

How much does Grok Imagine Image 2.0 cost?

Grok Imagine Image 2.0 costs $0.04 per generation on AI/ML API, billed as you go with no subscription.

What is the Grok Imagine Image 2.0 model ID?

Use x-ai/grok-imagine-image-2.0 as the model parameter. Requests go to https://api.aimlapi.com/v1/images/generations with your AI/ML API key.

Start building with Grok Imagine Image 2.0

Grok Imagine Image 2.0 API

x-ai/grok-imagine-image-2.0

Build with your agent

Give your agent the model details, code and documentation.

1Get your API key

Create API key
export AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"

2Make your first request

curl 'https://api.aimlapi.com/v1/images/generations' \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "x-ai/grok-imagine-image-2.0",
  "prompt": "A ginger cat asleep on a stack of exactly three hardcover books in a rainy bookshop window at dusk. Gold lettering on the glass reads OPEN LATE. Warm lamp light inside, raindrops and blurred neon reflections outside, 35mm film photo."
}'