xAI · Image
Grok Imagine 2.0 API pricing
xai/grok-imagine-image-2
Image generation & editing. Grok Imagine 2.0 by xAI, routed through INFRO on a xAI account you connect — alongside every other provider you run. xAI bills you for it directly, on that account and at your own rate. INFRO adds routing, failover, request logs, cost attribution and policy around it, and takes no part of what you pay xAI.
Pricing
xAI rate
$0.04
per image, billed to you by xAI
INFRO adds
$0
0% markup on model spend
Calling Grok Imagine 2.0
POST /v1/images/generationsimport os
from infro import Infro
client = Infro(api_key=os.environ["INFRO_API_KEY"])
image = client.images.generate(
model="xai/grok-imagine-image-2",
prompt="studio product shot, soft rim light",
n=1,
)What this modality supports
- Text to image
- Editing & inpainting
- Upscale & restore
- Batch requests
Text-to-image, editing, upscaling, and background removal across the leading image models. One request shape, consistent sizes and seeds, billed per image with no minimums.
Alternatives for image generation & editing
Same modality, nearest in price. All of them share the request shape above, so comparing them is a one-word change.
Work out what Grok Imagine 2.0 would cost you
Put your current spend on this model into the calculator and see the same workload priced here — or have us read your real usage.