Grok Imagine Image API

Model id: x-ai/grok-imagine-image.

An image model, called through Hyperouter's OpenAI-compatible API. Generate and edit. Up to 10 images, up to 5 input images.

Price

ModelDoesPrice
x-ai/grok-imagine-imageGenerate and edit. Up to 10 images, up to 5 input images.$0.02 per image

Call it with the OpenAI SDK

Set HYPEROUTER_API_KEY to an API key from the dashboard. Any OpenAI SDK works once its base URL is https://api.hyperouter.app/v1.

curl https://api.hyperouter.app/v1/images/generations \
  -H "Authorization: Bearer $HYPEROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "x-ai/grok-imagine-image", "prompt": "A lighthouse at dusk", "n": 1}'

Reference

Sign in with Google or GitHub, create an API key, and open a top-up ticket to add credits. You are charged at the provider's list price.