Nano Banana Pro API: Integration Guide, Pricing & Code

Modellix cover: a code panel flowing into an async task node and a high-fidelity image output with a Pro badge, headline Nano Banana Pro API Integration Guide

If you want to call the Nano Banana Pro API from your own code, the short version is this: “Nano Banana Pro” is Google’s name for the gemini-3-pro-image model — its highest-fidelity image model, built for text rendering, brand-accurate compositions, and 4K output — and you reach it one of two ways. You can call Google’s official Gemini API directly (billed per token), or call a unified API such as Modellix that fronts the same model behind one key (billed per image). Either way the code shape is identical: authenticate, submit an asynchronous task, then poll for the result or catch it on a webhook. This guide gives you the Pro-specific endpoint, parameters, a full submit-and-poll loop in code, the real per-image cost, and a straight answer on when Pro is worth it over the cheaper Nano Banana 2.

Every number below was pulled from the providers’ own pages on July 25, 2026. Model IDs and prices move, so treat them as a dated snapshot and re-check the linked pages before you ship.

What the Nano Banana Pro API actually is (and when to use it over Nano Banana 2)

“Nano Banana Pro” is a nickname, not a separate product. On Google’s own pricing page it is listed as “Gemini 3 Pro Image (Nano Banana Pro)” with the model ID gemini-3-pro-image. Google is the model maker here; the API you call is just how you reach it.

Google positions Pro as “the premium choice for the most complex visual tasks, offering the highest level of world knowledge, advanced localization, accurate brand consistency, and precision creative control.” In practice, the Pro-specific strengths that matter for an integration are:

  • Legible text rendering — Google describes it as “capable of generating legible, stylized text for infographics, menus, diagrams, and marketing assets.” This is the one thing most image models still get wrong, and it’s Pro’s headline feature.
  • High resolution — 1K, 2K, and 4K output.
  • Complex compositions — up to 6 objects at high fidelity and up to 5 character images for consistency, plus a “thinking mode” that reasons through complex prompts and optional Google Search grounding.

One trap to know up front. The Pro model ID is gemini-3-pro-image (generation “3”), while the faster generalist Nano Banana 2 is gemini-3.1-flash-image (generation “3.1”). The higher-looking 3.1 is not the more capable model — Pro’s image output is priced at $120 per 1M tokens versus $60 for Nano Banana 2, i.e. Pro is the higher tier despite the lower version number.

So when should you actually call Pro instead of Nano Banana 2?

Nano Banana Pro Nano Banana 2
Model ID gemini-3-pro-image gemini-3.1-flash-image
Google’s framing “premium choice for the most complex visual tasks” “generalist workhorse model for all tasks,” speed-first
Output token price $120 / 1M tokens $60 / 1M tokens
Reach for it when Legible in-image text, brand-accurate layouts, 4K finals, multi-reference consistency High-speed, high-volume drafts, thumbnails, stylized iteration

Use Pro when the output has to be right — an infographic with readable labels, a poster with correct brand type, a 4K hero image. Drop back to Nano Banana 2 when you’re iterating fast or generating in bulk and don’t need Pro’s ceiling; for a full end-to-end walkthrough of the default model, see the how to use Nano Banana guide. And to be clear about the boundary: Pro is Google’s model, and Modellix — used below — is one distribution layer that fronts it, not its maker.

Two ways to call the Nano Banana Pro API

There are two legitimate access paths, and picking the right one matters more than any single line of code.

Path A — Google’s official Gemini API. You call Google directly. You authenticate with a Gemini API key, request the model gemini-3-pro-image through the Interactions API, and set a response_format (image type, aspect ratio, mime). Billing is token-based (see the cost section below).

Path B — a unified API (Modellix). Instead of integrating one provider at a time, you call one endpoint with one key and swap the model name in the path — Nano Banana Pro today, a different image or video model tomorrow. Modellix is one such Model-as-a-Service layer; it is a distribution layer, not the model’s maker. Billing here is quoted per image, and every model uses the same asynchronous task interface.

Official Gemini API Unified API (Modellix)
You integrate One provider (Google) One key across many image/video models
Billing Per token Per image
Interface Gemini SDK / Interactions API Uniform submit-and-poll async task
Best when You only need Google’s models and want the source of truth You want to compare or mix providers without re-integrating

