Nano Banana Pro API

Flagship 2K–4K studio visual · Up to 14 refs

POST /v1/images/generations · https://api.callmodels.dev/v1/images/generations
Try in Playground

Pricing & specification tiers

Fixed per-image pricing: 3.9 Credits (1K / 2K) or 5.8 Credits (4K) per image. Passing 1–14 reference images in image_urls adds 0 extra Credits.

SpecificationPrice (USD)Credits ($1 = 100)Per $10 Est.
1K output · 0–14 ref images included$0.03903.900000 Credits~256 images
2K output (default) · 0–14 ref images included$0.03903.900000 Credits~256 images
4K ultra-HD output · 0–14 ref images included$0.05805.800000 Credits~172 images

Request parameters

Local reference assets: upload via POST /v1/files/uploads (0 Credits) for a 24h signed URL.
ParameterType & DefaultConstraints
Authorization
RequiredHeader
string
Bearer sk-... server-side API key from your account.
Idempotency-Key
OptionalHeader
stringDefault: recommended
1 to 255 ASCII chars. Prevents duplicate submissions and charges for 24h.
model
Required
"nano-banana-pro"
Stable public model ID for Google Nano Banana Pro.
prompt
Required
string
1 to 10,000 UTF-8 characters describing the desired image or multi-reference composition.
resolution
Optional
"1K" | "2K" | "4K"Default: "2K"
Output resolution tier ("1K" / "2K" = 3.9 Credits; "4K" = 5.8 Credits).
size
Optional
"auto" | "1:1" | "16:9" | "9:16" | "4:3" | "3:4" | "3:2" | "2:3" | "4:5" | "5:4" | "21:9"Default: "auto"
Supports "auto" and 10 standard aspect ratios at identical per-tier pricing.
image_urls
Optional
string[] (1..14)Default: omitted
Optional 1–14 downloadable HTTPS reference images (JPG/PNG/WebP), included at 0 extra Credits.
n
Optional
1Default: 1
Outputs 1 image per task; submit concurrent async tasks for batch throughput.

Code examples

# 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": "nano-banana-pro",
  "prompt": "Hand-blown amber botanical perfume flacon on travertine stone, warm studio rim light",
  "size": "16:9",
  "resolution": "2K"
}'

# 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"
fi

Task responses

On completed, read results[0].url (30-day signed link, no auth header) and usage.cost_credits.

HTTP/1.1 202 Accepted
X-Request-Id: req_example
Cache-Control: no-store

{
  "id": "task_01e561ba-859e-47fe-be79-60bc6f1d6499",
  "model": "nano-banana-pro",
  "object": "image.generation.task",
  "created_at": "2026-11-21T00:00:00.000Z",
  "status": "pending"
}

Error codes

HTTP / Error CodeCause & HandlingBilling
400 invalid_parameter400 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_keyCheck the server-side Bearer key, expiration and revocation status.0 Credits for this rejection
402 insufficient_balance402 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_denied403 account_disabled
Check the model allowlist and account status.0 Credits for this rejection
404 not_foundCheck the task ID or original Idempotency-Key and the account that submitted it.0 Credits for this rejection
409 idempotency_key_conflictUse the original JSON for this job. Assign a fresh key only to a new job.0 Credits for this rejection
413 body_too_large415 unsupported_media_type
Send application/json with a request body no larger than 128 KiB.0 Credits for this rejection
500 internal_error503 service_unavailable503 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_failedTask: submission_unknownTask: submission_rejectedTask: upstream_failedTask: timeout
The task ended. Its hold was released. Review error.code before creating a separate generation job.0 Credits charged