How to Use Grok Imagine Image 2.0: 12 Steps, $0.04/Image [2026]

xAI shipped Grok Imagine Image 2.0 on August 7, 2026, and quietly made it the default “Quality Mode” for every image generated on grok.com/imagine and inside the Grok iOS and Android apps. Search volume for “grok imagine” now sits above 60,500 monthly queries in the US, and a good chunk of that traffic is people trying to figure out what actually changed and how to plug the new model into a real workflow. This tutorial walks through both sides of that: the consumer app tools (Magic Wand region editing, segmentation, background removal, Smart Resize) and the developer API (grok-imagine-image-2.0), with working code you can run today.

By the end you will have generated images from text, edited an existing image with a natural-language instruction, combined up to five reference images in a single request, and built a small Python pipeline that batch-generates and resizes product shots for multiple ad formats. Every code sample below is copied from or adapted directly from xAI’s published developer documentation, not guessed at, so it should run against a live API key without modification.

This guide is aimed at developers and technical marketers who already use an AI image model in production and want to know exactly what changed with this release, not a beginner walkthrough of what a text-to-image model is. If you have called an OpenAI, Midjourney, or Ideogram endpoint before, the concepts here will feel familiar; the specifics of xAI’s request format, its editing quirks, and its pricing are what you actually need spelled out.

Google · Preferred Sources

Don't miss new tech stories on Google

Add Tech Insider once in the Google app and our stories appear in your news suggestions.

Add Now

What Is Grok Imagine Image 2.0?

Grok Imagine Image 2.0 is xAI’s second-generation image generation and editing model, built into the broader Grok Imagine product line that first launched in October 2025. xAI describes the goal plainly: “Precise image generation and editing, built for real creative work,” and the company adds that the model “follows instructions closely, down to the details,” according to xAI’s official product announcement. That framing matters because the first-generation Grok Imagine model was mostly known for fast, playful text-to-image and text-to-video generation, not for the kind of pixel-precise editing that a designer or marketer actually needs on a Tuesday afternoon.

On launch, xAI reported that Image 2.0 ranks second in the world on both the Arena Image Edit and Arena Text-to-Image leaderboards, as measured on August 7, 2026, placing it just behind the category leader on both generative and editing tasks. The model is free to use inside the standard Grok apps (no separate fee on top of your existing Grok access), and it is also live in the API right now under the model ID grok-imagine-image-2.0, priced at $0.04 per image according to xAI’s published pricing page.

Grok Imagine Image 2.0 vs. Image 1.0 vs. Image Quality (Deprecated Pro)

xAI currently lists three image models in its developer pricing table, and knowing the difference saves you from accidentally paying more than you need to for a batch job. The original grok-imagine-image model is still available and is the cheapest option, but it lacks the quality parameter, the newer aspect ratio options, and the editing precision of 2.0. The old “Pro” tier has been renamed grok-imagine-image-quality in the API and is marked deprecated in favor of 2.0.

ModelAPI model IDPrice per imageQuality parameterStatus
Grok Imagine Image (v1)grok-imagine-image$0.02Not supportedAvailable, base tier
Grok Imagine Image 2.0grok-imagine-image-2.0$0.04low / medium / autoAvailable, default Quality Mode
Grok Imagine Image Quality (formerly Pro)grok-imagine-image-quality$0.05Not supportedDeprecated, still callable

The practical takeaway: unless you have a specific reason to stay on the older models, point every new integration at grok-imagine-image-2.0. It is the model xAI is actively improving, it is the one that gets the Magic Wand and multi-reference editing features in the consumer app, and at $0.04 per image it sits between the two older tiers on price while beating both on capability.

How Image 2.0 Fits Into the Grok Imagine Product Line

Grok Imagine did not appear out of nowhere in August 2026. The product line began with an early version 0.9 release around October 5, 2025, focused on fast text-to-image and text-to-video generation. That was followed by a 1.0 update on February 1, 2026, which rounded out the feature set to include text-to-image, text-to-video, image-to-video, and prompt-based video editing in a single tool. Image 2.0 is the second-generation image model within that lineage, and it now replaces the original image model as the default Quality Mode across grok.com and the mobile apps, while the older model remains available in the API under its own model ID for anyone who still needs it.