Both routes call the same underlying Google model, so image quality is identical — which path is “better” depends only on whether you want a single provider or one key across many models, not on either platform being cheaper or exclusive. The worked example below uses the unified-API path because its request and response are fully documented and easy to reproduce; the same key-to-image logic applies to Google’s official path.

The Nano Banana Pro endpoint and parameters

On the unified API, Nano Banana Pro lives at:

1
POST https://api.modellix.ai/api/v1/google/nano-banana-pro/async

There’s a matching google/nano-banana-pro-edit endpoint for image edits — background replacement, style transforms, and detailed creative modifications on an existing image.

The request body is small. Only prompt is required:

Parameter Type Required Values
prompt string Yes Your image description
aspectRatio string No 10 options: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9
imageSize string No 1K, 2K, 4K

Note that Pro’s imageSize starts at 1K — there is no 512px option the way there is on Nano Banana 2. That’s consistent with Pro being the high-fidelity tier. On Google’s official path the equivalent request sets model: "gemini-3-pro-image" and controls size and aspect ratio through the Interactions API’s response_format.

Modellix model page headed google/nano-banana-pro showing a per-image price of $0.1265 to $0.2093, the text-to-image tag, and the prompt / aspectRatio / imageSize parameters

The Modellix google/nano-banana-pro model page shows the endpoint’s per-image price ($0.1265–$0.2093/img) and the exact prompt / aspectRatio / imageSize parameters. Captured July 25, 2026.

Call the Nano Banana Pro API — step by step

Here is the full loop, from zero to a saved 2K image.

Step 1 — Get an API key. Log in to the console, open “API Key,” and create one. The key is displayed only once after creation, so copy and store it immediately. For the full key lifecycle — creating, rotating, storing, and the 401/402 auth errors — see Google’s own models and keys on the Google provider page.

Step 2 — Submit the task. Because generation is asynchronous, a successful POST does not return an image — it returns a task_id and a URL to fetch the result, with an initial status of pending.

Step 3 — Poll for the result. Call GET /api/v1/tasks/{task_id} until the status is success, then read the image URL from data.result.resources[].url.

Step 4 — Or skip polling with a webhook. Send an X-Webhook-URL header when you submit and Modellix POSTs the result to your public HTTPS endpoint when the task finishes (more on this below).

Step 5 — Save the image. Generated results are only kept for 7 days, so download and persist the asset promptly.

Here is the whole loop in curl — submit, then poll:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# 1) Submit the Nano Banana Pro generation task
curl --request POST \
--url https://api.modellix.ai/api/v1/google/nano-banana-pro/async \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data '{
"prompt": "A clean infographic titled \"How GPUs Work\", labeled arrows, brand-blue palette",
"aspectRatio": "4:3",
"imageSize": "2K"
}'

# Response returns a task_id and a get_result URL:
# {
# "code": 0,
# "message": "success",
# "data": {
# "status": "pending",
# "task_id": "task-abc123",
# "model_id": "nano-banana-pro",
# "get_result": {
# "method": "GET",
# "url": "https://api.modellix.ai/api/v1/tasks/task-abc123"
# }
# }
# }

# 2) Poll the task until status == "success"
curl --request GET \
--url https://api.modellix.ai/api/v1/tasks/task-abc123 \
--header 'Authorization: Bearer <YOUR_API_KEY>'

# On success, the image URL is in data.result.resources[].url

To move this into a real service, wrap the poll in exponential backoff (say 1s → 2s → 4s) or register a webhook and skip polling entirely. The prompt above deliberately asks for in-image text — the exact case Pro is built for. And because the model is just a string in the path, swapping nano-banana-pro for nano-banana-2 runs the identical code against the cheaper model; that path-swap is the whole point of a unified API. (Most SDKs — Python, JavaScript — wrap this same HTTP call, so you can keep the curl as your reference and reach for a client library when you productionize.)

Handle webhooks and errors like production

A hello-world call works; a production integration needs the two pieces most tutorials skip.

