Skip to content
xAIChecking

xai/grok-imagine-2.0/text-to-image

xai-grok-imagine-2-0-text-to-image-economy

text to imageOutput: ImageInput: text
Loading price…
Official list price · Not verified
Get API key

Parameters

Required
prompt: stringrequired

≤ 4000 chars

numImages: stringrequired

Number of images to generate (1–12). Billed by successfully delivered images.

Common options
aspectRatio: string

Output image aspect ratio (API size whitelist).

Request preview

{
  "model": "xai-grok-imagine-2-0-text-to-image-economy",
  "input": {
    "aspectRatio": "1:1",
    "numImages": "1"
  }
}

The web playground sends this body with your signed-in session. From code, send the same body with an API key.

Estimated charge

Loading price…

Credits are reserved when a task is accepted and charged only on success. Failed tasks release the reservation; unconfirmed outcomes remain reserved until verified.