First Test Cost
- $10 top-up yields ~266 images (1K low) ($1 = 100 Credits, no subscription)
- $0 charged on failed or timed-out tasks—100% of held credits return automatically
xAI Grok Imagine Image 2.0 API for bold cinematic aesthetics, typography, 1–3 reference image editing, and batch generation up to n=10 images per request across 1K/2K and low/medium quality tiers.
grok-imagine-image-2.0POST /v1/images/generationsPreview live credit estimates and export cURL without signing in, or sign in to upload local reference images and generate real samples.
Supports 1–3 reference images (+0.9375 Credits per ref image, once per request).

Fixed per-image pricing (3.75–7.5 Credits × n delivered images). Each reference image in image_urls (1–3) adds +0.9375 Credits once per request (not multiplied by n).
| Specification | Ref credits | USD equiv | Official reference | Per $10 |
|---|---|---|---|---|
| 1K · low quality · Per output image | 3.750000 Credits | $0.0375 | ~266 images | |
| 1K · medium quality (default) · Per output image | 5.625000 Credits | $0.0563 | ~177 images | |
| 2K · low quality · Per output image | 5.625000 Credits | $0.0563 | ~177 images | |
| 2K · medium quality · Per output image | 7.500000 Credits | $0.0750 | ~133 images | |
| Reference image surcharge (each image in image_urls, 1–3, once per request) | +0.937500 Credits / ref | +$0.00938 | Per ref (once/call) |
Choose output settings and expected call volume to estimate your spend in Credits and USD.
grok-imagine-image-2.01K–2K image & 3-ref editing · Up to 10/call
Grok Imagine Image 2.0 API brings xAI’s signature cinematic lighting, expressive styling, and multi-variant batch generation to Callmodels’ unified POST /v1/images/generations endpoint. Choose 1K or 2K resolution, low or medium quality, "auto" plus 13 aspect ratios (including mobile 19.5:9 and 20:9), 1–3 reference images, and n=1..10 concurrent outputs in a single API call.
Pricing is deterministic per delivered image (3.75 Credits at 1K low, 5.625 Credits at 1K medium / 2K low, and 7.5 Credits at 2K medium, -6% vs. official list). When image_urls is supplied, each reference image (1–3) adds +0.9375 Credits once per request (not multiplied by n).
Connect Callmodels Remote MCP to Claude, ChatGPT, or Google Gemini via zero-key browser sign-in. Run Grok Imagine Image 2.0 in plain English inside chat with upfront price quotes before any spend.
Connect Chat AssistantSend standard JSON requests to POST /v1/images/generations on https://api.callmodels.dev with account-scoped Idempotency-Key deduplication and 30-day signed result URLs—zero vendor SDK lock-in.
Jump to API ReferenceCopy a self-contained engineering prompt with exact endpoint, schema constraints, polling loop, and error handling—paste straight into Cursor, Claude Code, or Codex.
Generate 4 to 10 distinct compositions in one async task so users can pick their favorite frame immediately.
Create cohesive start frames and subject sheets tuned to xAI’s visual aesthetic, then animate them in Grok Imagine Video 1.5.
Native 9:19.5 and 9:20 aspect ratios fit modern smartphone screens edge-to-edge without cropping.
| Model | Billing Mode | Max Spec | Starting Price | Output per $10 | Best For |
|---|---|---|---|---|---|
| Nano Banana Pro | Fixed per image | 4K · 14 refs included · 10 ratios | $0.0390 / img | 256 imgs (2K) | 2K–4K flagship studio photography, typography & 14-ref fusion |
| Nano Banana 2.1 | Fixed per image | 4K · 14 refs · 14 ratios (4:1–8:1) | $0.0220 / img | 454 imgs (1K) | Fast low-cost 1K–4K generation, 4:1/8:1 banners & 14-ref edits |
| Grok Imagine Image 2.0 | Fixed per image | 2K · n=1..10 batch · 1–3 refs | $0.0375 / img | 266 imgs (1K low) | Cinematic aesthetics, mobile 19.5:9/20:9 & n=1..10 batch variants |
| GPT Image 2.6 Flare | Actual tokens | 4K · 16 refs · Mask & GIF | $0.0139 / img | ~721 imgs (16:9 low) | Fast production, 16-ref/mask editing & animated GIFs |
| GPT Image 2.6 Sunburst | Actual tokens | 4K · Studio precision · 16 refs | $0.0139 / img | ~721 imgs (16:9 low) | Hero product renders, macro materials, mask edits & GIFs |
| Seedream 5.5 | Fixed per image | 2K · One output per request · PNG/JPEG | $0.0200 / img | 500 imgs (1K / 1.5K) | Fixed per-image rates and transparent cutouts |
At acceptance, Callmodels holds n × the per-image tier rate (+0.9375 Credits × reference image count if image_urls is present). Upon completion, you are charged strictly for the number of verified output images actually delivered in results[], and any unused hold returns automatically.
No. Each reference URL in image_urls (1–3) adds +0.9375 Credits ($0.00938) once per request—even when n=10, reference images are never multiplied by n.
Grok Imagine Image 2.0 defaults to resolution "1K", quality "medium" (5.625 Credits), size "auto", and n = 1.
No. Output encoding (JPEG/PNG) is selected automatically by the model and verified by magic bytes before signing your 30-day files.callmodels.dev URLs.
Never. Any task ending in failed settles at 0 Credits and releases 100% of held credits.
Submit to POST /v1/images/generations with your Bearer key and a stable Idempotency-Key. Query the returned task ID for its result links and settled credits.
Includes exact endpoint, parameter constraints, async polling loop, and error handling—paste straight into your coding agent.
https://api.callmodels.dev/v1/images/generationsGET /v1/tasks/{task_id}grok-imagine-image-2.01K / 2K Generation, 1–3 Ref Editing & Batch n=1..10| Parameter | Type | Allowed values & notes |
|---|---|---|
Authorizationheader · Required | string | Bearer sk-... server-side API key from your account. |
Idempotency-Keyheader · Optional (recommended) | string | 1 to 255 ASCII chars. Prevents duplicate submissions and charges for 24h. |
modelbody · Required | "grok-imagine-image-2.0" | Stable public model ID for xAI Grok Imagine Image 2.0. |
promptbody · Required | string | 1 to 5,000 UTF-8 characters describing the scene or edit. |
resolutionbody · Optional ("1K") | "1K" | "2K" | Output resolution tier. |
qualitybody · Optional ("medium") | "low" | "medium" | Rendering quality tier combined with resolution. |
sizebody · Optional ("auto") | "auto" | 13 aspect ratios | Supports "auto", "1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3", "2:1", "1:2", "19.5:9", "9:19.5", "20:9", and "9:20". |
nbody · Optional (1) | integer (1..10) | Number of images to generate in one call; settles strictly on delivered count. |
image_urlsbody · Optional (omitted) | string[] (1..3) | Optional 1–3 HTTPS reference images (+0.9375 Credits per reference image, once per request). |
# Set CALLMODELS_OPERATION_ID once per job and keep it for retries.
: "${CALLMODELS_OPERATION_ID:?Set a stable job ID}"
curl --silent --show-error --fail-with-body --max-time 15 "https://api.callmodels.dev/v1/images/generations" \
-H "Authorization: Bearer $CALLMODELS_API_KEY" \
-H "Idempotency-Key: $CALLMODELS_OPERATION_ID" \
-H "Content-Type: application/json" \
--data-binary '{
"model": "grok-imagine-image-2.0",
"prompt": "Brushed silver grand tourer coupe parked on a misty coastal cliff road at dawn",
"size": "16:9",
"resolution": "1K",
"quality": "medium"
}'
# Set TASK_ID to the id from the response, then poll until terminal.
if [ -n "${TASK_ID:-}" ]; then
curl --silent --show-error --fail-with-body --max-time 15 "https://api.callmodels.dev/v1/tasks/$TASK_ID" \
-H "Authorization: Bearer $CALLMODELS_API_KEY"
fiHTTP/1.1 200 OK
X-Request-Id: req_example
Cache-Control: no-store
{
"id": "task_01e561ba-859e-47fe-be79-60bc6f1d6499",
"model": "grok-imagine-image-2.0",
"object": "image.generation.task",
"created_at": "2026-11-21T00:00:00.000Z",
"status": "completed",
"results": [
{
"type": "image",
"url": "https://files.callmodels.dev/task_01e561ba-859e-47fe-be79-60bc6f1d6499/0.jpg?expires=1797811200&sig=example",
"expires_at": "2026-12-21T00:00:00.000Z"
}
],
"usage": {
"cost_credits": "5.625"
}
}| HTTP / Task Error Code | Cause & Recommended Handling | Billing Impact |
|---|---|---|
400 invalid_parameter 400 model_not_found | Use the model ID and parameters documented for the endpoint. Correct the JSON before sending again. | 0 Credits for this rejection |
401 invalid_api_key | Check the server-side Bearer key, expiration and revocation status. | 0 Credits for this rejection |
402 insufficient_balance 402 key_quota_exceeded | Check available account credits and the key’s total and daily limits with GET /v1/credits. | 0 Credits for this rejection |
403 model_access_denied 403 account_disabled | Check the model allowlist and account status. | 0 Credits for this rejection |
404 not_found | Check the task ID or original Idempotency-Key and the account that submitted it. | 0 Credits for this rejection |
409 idempotency_key_conflict | Use the original JSON for this job. Assign a fresh key only to a new job. | 0 Credits for this rejection |
413 body_too_large 415 unsupported_media_type | Send application/json with a request body no larger than 128 KiB. | 0 Credits for this rejection |
500 internal_error 503 service_unavailable 503 model_unavailable | On a timeout or transient error, look up the original job and retry only with its original key and body. | Check the task record |
Task: delivery_failed Task: submission_unknown Task: submission_rejected Task: upstream_failed Task: timeout | The task ended. Its hold was released. Review error.code before creating a separate generation job. | 0 Credits charged |
Sign in with Google to create scoped sk- API keys, top up from $10 with no monthly commitment, and pay $0 on failed calls.