ModelSell Docs
ImagesGrok Images

Grok Image Generation

Image requests for grok-imagine-image and grok-imagine-image-2.0.

grok-imagine-image and grok-imagine-image-2.0 use image generation requests.

curl "$MODELSELL_BASE_URL/v1/images/generations" \
  -H "Authorization: Bearer $MODELSELL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"grok-imagine-image-2.0","prompt":"A glass greenhouse under soft morning light","n":1,"response_format":"url"}'

Read data[].url, or data[].b64_json when requesting Base64. Download temporary URLs promptly. Resolution, aspect ratio and batch limits depend on the version and channel.

Image editing uses the image-editing API and its own request format. A catalog chat label does not establish chat support for an image model.

Source checked 2026-10-04: xAI image generation documentation.