xai/grok-imagine-image-2

xAI's Grok Imagine Image 2.0 — text-to-image generation and editing with a quality control and output up to 2k

155 runs

Grok Imagine Image 2.0

xAI’s Grok Imagine Image 2.0 generates and edits images from text prompts. It’s the latest generation of the Imagine image family, with a quality control that lets you trade speed for fidelity, output up to 2k resolution, and a wide range of aspect ratios.

Overview

Grok Imagine Image 2.0 is a general-purpose text-to-image model. Give it a prompt and it generates an image; give it an image plus a prompt and it edits that image. It handles detailed prompts covering subject, style, lighting, composition, and real-world entities like brands, places, and named objects.

If you want the fastest, cheapest generations, use xai/grok-imagine-image. If you want xAI’s highest-fidelity output, use xai/grok-imagine-image-quality. Image 2.0 sits in between, with a quality knob so you can tune the tradeoff yourself.

What you can do with it

Generate images from text

Describe what you want and the model creates it. Detailed prompts covering subject, style, mood, lighting, and composition work best.

Edit existing images

Upload an image and describe the change you want. The model applies your edit while keeping the overall structure of the original.

Tune quality vs. speed

The quality input accepts low or medium (default medium). Use low for quick drafts and medium for final output.

Output at 1k or 2k

Pick 1k (1024px on the long edge) for a faster image, or 2k (2048px on the long edge) for a high-resolution deliverable. The default is 2k.

Multiple aspect ratios

Choose from square, landscape, portrait, ultrawide, and vertical ratios to match wherever the image is going.

How to write prompts

Be specific. Detailed prompts beat short ones. Describe the subject, setting, lighting, mood, and style — e.g. “A vintage travel poster for Kyoto, Mount Fuji in the background, cherry blossoms in the foreground, art deco typography, rich color blocks.”

Name real things directly. If you want a specific brand, location, or recognizable subject, name it. The model handles real-world knowledge well.

Add style at the end. Append style directives to steer the aesthetic: “oil painting style,” “anime illustration,” “cinematic 35mm film photography.”

For editing, describe the change, not the whole image. “Make the sky a dramatic sunset” works better than re-describing every element.

Inputs

  • prompt — text description of the image you want, or instructions for how to edit the input image
  • image (optional) — input image for editing mode. When provided, the model edits this image based on the prompt. Supports jpg, jpeg, png, webp.
  • aspect_ratio — output aspect ratio (default 1:1). Ignored when editing an image.
  • resolution1k or 2k (default 2k)
  • qualitylow or medium (default medium)

Pricing

You pay $0.04 per output image. When you edit an image, you also pay $0.01 for the input image. So a text-to-image generation costs $0.04, and an edit (one input, one output) costs $0.04 + $0.01 = $0.05.

Try it yourself

Run Grok Imagine Image 2.0 from the Playground at replicate.com/playground, or call it from your code with the Replicate API.

Model created
Model updated