Skip to main content
Lesson 5 of 14 · Grok Models: Complete Guide

grok-imagine-image: Image Generation

Lesson 5 of 14 Updated November 2, 2026 Beginner
On this page
  1. Image Generation by xAI
  2. Two Models
  3. Comparing the Two Models
  4. The API Endpoint
  5. Batch API for Images
  6. Best Practices for Image Prompts
  7. Key Takeaways

Updated November 2, 2026 — Imagine. grok-imagine-image-quality is retired as of November 2, 2026: its requests are now served by Imagine Image 2.0 (grok-imagine-image-2.0, $0.04 per image) in low quality. Replace the identifier in your examples and set the desired quality; grok-imagine-image (version 1.0) is unaffected. Imagine Image 2.0 accepts up to five reference images and the auto quality setting, which is now the default.

Image Generation by xAI

Since March 2025, xAI has offered its own image generation models under the Grok Imagine brand. As of November 2, 2026, the lineup includes two models: Imagine 1.0, affordable and built for volume, and Imagine 2.0, costlier, with quality settings. The “Pro” model from previous versions of this course, grok-imagine-image-quality, is retired as of November 2, 2026: its requests are now served by Imagine 2.0 in low quality.

If you need to generate visuals for your applications—illustrations, mockups, marketing content, creative assets—Grok Imagine models integrate directly into the xAI API with per-image billing.

Two Models

grok-imagine-image (Imagine 1.0)

The model built for volume. At $0.02 per image, it lets you produce visuals at scale without breaking the budget; its official documentation lists 6 requests per second. Use it for prototypes, creative variants, and automated content.

grok-imagine-image-2.0 (Imagine 2.0)

The model for final visuals, at $0.04 per image in low quality. It accepts a quality parameter (low, medium for finer details, or auto, the default value), and each image is billed at the served quality. It also accepts up to five source images for editing and the 21:9 and 5:2 aspect ratios; its official documentation lists 6 requests per second.

Comparing the Two Models

FeatureImagine 1.0Imagine 2.0
Model IDgrok-imagine-imagegrok-imagine-image-2.0
Cost per image$0.02$0.04 in low; medium at grid rate
Throughput (official specs)6 requests per second6 requests per second
Quality settingNolow, medium, auto
Use casesVolume, prototypingPublishing, marketing, editing

The API Endpoint

Image generation uses the /v1/images/generations endpoint. Here is the structure of a typical call:

response = client.images.generate(
    model="grok-imagine-image",
    prompt="A mountainous landscape at sunset, oil painting style",
    n=1,
    extra_body={"aspect_ratio": "1:1"},
)
image_url = response.data[0].url

You can specify different resolutions and aspect ratios based on your needs: square (1024x1024), landscape (1536x1024), portrait (1024x1536), and other combinations.

Batch API for Images

Since March 2026, the Batch API supports image generation. This lets you submit batches of prompts and retrieve results asynchronously. Images via the Batch API are billed at the standard rate—unlike text tokens, they do not receive the 50% discount.

Batch is particularly useful for generating image libraries: variants of a single concept, thematic series, collections of illustrations for a website.

Best Practices for Image Prompts

The quality of generated images depends heavily on prompt quality. A few tips:

  • Be specific about artistic style: “watercolor”, “macro photography”, “vector illustration”
  • Describe the composition: foreground, background, viewing angle, lighting
  • Specify dominant colors if you have brand guideline constraints
  • Indicate the expected level of detail: minimalist, detailed, hyperrealistic

Pricing as of August 5, 2026 — prices change regularly: before any budget calculation, check the current grid on the official xAI models and pricing page.

Key Takeaways

  • Two models: Imagine 1.0 at $0.02/image (volume) and Imagine 2.0 at $0.04/image (quality)
  • Both models support 6 requests per second
  • The endpoint is /v1/images/generations
  • The Batch API has been available since March 2026 for batch processing
  • Batch images do not receive the 50% discount
  • Prompt quality is critical for good results