Vertex AI Nano Banana API: Model IDs, Setup, and Cost per Image
Start new Vertex AI projects on gemini-nano-banana-2.1 with enterprise=True and location global. Nano Banana 2 stays supported there until May 2027 or later.
On this page

To call Nano Banana through Vertex AI today, use a GA model ID. Start new projects on gemini-nano-banana-2.1 (Nano Banana 2.1, GA since October 6, 2026, global location only). The other GA IDs keep working: gemini-3.1-flash-image (Nano Banana 2), gemini-3-pro-image (Nano Banana Pro), and gemini-3.1-flash-lite-image (Nano Banana 2 Lite). Create the Google Gen AI SDK client with enterprise=True, your project ID, and location="global", and authenticate with Application Default Credentials (ADC) or a service account. Code from 2025 usually breaks for one of three reasons: it asks for a -preview model that Google retired on July 17, 2026, it points at us-central1, where the newer image models aren't offered, or it mixes Gemini API sample code into a Google Cloud client.
What changed on October 6, 2026: Nano Banana 2.1 arrived as an update to Nano Banana 2, and the two Google platforms now treat Nano Banana 2 differently. On Vertex AI it stays GA with a retirement date of "May 28, 2027 or later," so working code has no deadline to meet. On the Gemini API, Google deprecated it with no shutdown date announced and recommends 2.1 for new projects. Nano Banana 2.1 costs less per image than Nano Banana 2 at 1K, 2K, and 4K. In exchange, it runs only on global, has no 512 size and no Flex PayGo, and returns an API error if you set seed, topK, logprobs, temperature, or topP.
Vertex AI hasn't disappeared. On April 22, 2026, Google made it part of Gemini Enterprise Agent Platform: Vertex AI Studio became Agent Studio and the Vertex AI API became the Agent Platform API. The endpoint is still aiplatform.googleapis.com, and old vertex-ai/generative-ai/docs links still resolve. "Vertex AI" and "Agent Platform" below mean the same service.
Price is not a reason to switch. As of October 8, 2026, Agent Platform list prices on the global endpoint match the paid Gemini API: $0.0336 for a 1K Nano Banana 2.1 image and $0.0504 at 2K, about $0.067 and $0.101 for the same sizes on Nano Banana 2, and $0.134 for a 1K or 2K Nano Banana Pro image. Agent Platform earns its setup cost when you need what a Gemini API key doesn't give you: IAM and service accounts, VPC Service Controls, customer-managed encryption keys (CMEK), US or EU data residency, Provisioned Throughput, or billing on an existing Google Cloud account.
What changed since the 2025 tutorials
If a tutorial or an old script stopped working, compare it with this table first. Each row is a change Google shipped between late 2025 and October 2026.
| In older code or guides | Status as of October 8, 2026 | Use instead |
|---|---|---|
gemini-3.1-flash-image-preview, gemini-3-pro-image-preview | Retired on Agent Platform on July 17, 2026; "no longer accessible" | gemini-nano-banana-2.1 for new work, or gemini-3.1-flash-image; gemini-3-pro-image |
gemini-3.1-flash-image (Nano Banana 2) | GA on Agent Platform, retirement "May 28, 2027 or later"; deprecated on the Gemini API with no shutdown date | Keep it where it works; start new projects on gemini-nano-banana-2.1 |
gemini-2.5-flash-image | Deprecated; Agent Platform retires it on March 15, 2027 | Google recommends gemini-3.1-flash-lite-image |
vertexai=True, GOOGLE_GENAI_USE_VERTEXAI=True | Legacy flag, still accepted | enterprise=True, GOOGLE_GENAI_USE_ENTERPRISE=True |
location="us-central1" | Not listed for Nano Banana 2.1, 2, Pro, or 2 Lite | global; Nano Banana 2 also accepts us or eu |
| Vertex AI Studio | Renamed Agent Studio | Agent Studio > Create prompt |
client.interactions.create(...) samples from ai.google.dev | Gemini API style; Agent Platform docs use generate_content, and the 2.1 model page lists the Interactions API as not supported | generate_content with image_config |
The Python SDK doesn't check model names. With google-genai 2.25.0 (released September 22, 2026), a client built offline assembles .../models/gemini-3.1-flash-image-preview:generateContent exactly as it does the GA ID. The call only fails once Google's server receives it. If code that worked in the spring started failing in July, check the model string before you touch credentials.
One trap in Google's own text: the July 17 release note suggests gemini-3-flash-image as a replacement. That ID is a typo. The model page and the deprecation table both name gemini-3-pro-image.
Which Nano Banana model and location to use: 2.1 for new projects
Agent Platform serves five Nano Banana models. They differ in where they run, what sizes they produce, and how long they stay available.
| Nano Banana 2.1 | Nano Banana 2 | Nano Banana Pro | Nano Banana 2 Lite | Nano Banana (original) | |
|---|---|---|---|---|---|
| Model ID | gemini-nano-banana-2.1 | gemini-3.1-flash-image | gemini-3-pro-image | gemini-3.1-flash-lite-image | gemini-2.5-flash-image |
| Status | GA since October 6, 2026 | GA since May 28, 2026 | GA since May 28, 2026 | GA since June 23, 2026 | Deprecated |
| Retirement on Agent Platform | None announced; at least 45 days notice | May 28, 2027 or later | May 28, 2027 or later | June 28, 2027 or later | March 15, 2027 |
| Locations | global only | global, us, eu | global only | global only | global plus 13 US and EU regions |
| Output sizes | 1K, 2K, 4K | 512, 1K, 2K, 4K | 1K, 2K, 4K | 1K | 1024×1024 at 1:1 |
| Aspect ratios | 15, including 1:8 and 8:1 | 15, including 1:8 and 8:1 | 15 | 14 | 10 |
| Grounding with Google Search | Supported, plus Image Search | Supported | Supported | Not supported | Not supported |
| Image output, Standard PayGo | $30 per 1M tokens (no Flex PayGo) | $60 per 1M tokens ($66 on us/eu) | $120 per 1M tokens | $30 per 1M tokens | $30 per 1M tokens |
Model and location details come from each model's Agent Platform page (the 2.1 page was last updated October 6, 2026, the others September 22, 2026). Retirement dates come from the Agent Platform model versions page and prices from the Agent Platform pricing page, both as of October 8, 2026.
Google describes Nano Banana 2.1 as an update to Nano Banana 2 with better visual quality, multi-turn character consistency, and text rendering. It describes Pro as the model for complex and multi-turn generation and editing, and 2 Lite as the fastest. In practice, the choice comes down to price, output size, location, and which request parameters you rely on:
- Nano Banana 2.1 is the default for new work. Its image output rate is $30 per million tokens, the same as 2 Lite, so a 1K image costs $0.0336 on either, and 2.1 adds 2K, 4K, and grounding. At every size both models offer, it costs less per image than Nano Banana 2. One trade-off: Google lists 2.1 among the models available for shorter periods, with no retirement date announced and a promise to post one at least 45 days ahead. Nano Banana 2, Pro, and 2 Lite sit in the table of models available for at least 12 months. A team that needs a guaranteed support term can reasonably stay on Nano Banana 2, which is supported until May 28, 2027 or later.
- Nano Banana 2 still fits when you need 512 output, the
usoreuendpoint, Flex PayGo, ortemperatureandtopPcontrol. Its model page lists both sampling parameters; the 2.1 page rejects them. If your code runs on it today, nothing forces a move before May 28, 2027. - Nano Banana 2 Lite suits high-volume 1K work. Its image price matches 2.1, but its input and text output rates are much lower ($0.25 and $1.50 per million tokens against $1.50 and $7.50), and it supports Flex PayGo.
- Nano Banana Pro is worth its price when exact wording and complex compositions matter more than cost. In the one-draw-per-prompt comparison in Nano Banana 2.1 vs Pro vs GPT Image 2.5: 9-Prompt Test and Cost, Pro kept the requested wording, while 2.1 changed it in three text tasks.
For Nano Banana Pro request structure itself, see Nano Banana Pro API Guide: JSON, YAML, Image Saving, and PDFs.
Location changes both the endpoint and the bill:
globalis the default and the only choice for Nano Banana 2.1, Pro, and 2 Lite. Google recommends it because requests go to whichever region has capacity.usoreu(multi-region, Nano Banana 2 only since August 31, 2026) keeps ML processing inside that geography and supports Provisioned Throughput and Standard PayGo. Image output costs 10% more: $66 instead of $60 per million tokens. A team that must keep ML processing in the US or EU therefore stays on Nano Banana 2 for now.- Single regions such as
us-central1oreurope-west4exist only for the originalgemini-2.5-flash-image.
No Nano Banana model lists an Asia-Pacific endpoint. A team in Tokyo or Singapore that must keep processing in-country can't do that with these models on Agent Platform.

