Grok Imagine Image 2.0 API
Grok Imagine Image 2.0 API: $0.05 to $0.10 per image, prepaid, no subscription. xAI's image model on one key; a failed generation is not charged.
grok-imagine-image-2.0Imagesper image
Price · per image, USD
Get a key| Settings | UplinkSwitch |
|---|---|
| resolution 1K, quality low | $0.05 |
| resolution 1K, quality medium | $0.075 |
| resolution 2K, quality low | $0.075 |
| resolution 2K, quality medium | $0.10 |
Charged when the request is accepted; refunded in full if the generation fails.
What a run costs · USD, live
The lowest-priced settings (resolution 1K, quality low) bill $0.05 per image; the highest-priced (resolution 2K, quality medium) $0.10.
| Run | At $0.05 per image | At $0.10 per image |
|---|---|---|
| One image | $0.05 | $0.10 |
| 10 images | $0.50 | $1.00 |
| 100 images | $5.00 | $10.00 |
Compare · per image, live
Grok Imagine Image 2.0 from $0.05 per image; FLUX 1.1 Pro from $0.05; Muse Image from $0.044.
Call it · POST /v1/images/generations or POST /v1/generations
Python, OpenAI SDK
from openai import OpenAI
client = OpenAI(base_url="https://api.uplinkswitch.com/v1", api_key="sk-uplink-live-...")
result = client.images.generate(
model="grok-imagine-image-2.0",
prompt="A red paper boat on a calm blue pond, morning light",
)
print(result.data[0].url)curl
curl https://api.uplinkswitch.com/v1/images/generations \
-H "Authorization: Bearer $UPLINK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-imagine-image-2.0",
"prompt": "A red paper boat on a calm blue pond, morning light"
}'
# the image URL is in data[0].urlPOST /v1/images/generations answers like OpenAI's image API, with the image URL in data[0].url, on our domain. Past about 100 seconds it answers 504 with a generation id to poll on GET /v1/generations/{id}.
Settings · in input
| Name | Type | Values | Default |
|---|---|---|---|
| prompt required | string | — | — |
| aspect_ratio | string | 1:1, 2:3, 3:2, 9:16, 16:9 | 1:1 |
| resolution | string | 1K, 2K | 1K |
| quality | string | low, medium | medium |
| n | integer | — | 1 |
Questions
From $0.05 per image. The price depends on the settings in the table and is fixed when the request is accepted.
Create one in the console at uplinkswitch.ai/console: prepaid credit from $10, no subscription, and the key is live at once. Send it as the bearer token to /v1/images/generations with model grok-imagine-image-2.0; the same key calls every other model in the catalog.
No. You add credit and each request is paid from it. There is no monthly fee and no minimum per request.
It is refunded in full, automatically. You pay only for files you receive.
Thirty days, at a URL on api.uplinkswitch.com. Download what you want to keep.
Yes. The same key calls every image, video, speech and 3D model and every chat model in the catalog.
All image, video, speech and 3D models · How the media API works · Grok text models: Grok API pricing