Grok Imagine Image 2.0 API

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

An image model, called through Hyperouter's OpenAI-compatible API. Generate and edit, as above.

Price

TierPrice
Base rate$0.04 per image
quality medium$0.06 per image
2K$0.06 per image
2K · quality medium$0.08 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-2.0", "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.