Grok Imagine Image 2.0 API Key
Get a Grok Imagine Image 2.0 API key in about two minutes. One Cheaper Gen. key calls Grok Imagine Image 2.0 — 2 endpoints — and every other model in the catalog, from $0.022/image, 45% below xAI's official price. Prepaid, no subscription.
- Key
- Free
- pay per use
- Credits from
- $10
- ≈ 454 test images
- First request
- $0.022
- text-to-image
- Models per key
- 41
- 12 developers
Step by step
How to get a Grok Imagine Image 2.0 API key
- 1
Create an account
Sign up with Google or a magic link sent to your email. No sales call and no waitlist.
- 2
Add credits
Credits are prepaid in US dollars, from $10 by card. $10 covers about 454 1K · low images with Grok Imagine Image 2.0 ($0.022 each). Turn on auto top-up if you don't want jobs to stop.
- 3
Create the key
Open Dashboard → API keys, name the key (e.g. “grok imagine-prod”) and copy it. Keys start with
cg_live_, and the full key is shown only once. - 4
Store it as an environment variable
Put it in
CHEAPERGEN_API_KEYon your server or in your secrets manager — never in a browser bundle, mobile app or public repository. - 5
Call Grok Imagine Image 2.0
Send the request below. It costs $0.022 (63% below the official $0.06) and returns a generation id you can poll or receive by webhook.
Your first Grok Imagine Image 2.0 request
curl -X POST https://cheapergen.com/api/v1/run/xai/grok-imagine-image/text-to-image \
-H "Authorization: Bearer $CHEAPERGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Fashion editorial: a model in a sculptural orange coat on a salt flat at noon, harsh shadows, medium format",
"aspect_ratio": "1:1",
"resolution": "1K",
"quality": "medium"
}'What the key unlocks
Grok Imagine Image 2.0 endpoints on your key
Every Grok Imagine Image 2.0 endpoint, with its starting price. The same key also runs the other 40 models.
| Task | Endpoint | From |
|---|---|---|
| Text to Image | POST /api/v1/run/xai/grok-imagine-image/text-to-image | $0.022/image |
| Image Edit | POST /api/v1/run/xai/grok-imagine-image/edit | $0.022/image |
Security
Keep your key safe
Anyone with the key can spend your balance. Details in the authentication docs.
Server-side only
Call the API from your backend. Never ship a key in a browser bundle, mobile app or public repository.
One key per app
Separate keys for production, staging and each integration let you revoke one without touching the others.
Rotate without downtime
Create a new key, deploy it, then revoke the old one. Revocation takes effect immediately.
Watch last-used times
The dashboard shows when each key was last used, so unused or unexpected keys stand out.
Compared
A Cheaper Gen. key vs a key from xAI
| Aspect | Cheaper Gen. | xAI directly |
|---|---|---|
| Price | $0.022/image at 1K · low | $0.04/image (official list) |
| Models on one key | 41 models from 12 developers | xAI models |
| Billing | Prepaid USD credits, per use, failed runs refunded | xAI's own billing |
| Same model | Yes — official Grok Imagine Image 2.0 | Yes — official Grok Imagine Image 2.0 |
FAQ
