Grok Imagine Image 2.0 API

x-ai/grok-imagine-image-2.0
Grok Imagine Image 2.0 is xAI's second-generation model for image generation and editing at up to 2K resolution.
Output
$0.104 / gen
Released
Oct 14, 2026

Overview

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

  • Developer: xAI
  • 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)
  • Resolution: 1k, 1.5k or 2k
  • 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

Pricing on AI/ML API

Each image is billed by quality and resolution. Low quality costs $0.052 at 1K, $0.065 at 1.5K and $0.078 at 2K; medium quality costs $0.078 at 1K, $0.091 at 1.5K and $0.104 at 2K. On the editing endpoint, each input reference image adds $0.013.

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.

How to use Grok Imagine Image 2.0 API

Install any OpenAI-compatible SDK, point it at api.aimlapi.com/v1, and set the model to x-ai/grok-imagine-image-2.0.
import requests

r = requests.post(
    "https://api.aimlapi.com/v1/images/generations",
    headers={"Authorization": "Bearer " + AIMLAPI_KEY},
    json={
      "model": "x-ai/grok-imagine-image-2.0",
      "prompt": "A cat holding a sign that says hello",
      "quality": "medium",
      "resolution": "1k"
    },
)
print(r.json())
const r = await fetch("https://api.aimlapi.com/v1/images/generations", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.AIMLAPI_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "model": "x-ai/grok-imagine-image-2.0",
    "prompt": "A cat holding a sign that says hello",
    "quality": "medium",
    "resolution": "1k"
  }),
});
console.log(await r.json());
curl -X POST 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 cat holding a sign that says hello","quality":"medium","resolution":"1k"}'

OpenAI-compatible — swap the base URL and it works with your existing SDK.

Grok Imagine Image 2.0 API Pricing

TypePrice
Input
Output
$0.104 / gen

Billed per image by quality and resolution: low $0.052 (1K), $0.065 (1.5K), $0.078 (2K); medium $0.078 (1K), $0.091 (1.5K), $0.104 (2K). Each input reference image on the editing endpoint adds $0.013.

Grok Imagine Image 2.0 Benchmarks

BenchmarkScoreWhat it measuresSourceRetrieved
Image Editing Arena
1118
Human preference Elo from blind pairwise comparisons of edited images, measured independently by Artificial AnalysisSourceOctober 16, 2026

Grok Imagine Image 2.0 vs other models

ModelInputOutputContextBest for
$0.104 / gen
Text-heavy images and multi-image edits
$0.091 / gen
Image generation at scale
$0.026 / gen
Image generation at scale
$1.95 / 1M tokens
$39 / 1M
Image generation

Frequently asked questions

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.

Up to 5 reference images per editing request.

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

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.

From $0.052 per image (low quality, 1K) to $0.104 per image (medium quality, 2K). Each input reference image on the editing endpoint adds $0.013.

Start building with Grok Imagine Image 2.0

Get API Key
1000+ models, one API.