Some image options also work only on Agent Platform. The SDK's ImageConfig marks output_mime_type, output_compression_quality, prominent_people, and image_output_options as "not supported in Gemini API," so they only take effect with an enterprise=True client.
First image call with Python
You need a Google Cloud project with billing enabled and the Agent Platform API turned on. The code below matches google-genai 2.25.0. If an older install rejects enterprise=True, upgrade it; the legacy vertexai=True flag behaves the same in the meantime.
pip install --upgrade google-genaiADC or a service account
On your own machine, log in once so the SDK can find credentials. On Cloud Run, GKE, or a VM, the attached service account does the same job and you skip this step.
gcloud auth application-default login
export GOOGLE_CLOUD_PROJECT=your-project-idThen generate one 16:9 image at 2K with Nano Banana 2:
import os
from google import genai
from google.genai import types
client = genai.Client(
enterprise=True,
project=os.environ["GOOGLE_CLOUD_PROJECT"],
location="global",
)
response = client.models.generate_content(
model="gemini-3.1-flash-image",
contents="A red bicycle leaning against a bakery window at sunrise",
config=types.GenerateContentConfig(
response_modalities=["TEXT", "IMAGE"],
image_config=types.ImageConfig(aspect_ratio="16:9", image_size="2K"),
),
)
for i, part in enumerate(response.candidates[0].content.parts):
if part.text:
print(part.text)
elif part.inline_data:
ext = part.inline_data.mime_type.split("/")[-1]
with open(f"bicycle-{i}.{ext}", "wb") as f:
f.write(part.inline_data.data)With these settings, the SDK sends the request to https://aiplatform.googleapis.com/v1beta1/projects/<project>/locations/global/publishers/google/models/gemini-3.1-flash-image:generateContent with "imageConfig": {"aspectRatio": "16:9", "imageSize": "2K"} inside generationConfig. If you leave out image_size, you get 1K.
To use Nano Banana 2.1 instead, change only the model string. 2.1 supports 16:9 and 2K, so the rest of the request stays the same. This variant follows the 2.1 model page and was not run against an Agent Platform project:
response = client.models.generate_content(
model="gemini-nano-banana-2.1",
contents="A red bicycle leaning against a bakery window at sunrise",
config=types.GenerateContentConfig(
response_modalities=["TEXT", "IMAGE"],
image_config=types.ImageConfig(aspect_ratio="16:9", image_size="2K"),
),
)Three rules come from that page. Don't add temperature, top_p, top_k, seed, or logprobs settings to the config, because setting any of them returns an API error on 2.1. Use 1K, 2K, or 4K for image_size; 2.1 has no 512 option. Keep location="global", since 2.1 isn't offered on us or eu.
Google's quickstart does the same thing through environment variables. Set GOOGLE_CLOUD_PROJECT, GOOGLE_CLOUD_LOCATION=global, and GOOGLE_GENAI_USE_ENTERPRISE=True, then call genai.Client() with no arguments. For the us or eu endpoint with Nano Banana 2, change only the location: the SDK switches the host to aiplatform.us.rep.googleapis.com or aiplatform.eu.rep.googleapis.com.
Express mode API key
Agent Platform express mode, still in Preview, gives a @gmail.com account an API key instead of a project and location. The client then takes the key and nothing else:
client = genai.Client(enterprise=True, api_key=os.environ["EXPRESS_API_KEY"])The request goes to aiplatform.googleapis.com without a project in the path. Before you build on it, read the express mode caveats in the free options section below.
REST with curl
The official REST sample authenticates with a short-lived access token from gcloud. For the global endpoint:
PROJECT_ID=your-project-id
MODEL_ID=gemini-3.1-flash-image
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json" \
"https://aiplatform.googleapis.com/v1/projects/${PROJECT_ID}/locations/global/publishers/google/models/${MODEL_ID}:generateContent" \
-d '{
"contents": [{"role": "user", "parts": [{"text": "A red bicycle leaning against a bakery window at sunrise"}]}],
"generationConfig": {
"responseModalities": ["TEXT", "IMAGE"],
"imageConfig": {"aspectRatio": "16:9", "imageSize": "2K"}
}
}' > response.json
jq -r '.candidates[0].content.parts[] | select(.inlineData) | .inlineData.data' response.json \
| head -n 1 | base64 --decode > bicycle.pngFor Nano Banana 2.1, set MODEL_ID=gemini-nano-banana-2.1 and leave the rest unchanged; that substitution wasn't run either. The global path is the only one 2.1 accepts.
The image comes back as base64 inside inlineData, which makes 2K and 4K responses large. If you call through a self-hosted gateway, check that it supports the new model names and passes large inline payloads. In a 2025 linux.do thread, users of new-api and done-hub reported that calls working in Vertex AI Studio failed through the gateway until it was updated.
Setup errors and what they mean
The client-side messages below come from google-genai 2.25.0 run locally without credentials. The client was built and the request URL captured, but nothing was sent to Google, so the table quotes no server responses. Wording can change between SDK versions.
| What you see | Cause | Fix |
|---|---|---|
ValueError: Gemini API does not support project/location. | You passed project and location, but the client defaulted to the Gemini Developer API | Add enterprise=True, or export GOOGLE_GENAI_USE_ENTERPRISE=True in the same shell |
ValueError: No API key was provided... | No API key and no enterprise flag, so the SDK assumes an AI Studio key | Set the enterprise flag or variable; this message doesn't mean Agent Platform needs a key |
DefaultCredentialsError: Your default credentials were not found... | enterprise=True but no ADC on this machine | Run gcloud auth application-default login, or run under a service account |
ValueError: enterprise and vertexai flags have conflicting values, please set enterprise value only. | enterprise=True together with vertexai=False | Remove vertexai from the call |
Warning that both GOOGLE_GENAI_USE_ENTERPRISE and GOOGLE_GENAI_USE_VERTEXAI are set | An old .env still sets the Vertex variable | GOOGLE_GENAI_USE_ENTERPRISE wins; delete the other one to silence it |
Missing key inputs argument! ... provide (vertexai, project & location) arguments. | An older google-genai release | pip install --upgrade google-genai |
| Client builds fine, the server rejects the model | A retired -preview ID or a typo | Use an ID from the model table above |
API error after switching an existing config to gemini-nano-banana-2.1 | The config still sets temperature, top_p, top_k, seed, or logprobs, which the 2.1 model page says return an error | Remove those fields, or stay on gemini-3.1-flash-image if you depend on them |
location="us-central1" with Nano Banana 2.1, 2, Pro, or 2 Lite | The model pages list these models only on global, plus us and eu for Nano Banana 2 | Use global; for Nano Banana 2 you can also use us or eu |
Sample code calls client.interactions.create or sets response_format | It was copied from ai.google.dev, which now leads with the Interactions API; Agent Platform docs use generateContent | Rewrite with client.models.generate_content and image_config |
429 with Resource exhausted, please try again later. | Shared capacity is busy (next section) | Back off, smooth traffic, stay on global |
The Node.js sample on Google's image-generation page is its own trap. As of September 24, 2026, it still used vertexai: true and fell back to us-central1 when no location was set, a region the model pages don't list for Nano Banana 2.1, 2, or Pro. Set GOOGLE_CLOUD_LOCATION=global explicitly when you start from that sample.
What one image costs on Vertex AI
Google bills Nano Banana by tokens, and each output image has a fixed token count by resolution. The cost of the image itself is:
image tokens × price per 1M output image tokens ÷ 1,000,000
Token counts per output image: Nano Banana 2.1 uses 1,120 at 1K, 1,680 at 2K, and 3,780 at 4K. Nano Banana 2 uses 747 at 512, 1,120 at 1K, 1,680 at 2K, and 2,520 at 4K. Pro uses 1,120 at both 1K and 2K and 2,000 at 4K. 2 Lite uses 1,120 at 1K. Applying the prices on the Agent Platform pricing page as of October 8, 2026:
| Model and option | 512 | 1K | 2K | 4K |
|---|---|---|---|---|
Nano Banana 2.1, Standard, global ($30/1M) | — | $0.0336 | $0.0504 | $0.1134 |
Nano Banana 2.1, Batch (no Flex), global ($15/1M) | — | $0.0168 | $0.0252 | $0.0567 |
Nano Banana 2, Standard, global ($60/1M) | $0.0448 | $0.0672 | $0.1008 | $0.1512 |
Nano Banana 2, Standard, us/eu ($66/1M) | $0.0493 | $0.0739 | $0.1109 | $0.1663 |
Nano Banana 2, Flex or Batch, global ($30/1M) | $0.0224 | $0.0336 | $0.0504 | $0.0756 |
| Nano Banana Pro, Standard ($120/1M) | — | $0.1344 | $0.1344 | $0.24 |
| Nano Banana Pro, Flex or Batch ($60/1M) | — | $0.0672 | $0.0672 | $0.12 |
| Nano Banana 2 Lite, Standard ($30/1M) | — | $0.0336 | — | — |
| Nano Banana 2 Lite, Flex or Batch ($15/1M) | — | $0.0168 | — | — |
A worked example: 1,000 Nano Banana 2 images at 2K on the global endpoint cost 1,000 × 1,680 × $60 ÷ 1,000,000 = $100.80 at Standard PayGo, or $50.40 through Batch inference. The same 1,000 images on Nano Banana 2.1 cost 1,000 × 1,680 × $30 ÷ 1,000,000 = $50.40 at Standard, or $25.20 through Batch. The original gemini-2.5-flash-image uses 1,290 tokens per 1024×1024 image at $30 per million, about $0.039.
For the same comparison on the Gemini API side, with each 2.1 size and thinking setting broken out, see Nano Banana 2.1 API Pricing: Per-Image Price vs Cost per Call.

