MODEL IDxai:grok-imagine@image-2.0
live

Grok Imagine Image 2.0 Preview

xAI
by xAI

Grok Imagine Image 2.0 Preview is xAI's next-generation image generation and editing model for both text-to-image and prompt-guided image transformation. It keeps the same core workflow as the current Grok Imagine image family, including aspect-ratio control and image-based editing, while adding a dedicated quality parameter so teams can tune output fidelity within the same API shape. It is a strong fit for creative production pipelines that want one Grok image endpoint for generation, editing, and quality-sensitive iteration without switching to a separate model family.

Grok Imagine Image 2.0 Preview

Prompting Grok Imagine Image 2.0

How to write text-to-image prompts for Grok Imagine Image 2.0: structuring a shot, directing the camera and light, the 1K and 2K aspect pairs, and its factual detail.

Introduction

Grok Imagine Image 2.0 is xAI's image model built for images you can actually ship, not just pretty renders. It reads a prompt the way a photographer reads a brief, holds the subject, the framing, and the light together, and keeps the small real-world details right that most models fumble. It ranks second on the public text-to-image and image-edit leaderboards, and the gap it closes is factual, production-ready detail.

This guide covers the request shape, how to structure a prompt, directing the camera and light, the fixed 1K and 2K size pairs, and leaning on the model's factual accuracy. Rendering readable text in the image is its own strength with its own text guide, and editing an existing image is covered in the editing guide.

The request

A text-to-image call is an imageInference task. Only positivePrompt is required, and for text-to-image you also pass an explicit width and height.

import { createClient } from '@runware/sdk'

const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()

const [result] = await client.run({
  model: 'xai:grok-imagine@image-2.0',
  positivePrompt: 'A cinematic full-length fashion editorial photograph of a model in an oversized camel wool coat and cream knit on a rain-slicked city street at blue hour, warm shop lights behind her, shallow depth of field, medium-format sharpness, editorial magazine quality.',
  width: 1776,
  height: 2368
})
import asyncio
import os

from runware import Runware


async def main():
    async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
        results = await client.run({
            "model": "xai:grok-imagine@image-2.0",
            "positivePrompt": "A cinematic full-length fashion editorial photograph of a model in an oversized camel wool coat and cream knit on a rain-slicked city street at blue hour, warm shop lights behind her, shallow depth of field, medium-format sharpness, editorial magazine quality.",
            "width": 1776,
            "height": 2368
        })


asyncio.run(main())
curl https://api.runware.ai/v1 \
  -H "Authorization: Bearer $RUNWARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "taskType": "imageInference",
      "taskUUID": "b1f2a3c4-d5e6-4789-a012-3456789abcde",
      "model": "xai:grok-imagine@image-2.0",
      "positivePrompt": "A cinematic full-length fashion editorial photograph of a model in an oversized camel wool coat and cream knit on a rain-slicked city street at blue hour, warm shop lights behind her, shallow depth of field, medium-format sharpness, editorial magazine quality.",
      "width": 1776,
      "height": 2368
    }
  ]'
runware run xai:grok-imagine@image-2.0 \
  positivePrompt="A cinematic full-length fashion editorial photograph of a model in an oversized camel wool coat and cream knit on a rain-slicked city street at blue hour, warm shop lights behind her, shallow depth of field, medium-format sharpness, editorial magazine quality." \
  width=1776 \
  height=2368
{
  "taskType": "imageInference",
  "taskUUID": "b1f2a3c4-d5e6-4789-a012-3456789abcde",
  "model": "xai:grok-imagine@image-2.0",
  "positivePrompt": "A cinematic full-length fashion editorial photograph of a model in an oversized camel wool coat and cream knit on a rain-slicked city street at blue hour, warm shop lights behind her, shallow depth of field, medium-format sharpness, editorial magazine quality.",
  "width": 1776,
  "height": 2368
}
Response
[
  {
    "taskType": "imageInference",
    "taskUUID": "b1f2a3c4-d5e6-4789-a012-3456789abcde",
    "imageUUID": "7c1b2d3a-4e5f-6789-abcd-ef0123456789",
    "imageURL": "https://im.runware.ai/image/os/a14d18/ws/2/ii/7c1b2d3a-4e5f-6789-abcd-ef0123456789.jpg"
  }
]

