Platform
Catalog/Generate image/Grok Imagine 2.0
TEXT → IMAGE · xAI

Grok Imagine 2.0

Grok Imagine 2.0 is the second generation of xAI's Grok Imagine image model, generating images at 1K or 2K from text, with low and medium quality settings.
PRICE0.105 creditsper image
AVG TIME~12sestimate
OUTPUTimagesync
Open in playground

Inputs

promptrequired · text
params.aspect_ratio1:1 | 4:3 | 3:2 | 16:9 | 2:1 | 19.5:9 | 20:9 | 21:9 | 5:2 | 3:4 | 2:3 | 9:16 | 1:2 | 9:19.5 | 9:20 · default 1:1
params.resolution1K | 2K · default 1K
params.n1 | 2 | 3 | 4 · default 1
Monthly estimate
1,000 × 0.105 credits105.00 credits
curl https://platform.4i.app/api/v1/run \
  -H "Authorization: Bearer $FOURI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "service": "xai/grok-imagine-2-0",
    "input": {
      "prompt": "Describe an image…"
    },
    "params": {
      "aspect_ratio": "1:1",
      "resolution": "1K"
    }
  }'
Every output has an artifact_id. Pass it as input to any compatible service.
Get your API key →