These figures cover the image output only. The real bill adds:
- Input. Each reference image counts as 1,120 input tokens on Nano Banana 2.1, 2, and 2 Lite and 560 on Pro. That's about $0.00168 per reference image on 2.1 ($1.50 per million input tokens), $0.00056 on Nano Banana 2, and $0.00112 on Pro. Text prompts are billed at the model's input rate.
- Text and reasoning output. Nano Banana 2.1 bills any text it returns, including reasoning, at $7.50 per million tokens; Nano Banana 2 bills it at $3 on
global, and Pro at $12. On 2.1 this is a visible share of the bill. Eight test calls togemini-nano-banana-2.1through LaoZhang API on October 8, 2026 each reported 772–1,434 text and thinking tokens. At $7.50 per million, that adds about $0.006–$0.011 per call, which puts a 1K call at roughly $0.040–$0.044 at Google's list prices. Those counts come from a gateway's usage data on single calls, not from a Google invoice. - Grounding with Google Search. 5,000 grounding queries per month are free across all Gemini 3 models. After that, each 1,000 queries cost $14.
- Repeat attempts. Regenerations, and attempts that end in a blocked or unusable image, can still add cost. Treat the table as a floor, not an invoice.
Disclosure: laozhang.ai is our own service. Its prices are platform pricing, not an independent comparison.
Batch inference halves every Nano Banana price and fits work that can wait, such as catalog images or overnight jobs. Flex PayGo gives the same 50% discount for Nano Banana 2, Pro, and 2 Lite, but Nano Banana 2.1 doesn't support Flex. Priority PayGo costs 1.8 times Standard: $54 per million image output tokens for 2.1, $108 for Nano Banana 2 on global, and $216 for Pro.
Is Vertex AI more expensive than the Gemini API?
Not at list price. The Gemini API's paid tier charges the same $30, $60, and $120 per million image output tokens for Nano Banana 2.1, 2, and Pro, and it has the same 50% Batch discount. The only list-price gap is the 10% surcharge on Nano Banana 2 when you pin it to us or eu. When a Vertex bill looks high, the cause is usually 4K output, Pro instead of a Flash model, reasoning tokens, grounding charges, or Priority PayGo, not the platform itself.
Why 429 errors happen and what helps
On Standard PayGo, Agent Platform answers overload with HTTP 429 and Resource exhausted, please try again later. Google's Standard PayGo page says a 429 "doesn't indicate that you've hit a fixed quota." It means shared capacity is temporarily contested.
Two facts rule out the obvious fixes. Each Nano Banana model page, including 2.1's, lists "Fixed quota: Not supported," so a quota increase request doesn't apply. The spend-based usage tiers, which give an organization a baseline of tokens per minute, don't cover these models either. As of September 24, 2026, the Standard PayGo page listed Gemini 3.1 Flash Image, 3.1 Flash-Lite Image, 3 Pro Image, and 2.5 Flash Image as supporting Standard PayGo "but the usage tiers don't apply to these models." That list predates Nano Banana 2.1, and the 2.1 model page doesn't mention usage tiers. Spending more on other Agent Platform services won't raise an image model's baseline.
What Google does recommend for 429s on PayGo:
- Stay on the
globalendpoint. It routes each request to the region with capacity. A regional endpoint draws from a smaller pool. - Retry with truncated exponential backoff. google-genai doesn't retry unless you turn it on. With
HttpRetryOptions, it retries 408, 429, 500, 502, 503, and 504 responses with jittered exponential waits. - Smooth traffic within each minute. Short bursts can be throttled even when your per-minute average is low, so cap concurrency instead of firing a whole batch at once.
- Ramp up gradually. A sudden jump in usage can hit acceleration limits.
- Buy Provisioned Throughput if you need an SLA. Nano Banana 2.1, 2, Pro, and 2 Lite all support it. When you exceed reserved capacity, the message changes to
Too many requests. Exceeded the Provisioned Throughput.
Turning on the SDK's built-in retry takes a few lines:
client = genai.Client(
enterprise=True,
project=os.environ["GOOGLE_CLOUD_PROJECT"],
location="global",
http_options=types.HttpOptions(
retry_options=types.HttpRetryOptions(attempts=5, initial_delay=2.0, max_delay=60.0),
),
)Some Vertex users hit 429s constantly early in 2026. In a Google AI Developers Forum thread opened January 2, 2026, while Nano Banana Pro was still in preview, developers reported 429s on sparse traffic. One said moving the same code to the Gemini API stopped the errors, and a Google staff member said a fix was pushed on January 8. Later posts in February and March described 429s at five or six concurrent requests. Those reports predate GA and say nothing either way about capacity today.
If errors suddenly appear with no change on your side, check Google's status pages before you rework your client; Is Nano Banana 2 Down? Check the Right Status Page First walks through that. Rate limits on the Gemini API key side work differently and are covered in Nano Banana 2 Limits: How Gemini Usage and API Rate Limits Work.
Free credit, express mode, and free API keys
There is no free API tier for current Nano Banana models on either Google platform, but a new Google Cloud account can cover them with trial credit.
- Gemini API free tier. Google's pricing page lists the free tier as "Not available" for Nano Banana 2.1, Nano Banana 2, and Nano Banana Pro. An AI Studio key reaches these models only on the paid tier.
- The $300 Google Cloud Free Trial. The credit lasts 90 days. Its exclusions name "Gemini API in AI Studio costs" and partner models sold as managed APIs. First-party Gemini models on Agent Platform aren't on that list, so trial credit should cover Nano Banana calls made with
enterprise=True. Watch the Billing reports after your first calls to confirm. - Express mode free tier. New Google Cloud users with a
@gmail.comaccount get 90 days of express mode without billing details, within the express quotas. Existing Google Cloud users don't get the free tier, and enabling billing ends it. As of September 24, 2026, the express mode model table still listedgemini-3.1-flash-image-previewandgemini-3-pro-image-preview, both retired in July, plusgemini-2.5-flash-imageat 10 requests per minute. It didn't list the GA image IDs, and Nano Banana 2.1 launched after that date, so free Nano Banana 2, 2.1, or Pro through express mode isn't documented. Test one call before you plan around it.
The free option that does exist is the Gemini app, not an API. There, Nano Banana 2 is available for free, while Nano Banana 2.1 requires a Google AI plan.
Vertex AI or a Gemini API key?
Google's own guidance is that most developers should use the Gemini Developer API unless they need specific enterprise controls. For Nano Banana, those controls are concrete:
| Question | Agent Platform (Vertex AI) | Gemini API key (AI Studio) |
|---|---|---|
| Authentication | ADC, service accounts, IAM; API key in express mode | API key |
| Endpoint | aiplatform.googleapis.com (or us/eu hosts) | generativelanguage.googleapis.com |
| Data residency, CMEK, VPC-SC | Listed on each model page for online prediction and Batch inference | Google points to Agent Platform when you need them |
| Provisioned Throughput | Supported | Offered through Agent Platform |
Nano Banana 2 (gemini-3.1-flash-image) | GA; retirement May 28, 2027 or later | Deprecated, no shutdown date announced; Google recommends 2.1 |
gemini-2.5-flash-image shutdown | March 15, 2027 | Google's pages conflict: the deprecations table says March 15, 2027; a pricing-page warning still says October 2, 2026 |
| List price | Same as Gemini API on global; +10% for Nano Banana 2 on us/eu | Same as Agent Platform global |
Data use isn't a deciding factor once you pay: the Gemini API's paid tier also states that your data is not used to improve Google's products.
Choose Agent Platform if your company already runs on Google Cloud, if security reviews require VPC-SC, CMEK, or EU/US residency, if you need reserved capacity, or if you have a Google Cloud trial credit to spend. It also gives older models a dated runway. Nano Banana 2 is supported there until May 28, 2027 or later, while the Gemini API has deprecated it without a date. For gemini-2.5-flash-image, Agent Platform lists March 15, 2027. If you still call that model with an AI Studio key, migrate rather than rely on either Gemini API date. For what Nano Banana 2 costs on the Gemini API while it remains available, see Nano Banana 2 API Pricing: $0.045–$0.151 per Image (Deprecated).
If none of that applies, an AI Studio key is less setup for the same models and the same list price. Nano Banana API Docs and Tutorial: Key, Model IDs, and Code covers that setup, and Gemini API vs Vertex AI API: Which Google Gemini Route Should You Use? compares the two platforms beyond image generation.
A third option fits readers who can't or don't want to open Google Cloud billing and need none of the controls above. The LaoZhang API Nano Banana pricing overview lists flat per-call prices as of October 8, 2026, whatever the output size: $0.045 for gemini-nano-banana-2.1, $0.055 for gemini-3.1-flash-image, $0.025 for gemini-3.1-flash-lite-image, and $0.09 for gemini-3-pro-image. It accepts Gemini-native generateContent requests with imageConfig at https://api.laozhang.ai. Against Google's Standard prices, the 2.1 rate is about even at 1K once reasoning tokens are counted and lower at 2K and 4K, while Google's Batch prices for 2.1 are lower at 1K and 2K. For Nano Banana 2, the flat price is lower than Standard at every size except 512, and Google's Flex and Batch prices are lower at 2K and below. It isn't Agent Platform: requests pass through a third party, with no VPC-SC, CMEK, data residency, Google SLA, or Provisioned Throughput.
Disclosure: laozhang.ai is our own service. Its prices are platform pricing, not an independent comparison.
FAQ
What happened to Vertex AI?
On April 22, 2026, Google made Vertex AI part of Gemini Enterprise Agent Platform. The product names changed: Vertex AI Studio is now Agent Studio, and the Vertex AI API is the Agent Platform API. Endpoints, projects, and billing did not change, and the SDK's legacy vertexai=True flag still works next to the new enterprise=True.
Do I have to move from Nano Banana 2 to Nano Banana 2.1 on Vertex AI?
Not yet. On Agent Platform, gemini-3.1-flash-image is GA with a retirement date of "May 28, 2027 or later," so code that works today can stay put. Start new projects on gemini-nano-banana-2.1, which is cheaper per image. The exception is a team that needs a guaranteed support term: 2.1 is a shorter-availability model whose retirement Google promises to announce only at least 45 days ahead. Stay on Nano Banana 2 if you need 512 output, the us or eu endpoint, Flex PayGo, or temperature and topP, none of which 2.1 offers. On the Gemini API the picture differs: Nano Banana 2 is deprecated there, with no shutdown date announced.
Is there a free API key for Nano Banana Pro?
Not from Google's free tiers. The Gemini API lists no free tier for Nano Banana Pro, and the express mode free tier doesn't list the GA gemini-3-pro-image ID. A new Google Cloud account's $300 trial credit is the closest thing: its exclusions cover AI Studio's Gemini API but not first-party Gemini on Agent Platform.
Do images from Vertex AI have a watermark?
They carry an invisible one. The Gemini API image generation docs state that all generated images include a SynthID watermark, Google Cloud's Nano Banana 2 enterprise announcement pairs SynthID with C2PA Content Credentials, and the Agent Platform model pages, 2.1's included, list C2PA as supported. Claims that Vertex output has "no watermark" can only refer to a visible mark.
Can I fine-tune Nano Banana on Vertex AI?
No. Every Nano Banana model page on Agent Platform lists tuning as "Not supported." To steer style or keep a subject consistent, pass reference images in the request instead: Nano Banana 2.1, 2, and Pro accept up to 14 per prompt.
Sources1
External pages this guide links to, in the order they appear. Last updated Oct 8, 2026.
Sources1
External pages this guide links to, in the order they appear. Last updated Oct 8, 2026.