The timing also lines up with public comments from xAI leadership treating image and video generation as a completed milestone for this phase of the product. In July 2026, ahead of the Image 2.0 launch, xAI cofounder Elon Musk posted that he considered Grok Imagine’s core generation and editing capabilities essentially finished, a signal that the team was shifting its attention toward refinement and precision (the theme Image 2.0 explicitly leans into) rather than chasing entirely new modalities. That context matters if you’re deciding whether to build against this API long-term: xAI is positioning Image 2.0 as a stable target, not a placeholder ahead of a bigger rewrite.

Prerequisites and Requirements

You do not need a powerful machine for this tutorial since all image generation happens on xAI’s servers. What you do need is the right accounts and a small amount of local tooling.

  • An X (Twitter) account and, for the consumer app tools covered later (Magic Wand, segmentation, Smart Resize, templates), access to Grok on grok.com or the iOS/Android app
  • An xAI developer account at console.x.ai for API access, with billing enabled
  • Python 3.9 or newer, if you plan to follow the SDK examples
  • The xAI Python SDK, installed with pip install xai-sdk (always install the latest published release rather than pinning an old version)
  • Alternatively, the standard OpenAI Python SDK version 1.0 or newer, since xAI’s REST API is OpenAI-compatible for most endpoints
  • Node.js 18 or newer, only if you are following the JavaScript examples
  • curl, for the raw HTTP examples
  • An XAI_API_KEY environment variable set with a key generated from the xAI console

One important distinction to keep in mind throughout this tutorial: some Image 2.0 features are consumer-app-only (the point-and-click Magic Wand, one-click Smart Resize, and the ready-made templates), while others are exposed directly through the developer API (text-to-image generation, prompt-based editing, and multi-image editing with up to five reference images). We will cover both paths.

None of the setup steps below require a paid API tier beyond standard pay-as-you-go billing; xAI does not gate access to grok-imagine-image-2.0 behind an enterprise contract or a waitlist, which is part of why adoption moved fast after the August 7 launch. If you already have an existing xAI API key from a text-model integration (say, from calling grok-4.6 for chat features), that same key and billing account works for image requests without any additional signup step.

Step 1: Create Your xAI API Account and Generate a Key

Go to console.x.ai and sign in with your X account or email. Once inside, open the API Keys section and generate a new key. Copy it immediately since xAI, like most providers, will not show you the full key again after you navigate away. Store it as an environment variable rather than hardcoding it into a script:

export XAI_API_KEY="your-key-here"

Add billing details under the Billing tab. Image generation is billed per image (not per token), so even heavy testing during this tutorial should cost you well under a dollar unless you are generating hundreds of images.

Step 2: Install the SDK and Verify Your Setup

Install whichever SDK matches your stack. For Python, xAI maintains its own SDK alongside OpenAI-SDK compatibility:

pip install xai-sdk
# or, if you prefer the OpenAI-compatible client:
pip install openai

For Node.js projects, install the OpenAI SDK or the Vercel AI SDK’s xAI provider:

npm install openai
# or
npm install ai @ai-sdk/xai

Run a quick sanity check by listing available models against the REST API before writing any generation code:

curl https://api.x.ai/v1/models \
  -H "Authorization: Bearer $XAI_API_KEY"

If that returns a JSON list containing grok-imagine-image-2.0, your key and connection are working and you can move on to generating your first image.

Step 3: Generate Your First Image From a Text Prompt

The simplest possible call to the API takes a prompt and a model name and returns a temporary URL to the finished image. Here is the same request in three forms so you can pick whichever matches your project.

# curl
curl -X POST https://api.x.ai/v1/images/generations \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $XAI_API_KEY" \
  -d '{
    "model": "grok-imagine-image-2.0",
    "prompt": "A collage of London landmarks in a stenciled street-art style"
  }'
# Python, using the xAI SDK
import xai_sdk

client = xai_sdk.Client()

response = client.image.sample(
    prompt="A collage of London landmarks in a stenciled street-art style",
    model="grok-imagine-image-2.0",
)

print(response.url)

If your codebase already standardizes on the OpenAI Python SDK, you can point it at xAI’s base URL instead of adding a second client library:

from openai import OpenAI

client = OpenAI(
    base_url="https://api.x.ai/v1",
    api_key="YOUR_API_KEY",
)

