All models

Grok Imagine Image

xai/grok-imagine-image
xAI Image GenerationImage EditingMultimodal

xAI's Grok Imagine image model. Generates and edits images from text and reference-image inputs with configurable aspect ratio and resolution.

Quick start

# Inspect the price — a plain request returns the 402 challenge:
curl -i https://api.glianalabs.com/v1/infer \
  -H "content-type: application/json" \
  -d '{
    "model": "xai/grok-imagine-image",
    "image": <object>,
    "prompt": <string>
  }'

# Pay + run in one step with the mppx CLI (create a wallet: npx mppx account create):
npx mppx https://api.glianalabs.com/v1/infer \
  -J '{"model": "xai/grok-imagine-image", "image": "<object>", "prompt": "<string>"}'

Examples

example
example
example

Parameters

Input
aspect_ratio string
image object
images array
mask object
n integer
prompt string required
quality string
resolution string
response_format string
user string
Output
image: string