There are exactly two legitimate places to get a Nano Banana Pro API key: Google AI Studio, where Google issues you a key for its own Gemini API, and a provider console like Modellix, which fronts the same model behind a key you create in one place and use across many models. That choice is the whole ballgame — it decides which request header you send, whether you are billed per token or per image, and what else the key can reach. Everything else in this guide (the code, the pricing, the error messages) hangs off it.
The numbers below were pulled from the providers’ own pages on August 16, 2026. Nano Banana Pro is a fast-moving model — treat every price and model ID as a dated snapshot and re-check the linked pages before you ship. One naming note so the docs don’t confuse you: “Nano Banana Pro” is Google’s nickname; in API terms you are calling the model ID gemini-3-pro-image (or google/nano-banana-pro on a unified path). Google’s image generation docs describe it 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.”
The short answer: two legitimate places to get a Nano Banana Pro API key
| Google Gemini API key | Modellix key (unified API) | |
|---|---|---|
| Where you create it | Google AI Studio → API Keys [src: ai.google.dev/gemini-api/docs/api-key, 2026-08-16] | Modellix console → “API Key” [src: docs.modellix.ai/ways-to-use/api, 2026-08-16] |
| What it reaches | Google’s models only | One key across 210+ image and video models [src: docs.modellix.ai/get-started/overview] |
| Auth header | x-goog-api-key [src: ai.google.dev/gemini-api/docs/image-generation, 2026-08-16] |
Authorization: Bearer <key> [src: docs.modellix.ai/ways-to-use/api, 2026-08-16] |
| Billing | Per token (≈ per image) [src: ai.google.dev/gemini-api/docs/pricing] | Per image [src: docs.modellix.ai/get-started/pricing] |
| Best when | You only need Google’s models and want the source of truth | You want to compare or mix providers without re-integrating |
The one sentence to remember: the key you choose determines the header, the billing unit, and the model reach. Neither key changes the pixels — both paths call the same Google model, so output quality is identical. The difference is operational, and it is the only honest axis of comparison.
Which model ID the key actually unlocks
When you read Google’s docs, the model you want is listed as Nano Banana Pro (Gemini 3 Pro Image) with the model ID gemini-3-pro-image. The name matters because older tutorials talk about “Nano Banana” (gemini-2.5-flash-image, the legacy model Google now tells customers to migrate off) and “Nano Banana 2” (gemini-3.1-flash-image, the fast generalist). Pro is the higher tier — sharper text rendering, 4K output, multi-reference consistency — despite the lower-looking version number. On the Modellix path the same model lives at google/nano-banana-pro, and the full endpoint and parameter walkthrough is in our Nano Banana Pro API guide.
Pro’s headline capabilities for an integration: legible, stylized text inside images (infographics, menus, marketing assets), output at 1K/2K/4K, complex compositions with up to six objects at high fidelity, and character consistency across multiple reference images. [src: ai.google.dev/gemini-api/docs/image-generation, 2026-08-16] If your workload is high-volume drafts and thumbnails rather than finals, Nano Banana 2 is the cheaper default — this guide stays with Pro because the key mechanics are identical either way.
How to get a Nano Banana Pro API key, step by step
Path A — create a Gemini API key in Google AI Studio. Go to the API Keys page in Google AI Studio and click Create API key. Keys are generated for you automatically — Google’s API key documentation notes that all new keys created in AI Studio are automatically created as auth keys. [src: ai.google.dev/gemini-api/docs/api-key, 2026-08-16] The key stays retrievable in AI Studio afterwards, but copy it into a secret store immediately rather than leaving it on screen.
Path B — create a key in the Modellix console. Log in, open API Key, and create one. The timing matters more than on Path A: Modellix’s API documentation states that “the API Key is only displayed once after creation, so be sure to save it first.” [src: docs.modellix.ai/ways-to-use/api, 2026-08-16] Close that dialog without copying and you cannot read the same key again — you create a new one and update your app. Paste it straight into an environment variable or secret manager, not into a chat window, a code comment, or a .env file that gets committed.
For the wider Nano Banana family (base, 2, 2 Lite, edit variants), the creation steps are the same — see our Nano Banana API key guide, which covers key validation and the family-specific auth details.
The honest answer to “is there a free Nano Banana Pro API key?”
This is the most-asked question in the search results for this keyword, and the honest answer has three parts.
Google’s API itself has no free tier for this model. Google’s pricing page lists Free Tier as “Not available” for gemini-3-pro-image — the paid tier is the only API tier. What people call “free Nano Banana Pro” is usually the AI Studio playground: you can experiment with the model there with a free preview quota, which is real but rate-limited, not a production API allowance, and it comes with Google’s preview terms.
“Free unlimited” offers are someone else’s platform, not your key. You will find tutorials and sites promising “free, unlimited Nano Banana Pro API” or “free API key generators.” Read those carefully: they route you through their own platform or client-side runtime, they are not Google, and the key you get there (if you get one at all) is theirs, with their quotas and their terms. Wiring that into a product because it looked free is how integrations die at launch.
There is no Nano Banana Pro API key generator. Keys are issued by Google AI Studio or by the provider you sign up with. Any service that “generates” a key for you is either a scam harvesting credentials or someone else’s key you are being resold. If a page promises a generator, that is the page to close.
The free tier that does exist on the paid API is different: Google gives 5,000 free search requests per month (shared across Gemini 3.x models) for grounded generation, then bills $14 per 1,000 requests. [src: ai.google.dev/gemini-api/docs/pricing, 2026-08-16] Useful to know, but it is a search-grounding allowance, not free image generation.
Secure the key before you write code
The key is a bearer credential: anyone who holds it can spend your balance. Four practices cover most incidents:
- Put it in an environment variable or secret manager, never in source code.
export GEMINI_API_KEY=...(official path) orexport MODELLIX_API_KEY=...(unified path), and read it in your app from the environment. - Keep it out of git. A committed key is a leaked key, even in a private repo. Use
.gitignorefor local env files and rotate immediately if one ever lands in history. - Scope and rotate. If your provider offers per-key labels or multiple keys, use separate keys per environment (dev/staging/prod) so a leaked dev key does not expose production spend. Rotate on any suspected exposure — both Google and Modellix let you revoke and reissue from the same console where you created the key.
- Watch for the “shown once” moment. On the Modellix path the key is displayed only at creation; on the Google path it stays visible in AI Studio. Either way, storing it the moment it appears removes the most common recovery scramble.
Authenticate: the two headers that look alike
This is the line most integrations get wrong, because the two paths send the key in different headers — and using the wrong one returns a clean 401 with a message that does not tell you the header was the problem.
Official Gemini API:
1 | curl -s -X POST \ |
Modellix unified API:
1 | curl --request POST \ |
The official path authenticates with x-goog-api-key and the provider path with Authorization: Bearer. [src: ai.google.dev/gemini-api/docs/image-generation + docs.modellix.ai/ways-to-use/api, 2026-08-16] Both are plain strings — no signing, no session — which is exactly why the storage rules above matter. The next section explains what each path costs, because the billing unit difference is the reason the two keys are not interchangeable.
Illustrative Modellix artwork of the two authentication paths: the same model reached through Google’s x-goog-api-key header or a unified API’s Authorization: Bearer header. Not a product screenshot.
Nano Banana Pro API pricing: what the key costs per image
Pricing is where the two paths genuinely diverge. Google bills gemini-3-pro-image per token; Modellix bills per image. The table below is a like-for-like snapshot pulled from each provider’s live page on the dates shown — it is not a quote, and both sides change prices.
| Output | Google (standard, per image equivalent) | Google (batch, per image equivalent) | Modellix (per image) |
|---|---|---|---|
| 1K | $0.134 | $0.067 | $0.1265 |
| 2K | $0.134 | $0.067 | $0.1265 |
| 4K | $0.24 | $0.12 | $0.2093 |
Sources: Google Gemini API pricing (standard: $120 per 1M output-image tokens, equivalent to $0.134 per 1K/2K and $0.24 per 4K; batch: $0.067 / $0.12), accessed August 16, 2026. Modellix Nano Banana Pro model page (imageSize 1K/2K $0.1265, 4K $0.2093), accessed August 16, 2026. Google input is billed separately at $2.00 per 1M tokens, roughly $0.0011 per image — negligible on a per-image basis.
On the currently displayed like-for-like rows, Modellix’s per-image list price is lower than Google’s standard rate at every resolution (about 6% on 1K/2K, about 13% on 4K). That is a small, real saving on a matched route — not a license to generalize “aggregators are cheaper” to every model or workload. Google’s batch rate undercuts both at half its own standard price, and batch is available on the official path if your workload tolerates delayed processing. Also note that third-party resellers advertise Nano Banana Pro below both of these numbers; when one of those prices appears, check what the route actually is — same model, different platform, different rate limits and terms.
Google standard vs batch vs Modellix per-image list prices for Nano Banana Pro output, from the sources above, accessed August 16, 2026. Batch is the cheapest listed route; Modellix is below Google standard at all three sizes. Prices change — re-check before budgeting.
Two budgeting notes. First, the billing units do not match: a token quote and a per-image quote are different calculators, and converting one into the other requires knowing the exact image size and output length Google assumes. Second, for high-volume or budget-sensitive work, the Nano Banana Pro pricing deep-dive walks through the full cost picture (including what the “$0.15 figure” circulating online gets wrong), and our Nano Banana 2 API guide covers the cheaper sibling if Pro’s ceiling is more than you need.
First request: complete code for both paths
Both paths are asynchronous — your first request returns a task handle, not an image. The official path returns an interaction you then read the image from; the unified path returns a task_id you poll. Here is the full Modellix loop in Python:
1 | import os |
[src: docs.modellix.ai/ways-to-use/api example, 2026-08-16] Swap nano-banana-pro in the path for any other model and the rest of the code is unchanged — that path-swap is the entire point of a unified API. If you prefer not to poll, send an X-Webhook-URL header with the submit call and Modellix POSTs the result to your endpoint when the task finishes. [src: docs.modellix.ai/ways-to-use/api, 2026-08-16] One operational note: generated results are kept for 7 days, so download and persist the asset promptly. [src: docs.modellix.ai/ways-to-use/api, 2026-08-16]
Only prompt is required. The optional parameters on the Modellix route are aspectRatio (1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9) and imageSize (1K, 2K, 4K). [src: www.modellix.ai/models/google/nano-banana-pro, 2026-08-16] The same loop handles image editing: pass reference images along with the prompt (Modellix exposes the Pro editing variant as google/nano-banana-pro-edit), and the submit-and-poll flow is unchanged. On Google’s official path, the newer Interactions API takes the same prompt plus a response_format block with type: "image", aspect_ratio, and image_size. For a slower, step-by-step walkthrough of the same loop with a different family member, our how to use Nano Banana guide shows the full flow.
Key-related errors: 401, 403, 429 and how to fix them
When a key-based call fails, the status code tells you which layer to check:
| Status | What it means | What to do |
|---|---|---|
| 400 | Request malformed — prompt missing or invalid |
Fix the payload, not the key. prompt is the only required field. [src: docs.modellix.ai/ways-to-use/api, 2026-08-16] |
| 401 | Key missing, malformed, or wrong | Check the header name (x-goog-api-key vs Authorization: Bearer), that the key is copied in full, and that it is not wrapped in quotes from a copy-paste. |
| 403 | Key valid but not allowed to do this | On Google: the API/model access may not be enabled for the key. On Modellix: the key may lack access to the requested model route. Check console permissions before retrying. |
| 402 | Insufficient balance | Top up the account; retrying without funding changes nothing. [src: docs.modellix.ai/ways-to-use/api, 2026-08-16] |
| 429 | Rate or concurrency limit | Back off exponentially and respect the X-RateLimit-Reset header if present. 500/503 are also retryable with backoff. [src: docs.modellix.ai/ways-to-use/api, 2026-08-16] |
The most expensive debugging session is the one where you “know” the key is fine because you copied it twice — check the header first. Modellix documents its unified error format in the API documentation, and Google’s image generation docs link its full API troubleshooting reference.
Choosing between the official key and an aggregator key
| Your situation | Start with |
|---|---|
| You only need Google models and want the direct source of truth | Google AI Studio key |
| You want one key across image and video models from many makers | An aggregator key (e.g. Modellix) |
| You need per-image cost visibility for budgeting | An aggregator that bills per image |
| You need Google’s batch rate or enterprise terms | Google (Vertex AI / Gemini API) |
| You want to A/B models without re-integrating | An aggregator — the model is a string in the URL path |
Modellix is an aggregator, and it has a commercial interest in the second and third rows. The honest framing is narrow: Modellix is a distribution layer, not the model’s maker — it fronts Google’s gemini-3-pro-image (and 200+ other image and video models) behind one key with per-image billing and a uniform async task interface. If you need a single provider and don’t care about switching, the official key is simpler and closer to the source. If your roadmap involves multiple models, per-image cost tracking, or both, one key that reaches all of them is an operational trade-off worth making — and the unified AI API explainer covers when that trade-off pays off and when it does not.
FAQ
Is there a free Nano Banana Pro API key?
No free API tier exists for gemini-3-pro-image on Google’s paid API — its pricing page lists Free Tier as “Not available.” Free preview quotas exist in the AI Studio playground, and some third parties advertise “free unlimited” access through their own platforms; neither is a production API key you control.
Which header do I send the key in?
Google’s official Gemini API uses x-goog-api-key. The Modellix unified API uses Authorization: Bearer <key>. Sending the key in the wrong header returns a 401.
Can one key reach multiple models?
A Google key reaches Google’s models. A Modellix key reaches 210+ image and video models — the model is just the name in the URL path (e.g. /api/v1/google/nano-banana-pro/async), so the same key and request shape work across models.
What happens if my key leaks?
Treat it as compromised: revoke it in the console where you created it, issue a new one, and update your environment variables. Both Google and Modellix support revocation from the same page that issued the key.
Is Modellix cheaper than Google for Nano Banana Pro?
On the current like-for-like rows, Modellix lists $0.1265 (1K/2K) and $0.2093 (4K) per image versus Google standard’s $0.134 and $0.24 — a small per-image saving. Google’s batch rate ($0.067 / $0.12) is cheaper than both. “Cheaper” depends on route, resolution, and whether you can use batch.
Do I need a Google account to use a Modellix key?
No. The Modellix key is issued by Modellix and does not require a Google account, which also means no China-account workarounds are needed to reach Chinese models through the same key.
How do I rotate a Nano Banana Pro API key?
Create a new key in the same console, deploy it to your environment, verify one request succeeds, then delete the old key. Rotation is the correct response to any suspected exposure.
Provider details and pricing reflect public information as of August 16, 2026 and change frequently. Validate against each provider’s live pricing before committing. Access image and video models, including the leading Chinese models, through a single API key at modellix.ai.
Cover image: illustrative Modellix artwork; it is not a Google product screenshot or source evidence.