response = client.images.generate(
    model="grok-imagine-image-2.0",
    prompt="A collage of London landmarks in a stenciled street-art style",
)

print(response.data[0].url)

Output example: a successful call returns a JSON payload with a data array containing one object per generated image, each with a url field pointing to a temporary hosted image (typically valid for a limited window, so download it promptly) and, in some SDK responses, a revised_prompt field showing how the model interpreted your instruction.

Step 4: Control Aspect Ratio for Different Placements

Real projects rarely need a single square image. The aspect_ratio parameter lets you target the exact placement you are designing for, and when you omit it, the default is auto, which lets the model choose the best ratio for the prompt.

RatioTypical use case
1:1Social media posts, thumbnails
16:9 / 9:16Widescreen video, mobile stories
4:3 / 3:4Presentations, portraits
3:2 / 2:3Photography-style compositions
2:1 / 1:2Banners, headers
19.5:9 / 9:19.5Modern iPhone displays
20:9 / 9:20Modern Android displays
21:9Cinematic widescreen
5:2Wide banners
response = client.images.generate(
    model="grok-imagine-image-2.0",
    prompt="Mountain landscape at sunrise",
    extra_body={"aspect_ratio": "16:9"},
)

print(response.data[0].url)

Notice the OpenAI SDK example wraps the ratio in extra_body, since aspect_ratio is an xAI-specific parameter that isn’t part of the standard OpenAI images schema. The xAI SDK and raw REST calls accept it as a top-level field instead.

Step 5: Set Resolution and Pin a Quality Tier

Image 2.0 currently supports two output resolutions, 1k (the default) and 2k, controlled with the resolution parameter. Separately, the quality parameter accepts low, medium, or auto, and this parameter is only supported on grok-imagine-image-2.0 specifically, not on the older models. Left unset, quality defaults to auto, which currently resolves to low for generation requests and medium for editing requests. Images are billed at whichever quality tier they were actually served at, so pinning low deliberately is a legitimate way to control cost on high-volume jobs where perfect fidelity isn’t required.

response = client.image.sample(
    prompt="An astronaut performing EVA in low Earth orbit",
    model="grok-imagine-image-2.0",
    resolution="2k",
)
print(response.url)
curl -X POST https://api.x.ai/v1/images/generations \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $XAI_API_KEY" \
  -d '{
    "model": "grok-imagine-image-2.0",
    "prompt": "A watercolor painting of a lighthouse at dawn",
    "quality": "low"
  }'

Step 6: Generate Multiple Variations in One Request

When you need several options to choose from, the REST API and OpenAI-compatible SDKs accept an n parameter between 1 and 10, defaulting to 1 if omitted. The xAI Python SDK splits this into two methods: sample() for a single image, and sample_batch(n=...) when you want more than one, where n is required.

import xai_sdk

client = xai_sdk.Client()

responses = client.image.sample_batch(
    prompt="A futuristic city skyline at night",
    model="grok-imagine-image-2.0",
    n=4,
)

for i, image in enumerate(responses):
    print(f"Variation {i + 1}: {image.url}")

This is the fastest way to A/B test prompt phrasing: generate four variations of the same prompt, eyeball them side by side, then refine the wording that produced your favorite before committing to a larger batch run.

Step 7: Edit an Existing Image With a Natural-Language Prompt

Editing takes a source image plus a text instruction and returns a modified version. xAI’s documentation carries an explicit warning here worth repeating: the OpenAI SDK’s images.edit() method is not supported for image editing, because it sends a multipart/form-data request while the xAI API expects application/json. Use the xAI SDK, the Vercel AI SDK, or a direct HTTP request instead.

curl -X POST https://api.x.ai/v1/images/edits \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $XAI_API_KEY" \
  -d '{
    "model": "grok-imagine-image-2.0",
    "prompt": "Render this as a pencil sketch with detailed shading",
    "image": {
      "url": "https://your-cdn.example.com/photo.png",
      "type": "image_url"
    }
  }'

You can supply the source image three ways: a public URL, a base64-encoded data URI, or a file_id obtained from xAI’s Files API if you plan to reuse the same reference image across many requests. The full parameter reference for this endpoint, including edge cases not covered here, lives in xAI’s image generation documentation. For iterative work, chain edits together by feeding each output back in as the next input, which is how you progressively refine a single asset without restarting from the original prompt each time.

