xAI logo

Grok Imagine 2.0 (image-to-image) API

x-ai/grok-imagine-image-2-0-edit

Make images with Grok Imagine 2.0 (image-to-image) through UberLLM — $0.0896 per image, routed to the cheapest healthy seller. xAI. Fee included.

Grok Imagine 2.0 (image-to-image) pricing

Price now
$0.0896 per image
List price
$0.0896 per image

UberLLM routes every request to the cheapest healthy seller for this model. The price shown includes UberLLM’s 10% fee.

How to use it

One request with your UberLLM key; the image comes back in the answer.

bash
# Make an image: the answer comes back when it is ready.
curl https://api.uberllm.dev/v1/images/generations \
  -H "Authorization: Bearer $UBERLLM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "x-ai/grok-imagine-image-2-0-edit", "prompt": "a red apple on a white table", "n": 1, "size": "1024x1024"}'

# → {"created": …, "data": [{"url": "https://api.uberllm.dev/v1/media/artifacts/<id>/0"}]}
#   (or "b64_json" when you send "response_format": "b64_json")

# Download it
curl -L -o image.png -H "Authorization: Bearer $UBERLLM_API_KEY" "https://api.uberllm.dev/v1/media/artifacts/<id>/0"

Grok Imagine 2.0 (image-to-image) API — FAQ

How much does Grok Imagine 2.0 (image-to-image) cost?

Grok Imagine 2.0 (image-to-image) is $0.0896 per image through UberLLM right now. That price for an image includes UberLLM's 10% fee. A request that fails costs nothing.

How do I make an image with Grok Imagine 2.0 (image-to-image)?

Send a POST to https://api.uberllm.dev/v1/images/generations with your UberLLM key, model "x-ai/grok-imagine-image-2-0-edit" and a prompt. The image comes back in the answer.

More xAI models