Nano Banana image models

This page covers how to call each Nano Banana model ID and how it is billed. The shared protocol is described in Image generation API.

Model ID Endpoint Max images per request Price (by resolution)
nano-banana-2.0 POST /v1/images/generations 1 1080p $0.0707 / 2K $0.1188 / 4K $0.1654 per image
nano-banana-pro POST /v1/images/generations 1 1080p $0.1414 / 2K $0.1414 / 4K $0.2586 per image

The console model page is authoritative for prices.

How calls work

  • The request is synchronous: the gateway waits for the image to finish and returns it in one response. It waits up to 10 minutes, then returns 504 upstream_timeout.
  • Images are returned as b64_json only (Base64 PNG), never as url. Omit response_format or set it to b64_json; any other value returns 400.
  • Output size is defined by aspect ratio + resolution tier. Pass aspect_ratio and resolution directly, or pass an OpenAI-style size (WIDTHxHEIGHT); the gateway maps the short side to a tier: 1080 → 1080p, 1440 → 2K, 2160 → 4K, any other short side returns 400, and the size ratio must be one the model supports. If you pass both forms they must agree.
  • Reference images go in image (one URL or an array) or images (array). Only publicly reachable HTTP(S) image URLs are accepted, not Base64.
  • One image per request (n must be 1). quality and stream are not supported, and /v1/images/edits is not available.

Request parameters

One complete parameter table per model ID. Pick a model in Model ID at the top to see only its parameters.

nano-banana-2.0

Parameter Type Required Default Allowed values Description
model string Yes — nano-banana-2.0 Model ID
prompt string Yes — 1–2000 characters Image description; must not be empty
n integer No 1 1 only One image per request
aspect_ratio string No 1:1 1:1 / 4:3 / 3:4 / 16:9 / 9:16 / 3:2 / 2:3 / 21:9 Output aspect ratio; does not affect price
resolution string No 1080p 1080p / 2k / 4k (1440p / 2160p also accepted) Resolution tier; sets the price
size string No — WIDTHxHEIGHT with short side 1080 / 1440 / 2160 Alternative to aspect_ratio + resolution, e.g. 1920x1080 = 16:9 + 1080p. auto is not allowed
image / images string / string[] No — Up to 14 HTTP(S) image URLs Reference images; omit for text-to-image. Does not affect price
response_format string No b64_json b64_json only Returns Base64 images
stream boolean No false false only Streaming is not supported; true returns 400

nano-banana-pro

Parameter Type Required Default Allowed values Description
model string Yes — nano-banana-pro Model ID
prompt string Yes — 1–2000 characters Image description; must not be empty
n integer No 1 1 only One image per request
aspect_ratio string No 1:1 1:1 / 4:3 / 3:4 / 16:9 / 9:16 / 3:2 / 2:3 / 21:9 Output aspect ratio; does not affect price
resolution string No 1080p 1080p / 2k / 4k (1440p / 2160p also accepted) Resolution tier; sets the price (1080p and 2K cost the same)
size string No — WIDTHxHEIGHT with short side 1080 / 1440 / 2160 Alternative to aspect_ratio + resolution, e.g. 1920x1080 = 16:9 + 1080p. auto is not allowed
image / images string / string[] No — Up to 14 HTTP(S) image URLs Reference images; omit for text-to-image. Does not affect price
response_format string No b64_json b64_json only Returns Base64 images
stream boolean No false false only Streaming is not supported; true returns 400

Billing

  • Billed per image. The price depends only on the resolution tier (or the tier derived from the short side of size), not on the aspect ratio or the number of reference images.
  • The per-image price for that tier is held at submission and settled on the number of images actually returned (one for these models).
  • Failed or timed-out generations are not charged.

Example: one nano-banana-2.0 image with "aspect_ratio": "16:9", "resolution": "4k" costs $0.1654.

Example

curl https://api.admesh.ai/v1/images/generations \
  -H "Authorization: Bearer $ADMESH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "nano-banana-pro",
    "prompt": "A watercolor lighthouse on a cliff at dawn",
    "aspect_ratio": "16:9",
    "resolution": "2k",
    "images": ["https://example.com/reference.jpg"]
  }'

Response:

{
  "created": 1762650000,
  "data": [
    { "b64_json": "iVBORw0KGgo…" }
  ]
}