Step 8: Multi-Reference Editing With Up to Five Images

This is the feature xAI leans on hardest in its own materials: Image 2.0 accepts up to five input images in a single edit request, which removes the manual compositing step that used to be required to combine a product photo, a background, and a logo into one scene. By default, the output aspect ratio follows the first input image, but you can override that by setting aspect_ratio explicitly.

curl -X POST https://api.x.ai/v1/images/edits \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $XAI_API_KEY" \
  -d '{
    "model": "grok-imagine-image-2.0",
    "prompt": "Place the product from image 1 on the marble surface from image 2, lit like the reference in image 3",
    "image": [
      {"url": "https://your-cdn.example.com/product.png", "type": "image_url"},
      {"url": "https://your-cdn.example.com/marble-surface.png", "type": "image_url"},
      {"url": "https://your-cdn.example.com/lighting-reference.png", "type": "image_url"}
    ],
    "aspect_ratio": "1:1"
  }'

Each of the up to five images can be a mix of public URLs, base64 data URIs, and file IDs within the same request, so you are not locked into one storage method across the whole call.

Step 9: Magic Wand Region Editing and Segmentation in the App

These next two tools live in the consumer app at grok.com/imagine and the mobile apps rather than as a distinct API endpoint. Open an image you have already generated or uploaded, and tap the Magic Wand tool. Point it at the region you want to change (a jacket, a background, a logo) and describe only that change. xAI’s own description of the feature says the tool “edits the region you point at and leaves the rest untouched,” which is the core difference from a full-prompt edit that can accidentally redraw parts of the image you wanted to keep.

Segmentation works alongside it, letting you select precise areas of the image, similar to a lasso or magic-select tool in traditional photo editors, before applying a targeted change. If you are building this workflow through the API instead of the app, the closest equivalent is a tightly scoped edit prompt that names the exact element to change (for example, “change only the color of the jacket, keep everything else identical”) combined with a single-reference edit call.

Step 10: Background Removal for Transparent Assets

Background removal exports any subject onto a transparent canvas, ready to drop into a different layout, product page, or ad template. In the app, this is a one-click tool inside the Photo Tools template set. Through the API, you replicate it with an edit prompt that explicitly asks for isolation and transparency, then confirm the output format supports alpha channels (PNG, not JPEG) before you save it:

curl -X POST https://api.x.ai/v1/images/edits \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $XAI_API_KEY" \
  -d '{
    "model": "grok-imagine-image-2.0",
    "prompt": "Isolate the main subject and remove the background, export on a transparent canvas",
    "image": {"url": "https://your-cdn.example.com/product-shot.png", "type": "image_url"}
  }'

Step 11: Smart Resize and Ready-Made Workflow Templates

Smart Resize takes one finished image and recomposes it across up to nine different aspect ratios, including turning a tall 1:2 layout into a wide 2:1 banner, without a full from-scratch regeneration. It is a one-click tool in the app today. At the API level, you get the same underlying outcome by re-running an edit request against the same source image while only changing the aspect_ratio value, letting the model reflow the composition to fit.

xAI also shipped a set of workflow templates alongside Image 2.0, each packaging a common task into a ready-made starting point: Photo Edit, Product Color Change, Product Poster, Reimagine, Photo Collage, Mascot Maker, Background Removal and Change, E-Commerce Photos, UGC Photos, Professional Headshot, Icon Maker, Character Sprite, Props and UI Kit, Streaming Emoji Creator, and Merch Maker. If your use case matches one of these categories, starting from the template in the app and then extracting the underlying prompt pattern for your API calls is often faster than writing a prompt from a blank page.

Turning Templates Into Repeatable Prompt Patterns