Four things shape a text-to-image request:

  • positivePrompt is required. There is no character ceiling to worry about in practice, but detail past a point competes with itself, so keep every clause carrying weight.
  • width and height are a fixed pair, not free numbers. Each pair is one of 13 aspect ratios at either the 1K or 2K tier, listed under Sizes and aspect ratios. Pass a pair that isn't on the list and the request is rejected.
  • resolution (1K or 2K) is a shorthand that only applies when editing an image. For text-to-image it isn't accepted, and it can't be combined with width and height. The editing guide uses it.
  • settings.quality currently exposes a single medium level, so there is nothing to tune there yet.

Structuring the prompt

The model rewards a prompt that separates the subject, the setting, the composition, the light, and the finish. Each becomes a directive it tries to satisfy, so naming all five keeps the decisions with you instead of the model's defaults.

a short stack of golden buttermilk pancakes with melting butter and a thin drizzle of maple syrup, on a pale oak table with a bowl of fresh berries, a glass of orange juice, and a folded linen napkin, overhead flat-lay, clean and balanced, bright soft natural window light from the left, editorial food photography, fresh airy colour grade, shallow depth of field, crisp detail
SubjectSettingCompositionLightFinish

Each layer earns its place. The subject fixes what the shot is about, the setting grounds it in a real place, and the composition and light are what separate a snapshot from a shot that looks directed. The finish clause sets the register, editorial photography versus product render versus flat illustration, and skipping it hands the look to the model.

Directing the shot

Grok Imagine reads photographic language directly. Name the framing, the lens, and the light in the terms a photographer uses and it applies them rather than guessing.

The terms that land: framing and shot size (wide shot, close-up, overhead flat-lay, three-quarter portrait), lens behaviour (wide-angle with straight verticals, telephoto compression, shallow depth of field), camera height and angle (eye-level, low angle, top-down), and the light (golden hour, soft window light, hard studio key, backlit). Pair the framing with the light and the model composes to both. Leave them out and it defaults to a centered, evenly-lit middle distance.

Sizes and aspect ratios

Text-to-image runs on fixed size pairs, one width and height per aspect ratio, at two tiers. 1K is the fast everyday tier, and 2K roughly doubles each edge for print, large crops, and fine detail. Both cover the same 13 aspect ratios:

  • Square and near-square: 1:1, 4:3, 3:4.
  • Photo and screen: 3:2, 2:3, 16:9, 9:16.
  • Wide and tall extremes: 2:1, 1:2, 19.5:9, 9:19.5, 20:9, 9:20.

The aspect changes what the model puts in frame, not just the crop. The same mountain scene fills a wide frame with the valley, centers the figure in a square, and stacks the ridge vertically in a tall one:

Pick the aspect for where the image lands, a 16:9 hero, a 1:1 social post, a 9:16 story, a 2:1 banner, and let the model recompose for it rather than cropping a single render by hand.

Leaning on factuality

The model's headline improvement is factual accuracy: believable proportions, plausible scenes, and the small details a client would catch. It holds up on the shots that usually expose a model, dense crowds, real architecture, legible signage, correct reflections, and everyday objects that have to look right rather than merely plausible.

The practical payoff is fewer regenerations on the shots that matter. When a scene has a lot going on, name the elements that have to be right, the vehicles, the storefronts, the number of people, the reflections, and the model keeps them consistent rather than inventing a vaguer scene. For the same reason it is a strong base for real-work deliverables where a wrong detail is a reshoot.

Tips

  1. Name all five layers. Subject, setting, composition, light, and finish. Dropping any one hands that decision to the model's defaults, and the finish clause is the one most often forgotten.

  2. Direct the shot in photographic terms. Framing, lens, camera height, and light land as instructions. "Wide-angle, eye-level, golden hour" beats leaving the shot to a centered, evenly-lit default.

  3. Pass a valid size pair. width and height must be one of the listed 1K or 2K pairs. Iterate at 1K, then re-render the keeper at 2K for print and large crops.

  4. Match the aspect to the destination. The model recomposes for each aspect, so ask for the 9:16 or 2:1 you actually need instead of hand-cropping a 1:1.

  5. Call out the details that must be right. On busy or real-world scenes, list the elements a client would check, and the model holds them steady instead of drifting to a vaguer version.

  6. Keep resolution for editing. In text-to-image it is not accepted. Use width and height here, and reach for resolution only when editing an image.