Webhooks. Include an X-Webhook-URL header on submit and Modellix POSTs to that URL when the task hits a terminal state — success, failed, or canceled. The endpoint must be a publicly reachable HTTPS URL (no localhost, no private IPs). Each callback carries X-Modellix-Event (prediction.task.succeeded / .failed / .canceled), plus X-Modellix-Task-ID, X-Modellix-Delivery-ID, and X-Modellix-Retry-Count headers, and a body identical to the poll response — including a billing.amount field. Return any 2xx (a plain 200 ok is enough) to acknowledge; the system only checks the status code. Two best practices worth building in from day one: dedupe on X-Modellix-Delivery-ID for idempotency, and persist the payload then return 2xx immediately, doing heavy work asynchronously so you don’t time out.

Error codes. Every error is a unified JSON with a code matching the HTTP status. The important distinction is which ones you retry:

Status Meaning Common cause Retry?
400 Bad Request Missing/invalid prompt or params No — fix the request
401 Unauthorized Invalid, missing, or expired key No — provide a valid key
402 Payment Required Insufficient balance No — top up first
404 Not Found Unknown task/model/provider ID No — check the ID
429 Too Many Requests Rate or concurrency limit hit Yes — back off; check X-RateLimit-Reset
500 Internal Server Error Server-side error Yes — retry up to 3× with backoff
503 Service Unavailable Temporary outage / circuit breaker Yes — retry with backoff

The rule of thumb: 4xx (except 429) are your bug — fix the request. 429 and 5xx are transient — back off exponentially (1s → 2s → 4s) and retry. Google’s official API follows the same shape; only the exact codes and headers differ.

How much does the Nano Banana Pro API cost?

Short version, because price deserves its own page. Pro has no free API tier for image output on either path — it’s paid-only. On Google’s official path it’s billed per token and works out to roughly $0.134 per image at 1K/2K (more at 4K); on the unified path it’s billed per image at a rate a little below Google’s standard. There’s a catch worth knowing before you pick a path on price alone: Google’s Batch mode is cheaper than either standard rate, so no single path is universally cheapest.

Google Gemini API pricing page for Gemini 3 Pro Image (Nano Banana Pro) showing image output at $120 per 1M tokens, equivalent to $0.134 per 1K and 2K image and $0.24 per 4K image, with the free tier not available

Google’s pricing page for Gemini 3 Pro Image (Nano Banana Pro): image output at $120/1M tokens — $0.134 per 1K/2K image, $0.24 at 4K — and no free tier. Captured July 25, 2026.

Ignore the “save 50% vs Google” headlines: they usually compare Google’s Batch tier against its standard tier, or Nano Banana 2 against Pro — not like against like. Pick the path that fits your architecture, not a headline. The full ladder — every size, the batch math, and why the widely copied “$0.15/$0.30” figures are wrong — is in the dedicated Nano Banana Pro pricing breakdown.

FAQ

What is the Nano Banana Pro API model ID? It’s gemini-3-pro-image — Google’s ID for the model marketed as “Gemini 3 Pro Image (Nano Banana Pro).” Some third-party providers reference a -preview variant; Google’s pricing page lists the stable ID as gemini-3-pro-image.

Is the Nano Banana Pro API free? No. Google’s paid image models have no free API tier for Pro, and unified APIs are pay-as-you-go. Consumer Gemini apps may include some Pro generations on a subscription, but there’s no free API allowance — see the Nano Banana Pro pricing page for the full breakdown.

How is the Nano Banana Pro API different from Nano Banana 2? Pro (gemini-3-pro-image) is the high-fidelity tier — legible text, brand-accurate layouts, 4K, multi-reference consistency — at $120/1M output tokens. Nano Banana 2 (gemini-3.1-flash-image) is the speed-first generalist at $60/1M. Reach for Pro when the output must be exact; use Nano Banana 2 for fast, high-volume work.

Do I need Google Cloud to use the Nano Banana Pro API? No. You need an API key — either an official Gemini API key from Google, or a key from a unified API like Modellix that fronts the same model.

Why doesn’t the API return the image immediately? Image generation runs as an asynchronous task. The submit call returns a task_id; you then poll GET /tasks/{task_id} or receive a webhook when it’s done.

What resolutions does the Nano Banana Pro API support? 1K, 2K, and 4K. Unlike Nano Banana 2, Pro has no 512px option — it starts at 1K, in keeping with its high-fidelity positioning.


Provider details, endpoints, and pricing reflect public information as of July 2026 and change frequently. Validate against each provider’s live documentation before committing. Access image and video models, including the leading Chinese models, through a single API key at modellix.ai.