The fifteen-plus templates xAI shipped with Image 2.0 are useful beyond the app itself, because each one is effectively a documented, tested prompt pattern you can adapt for your own API calls. A few worth studying closely:

  • Professional Headshot takes a casual photo and reframes it as a polished corporate portrait, useful for teams that need consistent employee photos without a studio shoot. The underlying pattern is a single-image edit with a prompt that specifies lighting, framing, and attire changes while explicitly preserving facial identity.
  • E-Commerce Photos and Product Poster both build on the multi-reference workflow from Step 8, combining a product cutout with a background and, often, a props reference image in one call.
  • Icon Maker and Character Sprite lean on tightly constrained prompts (flat color, transparent background, fixed canvas size) that are worth locking into a reusable prompt template in your own codebase since visual consistency across an icon set matters more than creative variation.
  • Mascot Maker and Merch Maker pair naturally with the multi-turn chaining approach from Step 7: generate the mascot once, then reuse that output as the reference image for every subsequent merch mockup so the character doesn’t drift between renders.

If you’re building a content pipeline for a specific vertical, the fastest path is usually to open the closest matching template in the app first, generate a few outputs to see the prompt style that works, and then encode that pattern as a Python function you call repeatedly through the API, rather than trying to reverse-engineer the ideal prompt from scratch.

Building a Consistent World Across Multiple Images

One capability xAI highlights specifically for Image 2.0 is generating a whole visual “world” from a handful of separate prompts while keeping everything in one consistent style: a single character, her locations, and the props she carries, each produced as an individual generation call, yet holding together as if they came from the same illustrator. xAI frames this in its launch materials as a foundation for building video projects image by image, where each still needs to match the others in tone, palette, and character design before it’s animated.

The mechanism behind this is the same multi-turn, reference-chaining pattern covered earlier: generate the anchor asset first (the character), then pass that image back in as a reference for every subsequent scene, location, or prop, rather than describing the character fresh in each new prompt. The more consistently you describe style keywords across the chain (the same lighting adjectives, the same rendering style, the same color palette language), the less drift you’ll see between the first image in a series and the tenth.

Step 12: Build a Complete Project — an Automated Product Photo Pipeline

Here is a working, end-to-end Python script that ties the previous steps together. It takes a single product photo, removes the background, generates three marketing variants against different scene prompts, and exports each in three aspect ratios for social, banner, and story placements. Save it as product_pipeline.py, set your XAI_API_KEY, and run it with a real image URL.

import os
import time
import requests

API_KEY = os.environ["XAI_API_KEY"]
BASE_URL = "https://api.x.ai/v1"
MODEL = "grok-imagine-image-2.0"
HEADERS = {"Content-Type": "application/json", "Authorization": f"Bearer {API_KEY}"}

SCENES = [
    "on a matte marble countertop under soft daylight",
    "on a rustic wooden table with morning sunlight streaming in",
    "floating against a clean studio gradient background",
]

ASPECT_RATIOS = ["1:1", "9:16", "16:9"]


def remove_background(source_url):
    payload = {
        "model": MODEL,
        "prompt": "Isolate the main subject and remove the background, export on a transparent canvas",
        "image": {"url": source_url, "type": "image_url"},
    }
    r = requests.post(f"{BASE_URL}/images/edits", headers=HEADERS, json=payload, timeout=60)
    r.raise_for_status()
    return r.json()["data"][0]["url"]


def place_in_scene(cutout_url, scene_description, aspect_ratio):
    payload = {
        "model": MODEL,
        "prompt": f"Place this product naturally {scene_description}, realistic shadows and reflections",
        "image": {"url": cutout_url, "type": "image_url"},
        "aspect_ratio": aspect_ratio,
        "quality": "medium",
    }
    r = requests.post(f"{BASE_URL}/images/edits", headers=HEADERS, json=payload, timeout=60)
    r.raise_for_status()
    return r.json()["data"][0]["url"]


def download(url, filename):
    img = requests.get(url, timeout=60)
    img.raise_for_status()
    with open(filename, "wb") as f:
        f.write(img.content)
    print(f"Saved {filename}")


def run(source_photo_url):
    cutout_url = remove_background(source_photo_url)
    download(cutout_url, "cutout.png")

    count = 0
    for scene in SCENES:
        for ratio in ASPECT_RATIOS:
            image_url = place_in_scene(cutout_url, scene, ratio)
            safe_ratio = ratio.replace(":", "x")
            filename = f"variant_{count:02d}_{safe_ratio}.png"
            download(image_url, filename)
            count += 1
            time.sleep(1)  # stay comfortably under the 6 rps rate limit

    print(f"Generated {count} product photo variants.")


if __name__ == "__main__":
    run("https://your-cdn.example.com/raw-product-photo.jpg")

