-preview suffixed names are not accepted.
All models in the series take the same request shape, so switching between them
is a one-word change to model.
The series at a glance
Reach for Nano Banana 2 by default: it is meaningfully faster at every
resolution and takes the same parameters, so nothing about your integration
changes. Move to Nano Banana Pro when the extra quality is worth roughly ten
more seconds per image.
Parameters
Everything goes insideinput. The envelope around it — model, input,
callback_url — is described in the async task API.
These five fields are the complete set. Any other key inside input is rejected
with invalid_params, so a typo fails loudly instead of being ignored.
Resolution tiers
image_size scales the whole frame rather than pinning one edge, so the long
edge of a wide image at 4K is well past 4096 pixels. Measured, and identical
on both available models:
File sizes follow: roughly 0.4–0.7 MB at
1K, 2.4–3.0 MB at 2K, and
7.5–8.2 MB at 4K. Output is always JPEG carrying a C2PA content-credentials
manifest.
Aspect ratios
Ten values are accepted. Measured pixels at1K on gemini-3-pro-image:
Every ratio landed within one percent of nominal. Omit
aspect_ratio and a text
prompt gives you 1024 × 1024; when you pass images, the output follows the
source image’s shape instead.
Editing and composition
Pass reference images inimages to edit them or compose from them. Each entry
is either an https URL or a base64 data URI — a bare base64 string with no
data-URI prefix is rejected, and so is plain http.
aspect_ratio, image_size and n all
still apply — an edit at 4K really does come back at 4096 × 4096.
URLs are fetched server-side after the task is accepted, so a bad reference
produces a failed task rather than a 400. The two failure codes tell you
which layer gave up:
Both fail before any model work, so they are fast and cheap to retry.
Latency
Async figures come from 30 tasks at concurrency 12; sync figures from single calls. Treat these as orders of magnitude, not a service-level guarantee.
Async costs about 0.9 s of extra round trip in exchange for not holding a
connection for the other 20–40 seconds. Queue time was 0–11 seconds under load
and is already folded into the end-to-end figures.
Synchronous surfaces
Three synchronous shapes work for both available models, and all three return the image inline rather than as a URL:Next steps
Playground
Send a real request from this page and watch the task run.
Async task API
The envelope, polling loop, callbacks and error table.