Running this against nine variant combinations (three scenes times three ratios) at the medium quality tier costs roughly $0.36 based on the $0.04 per-image published rate, plus the background removal call, well under a dollar for a full set of ready-to-post marketing assets. Swap the SCENES and ASPECT_RATIOS lists to match your own catalog and channels.

Common Pitfalls When Using Grok Imagine Image 2.0

Most of the friction developers hit with this API in its first weeks traces back to a handful of assumptions carried over from other providers. xAI’s request and billing model has enough small differences from OpenAI’s, Google’s, and Midjourney’s that copying a pattern that worked elsewhere without reading the specifics below will cost you debugging time later.

  • Using the OpenAI SDK’s images.edit() method. It sends multipart form data, which the xAI API rejects. Use raw JSON requests, the xAI SDK, or the Vercel AI SDK instead.
  • Assuming auto quality always means the best output. Auto resolves to low for generation and medium for editing. If a batch of generated images looks softer than expected, pin quality="medium" explicitly rather than relying on auto.
  • Letting temporary URLs expire. Generated image URLs are hosted temporarily. Download or persist them to your own storage immediately after the API call returns, not later in a queued job.
  • Sending more than five reference images. Multi-image editing caps out at five source images per request (see xAI’s multi-image editing reference); exceeding that limit will fail the call.
  • Forgetting that output aspect ratio inherits from the first input image. In multi-image edits, if you need a specific final ratio, set aspect_ratio explicitly rather than assuming the model will pick one that matches your layout.
  • Ignoring the rate limit. The image model is capped at roughly 6 requests per second and 300 requests per minute; a tight loop with no delay will start returning 429 errors well before it finishes a large batch.
  • Expecting Magic Wand and Smart Resize inside the API. Those are one-click consumer app tools. The API gives you the underlying capability through prompts and parameters, not an identical point-and-click interface.

Troubleshooting Guide

SymptomLikely causeFix
401 UnauthorizedMissing or invalid API keyConfirm XAI_API_KEY is set and matches a key generated in console.x.ai
429 Too Many RequestsExceeded ~6 rps / 300 rpm on the image modelAdd delays between calls or queue requests; consider the Batch API for large jobs
images.edit() throws a format errorOpenAI SDK sends multipart/form-data, not JSONSwitch to raw HTTP requests, the xAI SDK, or Vercel AI SDK for edits
Downloaded image is broken or 404The temporary hosted URL expired before downloadDownload immediately after the API response, or request base64 output
Small text in the image is blurry or garbledLow resolution or low quality tier on a text-heavy promptSet resolution to 2k and quality to medium, and describe the typography explicitly in the prompt
Edit changed parts of the image you wanted untouchedPrompt was too broad for a full-image editUse the Magic Wand region tool in the app, or narrow the prompt to name only the element to change
Multi-image edit ignored one of the reference imagesPrompt did not clearly map each image to its roleReference each image explicitly by position, e.g. “image 1,” “image 2,” in the prompt text
Output aspect ratio is wrong in a multi-reference editRatio defaulted to the first input imageSet the aspect_ratio parameter explicitly rather than relying on the default
Batch job costs more than expectedQuality resolved to medium on edit calls under autoPin quality to low for draft passes, reserve medium for final renders
Prompt rejected or image not generatedContent policy or moderation flag on the promptRework the prompt to avoid restricted content categories and resubmit

Advanced Tips for Production Use

Once the basic pipeline works, a few refinements make Image 2.0 more reliable at scale. First, use the Files API to upload reference images you reuse constantly (a brand logo, a signature product angle) once and reference them by file_id instead of re-encoding and re-sending base64 payloads on every call. Second, for jobs that don’t need real-time turnaround, route them through xAI’s Batch API, which processes large volumes asynchronously at a discount to standard per-image pricing and typically completes within 24 hours. Third, chain multi-turn edits deliberately: generate a base composition first, confirm it looks right, and only then layer on smaller targeted edits, rather than trying to specify everything in one giant prompt.

Fourth, if you are building a series of images meant to feel like one continuous world (a mascot across multiple scenes, a character in different outfits, a product line with a consistent look), generate the character or the object once, then feed that same output back in as the reference image for every subsequent scene rather than re-describing it from scratch each time. xAI demonstrates this exact pattern in its own materials, generating a character, her locations, and her props as separate calls that hold one consistent style throughout. Finally, log the quality value actually returned in each response, not just the one you requested, since auto can silently shift between low and medium depending on whether the call was a generation or an edit, and your cost tracking should reflect the tier you were actually billed at.

Two more habits are worth building in before you ship anything to production. Retry logic should treat 429 responses differently from 5xx responses: a rate limit means back off and requeue, while a server error is often safe to retry immediately once. And because prompts and reference images may contain sensitive product or brand assets, avoid logging full base64 payloads in your application logs; log the request metadata (model, aspect ratio, quality, timestamp) and store the images themselves in your own object storage instead, both for cost auditing and for compliance with whatever data handling policy your organization already has in place.

Pricing: What Grok Imagine Image 2.0 Actually Costs

All figures below come directly from xAI’s published developer pricing page, listed in USD.

ItemCost
grok-imagine-image (v1)$0.02 per image
grok-imagine-image-2.0$0.04 per image
grok-imagine-image-quality (deprecated)$0.05 per image
grok-imagine-video$0.050 per second
grok-imagine-video-1.5$0.080 per second

Inside the consumer Grok apps, Image 2.0 itself carries no extra fee beyond your existing Grok access tier; the API pricing above only applies if you are calling the model directly from your own code. For teams evaluating whether to build against Image 2.0 or one of the many competing tools already covered on this site, it’s worth comparing it against how Midjourney V8.1 handles prompt-based editing, how Leonardo AI’s workflow templates compare to xAI’s new template set, and how Ideogram 4.0’s typography rendering stacks up against Image 2.0’s own text-layout claims. If you’re generating a large volume of assets and want the broader landscape, our roundup of leading AI models tracks pricing and capability changes across the field as they ship.

Frequently Asked Questions

Is Grok Imagine Image 2.0 free to use?
Inside the Grok apps, yes, it’s included with your existing Grok access at no additional charge. Through the developer API, it’s billed at $0.04 per image.

What’s the difference between Grok Imagine Image 2.0 and the original Grok Imagine model?
Image 2.0 adds a quality parameter, new aspect ratios including 21:9 and 5:2, multi-reference editing with up to five images, Magic Wand region editing, segmentation, background removal, and Smart Resize. The original model does not support the quality parameter and lacks these editing tools.

Can I use the OpenAI Python SDK to edit images with Grok Imagine?
Not with the standard images.edit() method, because it sends multipart form data while xAI’s API expects JSON. Use the xAI SDK, the Vercel AI SDK, or a direct HTTP POST to /v1/images/edits instead.

How many reference images can I combine in one edit?
Up to five. You can mix public URLs, base64 data URIs, and file IDs within the same request.

What resolutions does Grok Imagine Image 2.0 support?
Two: 1k, which is the default, and 2k, set with the resolution parameter.

Do generated image URLs expire?
Yes, they are hosted temporarily. Download or process them promptly, or request base64 output directly if you need to embed the image without a separate download step.

Is there a rate limit on the Imagine API?
Yes, the image model is limited to roughly 6 requests per second and 300 requests per minute. Large batch jobs should add delays between calls or use the Batch API.

How does Grok Imagine Image 2.0 rank against other image models?
At launch on August 7, 2026, xAI reported it placed second worldwide on both the Arena Text-to-Image and Arena Image Edit leaderboards, based on Arena’s public rankings at that date.

Do I need a SuperGrok or X Premium+ subscription to use Image 2.0?
The Quality Mode itself is available at no extra charge on top of standard Grok access in the app, though usage limits vary by account tier; developers calling the API directly are billed per image regardless of their consumer subscription status.

Related Coverage

Sofia Lindström

Sofia Lindström

Editor-in-Chief

Sofia Lindström is the Editor-in-Chief at Tech Insider, where she leads editorial strategy and oversees coverage across AI, cybersecurity, and enterprise technology. With over a decade in Swedish tech journalism, she previously served as technology editor at Dagens Industri and covered the Nordic startup ecosystem for Breakit. Sofia holds an MSc in Media Technology from KTH Royal Institute of Technology and is a frequent speaker at Web Summit and Slush. She is passionate about making complex technology accessible to business leaders.

View all articles