Google’s Nano Banana Pro has spent the past several months near the top of every serious AI image generator ranking, yet most of the coverage still treats it like a product review instead of a tool you actually learn. This guide skips the ranking talk. It walks through getting an API key, installing the right SDK, structuring prompts that hold up, and shipping a working batch-generation script by the end. Search for nano banana pro prompts and you’ll find plenty of copy-paste lists — a curator on r/GeminiAI who expanded a running list to more than 300 prompts by November 2025, a separate r/Bard project that compiled roughly 500 prompts into a downloadable CSV by December 2025, GitHub’s YouMind-OpenLab “awesome nano-banana-pro-prompts” repo still being updated into mid-2026, and directory sites like Aixploria — whose own “Best Nano Banana Prompt List” went live in December 2025 built around a structured multi-field formula — and Bananaprompts.org publishing their own structured libraries as of August 2026. Understand the handful of variables that actually drive the model’s output, and you stop needing someone else’s list.
By June 2026, Nano Banana Pro has settled into daily use for product photography, marketing assets, and character-driven illustration work, and a small ecosystem of curated resources has grown up around it — YouMind’s free library of high-performing Gemini 3 Pro Image prompts, live as of August 2026, and a Reddit thread from January 2026 that tested more than 100 prompts and narrowed them down to 74 that “actually work,” pointing readers to RichLabs for the source material. This tutorial covers the full path: account setup, the Gemini API, prompt structure, character consistency across a batch, resolution and aspect ratio control, error handling, and a complete Python project you can adapt for your own catalog of images. Budget around 80 minutes end to end, including the time it takes Python and the SDK to install.
Don't miss new tech stories on Google
Add Tech Insider once in the Google app and our stories appear in your news suggestions.
What Is Nano Banana Pro (and Why It’s Worth Learning)
Nano Banana Pro is the public nickname for Gemini 3 Pro Image, a model built by Google DeepMind. Google introduced it on November 20, 2025 through its official product announcement, positioning it as the higher-fidelity sibling to the original Nano Banana model, which had already built a following for fast, cheap edits earlier in 2025. Pro trades some of that speed for stronger text rendering, tighter composition control, and support for 4K output.
You can reach the model through four surfaces: the consumer Gemini app, Google AI Studio for free browser-based testing, the Gemini API for developers, and Vertex AI for enterprise deployments with usage controls. A growing set of third-party image generators has also added Nano Banana Pro as a selectable model — GPT Proto’s August 2026 write-up, “20 Best Nano Banana Pro Prompts,” for example, walks through choosing it inside its own generator and applying ready-made prompt cards. This tutorial focuses on the API path, since that’s what lets you script, batch, and automate generation rather than clicking through a web form one image at a time.
The model has earned its reputation in independent testing, not just Google’s own marketing. Editorial testing site Curious Refuge scored Nano Banana Pro 9.50 out of 10 in its 2026 AI image generator rankings, ahead of Flux 2 Pro’s 8.78. Buying-guide site Rangy separately named it the top pick for photorealism in its 2026 comparison guide, again with Flux 2 Pro as the closest competitor. None of that matters much if your prompts are vague, though. The gap between a generic result and a genuinely usable one comes down to how you structure the request, which is most of what this tutorial covers.
Roundup coverage of the wider AI image generator category, including Zapier’s 2026 guide, groups Nano Banana Pro alongside FLUX.1, Adobe Firefly, and ChatGPT’s image generator as tools that warrant a dedicated “how to use” walkthrough rather than just a spec sheet. That’s a signal worth paying attention to. Search demand has shifted from “which tool should I pick” toward “how do I actually get good output from the tool I already picked,” and the API path, code samples, and troubleshooting steps in this tutorial are built around that second question.
Real-World Use Cases for Nano Banana Pro
Knowing what other teams actually build with this model helps you scope your own project before you write a line of code. A handful of use cases keep showing up in how developers describe their production workflows.
- E-commerce product photography. The batch project in Step 10 is a direct fit for a store catalog that needs consistent studio-style shots without booking a photographer for every SKU.
- Marketing and ad creative variants. Generating a dozen aspect-ratio and headline variations of the same core concept for different ad placements is far faster through the API than through a design tool, once your prompt template is dialed in.
- Character-driven illustration and comics. The reference-image workflow from Step 5 is built for exactly this: keeping a character’s face, outfit, and color palette consistent across dozens of panels or scenes.
- Localized marketing assets. Google’s own documentation highlights advanced localization as a strength of the model, which matters if you’re regenerating the same layout with translated in-image text for different regions.
- UI and product mockups. Clean text rendering, covered in Step 7, makes this model usable for quick app screen or packaging mockups that used to require a design pass just to test an idea.
Prerequisites: What You Need Before You Start
Nothing here requires a powerful machine. Nano Banana Pro generation happens on Google’s servers, so your laptop just needs Python and a stable connection. Here’s the full list before you open a terminal.
| Requirement | Minimum Version or Spec | Why You Need It |
|---|---|---|
| Python | 3.9 or later | Required by the google-genai SDK |
| google-genai SDK | Latest version via pip | Google’s actively maintained Python client for the Gemini API |
| Google account | Any standard account | Needed to create an API key in Google AI Studio |
| Gemini API key | Free tier available | Authenticates every request you send |
| Code editor or IDE | Any (VS Code works well) | To write and run the Python scripts in this guide |
| Testing budget | Roughly $5 to $10 | Covers pay-as-you-go generation once you exceed the free quota |
| Free disk space | About 500MB | SDK, dependencies, and generated images |
You do not need a credit card to start. Google AI Studio’s free tier covers every step in this tutorial, including the batch project near the end, as long as you stick to standard resolution while you’re learning. Save 4K generation for images you actually intend to ship. If you’re brand new to the Gemini ecosystem generally, skimming a text-generation walkthrough first, such as our RAG pipeline tutorial, will make the authentication and SDK setup steps below feel familiar, since the account and API-key flow is shared across every Gemini model family, not just image generation.
Step 1: Create Your Google AI Studio Account and API Key
Sign in to Google AI Studio with any Google account. From the API keys section, click Create API Key and either attach it to an existing Google Cloud project or let AI Studio spin up a new one automatically. Copy the key immediately, since some views only display it once.
Store the key as an environment variable rather than pasting it directly into a script. On macOS or Linux, add it to your shell profile:
export GOOGLE_API_KEY="your-key-here"
On Windows, use setx GOOGLE_API_KEY "your-key-here" in a Command Prompt window, then restart your terminal so the variable loads. Every code sample in this tutorial reads the key from that environment variable, which keeps it out of your source files and out of version control by default. Google’s own getting-started documentation walks through the same flow if your account layout looks different from what’s described here.
Step 2: Install Python and the Google Gen AI SDK
Confirm your Python version first, then install the SDK. Google retired its older google-generativeai package and now points developers toward google-genai, documented on its official libraries page and published on PyPI. If an older tutorial tells you to install the legacy package, skip it. It no longer receives new model support.
python3 --version
pip install -U google-genai
A clean install pulls in a handful of small dependencies and finishes in under a minute on most connections. If you’re working inside a virtual environment, which is worth doing for any project you plan to keep around, activate it before running the pip command so the package doesn’t land in your system Python.
Step 3: Write Your First Nano Banana Pro API Call
With the key set and the SDK installed, the shortest path to a working image is about ten lines of Python. Google’s rollout used the identifier gemini-3-pro-image-preview at launch, and that same string still shows up across current API documentation and third-party integration guides, so it’s the safest one to use in your own code today.
import os
from google import genai
client = genai.Client(api_key=os.environ["GOOGLE_API_KEY"])
response = client.models.generate_content(
model="gemini-3-pro-image-preview",
contents=["A photorealistic macro shot of a dew drop on a green leaf, morning light"],
)
for part in response.candidates[0].content.parts:
if part.inline_data is not None:
with open("first_image.png", "wb") as f:
f.write(part.inline_data.data)
print("Saved first_image.png")
Run the script and watch the console. A successful call prints Saved first_image.png and drops a new PNG, typically somewhere between 1MB and 3MB depending on scene complexity, into your working directory. If nothing prints and the script exits silently, jump ahead to the troubleshooting section later in this guide before assuming your code is wrong. Google’s image generation documentation is worth bookmarking too, since model identifiers and response fields do shift as the API matures.
Step 4: Master the Nano Banana Pro Prompt Framework
This is the step that separates flat, generic output from images people actually use. Google’s own prompting guidance and independent testing guides converge on roughly the same structure: six elements that, written out in a single natural-language sentence, give the model enough to work with. Imagine.art’s prompting guide — first published with 75 sample prompts in November 2025 and refreshed again in August 2026 — labels those six elements subject, composition, action, setting, style, and editing instructions, while AIREiter’s March 2026 roundup of 50-plus examples calls them subject, action or context, setting, lighting, style, and constraints — different wording for the same underlying checklist. Most recently, ATLabs’ “Ultimate Nano Banana Pro Prompting Guide,” published in September 2026, condenses the same idea into its own five-part subject-action-location-composition-style formula. Skip two or three of them and you get the kind of soft, average-looking result that made “AI slop” a common complaint in 2025.
| Element | What It Controls | Example |
|---|---|---|
| Subject | Who or what is in the frame, described specifically | a stoic robot barista with brushed steel plating |
| Action | What the subject is doing | pouring espresso into a ceramic cup |
| Setting | Location, time of day, and light source | a sunlit corner café at 8am |
| Composition | Camera angle, framing, and focal length | close-up, 50mm lens, shallow depth of field |
| Style | The overall visual treatment | photorealistic, editorial photography |
| Details | Fine-grained specifics that anchor the scene | steam rising, wood countertop, warm color grading |
Compare a weak prompt against one built from the framework. “A robot making coffee” gives the model almost nothing to lock onto, so it fills the gaps with whatever is statistically average in its training data. “A stoic robot barista with brushed steel plating pouring espresso into a ceramic cup, in a sunlit corner café at 8am, close-up shot on a 50mm lens with shallow depth of field, photorealistic editorial style, steam rising off the cup” gives it six concrete anchors. The second version is longer to type. It’s also the difference between a usable asset and a throwaway test.
One more habit worth building early: write in full sentences instead of comma-separated keyword lists. Nano Banana Pro’s underlying language model parses natural phrasing better than keyword soup, a point Google’s own prompting guide and several third-party guides, including fal.ai’s prompting reference, both make explicitly. Fal.ai’s guide, updated in June 2026, pushes that further for edit prompts specifically, structuring them around a Lock, Change, Amount, and Constraints pattern so the model knows exactly what to hold fixed and what to change. Treat the prompt like a brief you’d hand to a photographer, not a tag list you’d hand to a search engine.
Step 5: Use Reference Images for Character Consistency
Text alone struggles to keep a character looking the same across multiple generations. Attach a reference image instead, and the model has something concrete to match rather than reinterpreting your description from scratch each time. Several third-party integration guides put the ceiling at up to 14 reference images for multi-image fusion, though that number isn’t published directly on Google’s own documentation, so treat it as a practical upper bound rather than a guaranteed hard limit.
from google import genai
from google.genai import types
client = genai.Client()
reference_image = types.Part.from_bytes(
data=open("character_reference.png", "rb").read(),
mime_type="image/png",
)
prompt = (
"The same robot barista character from the reference image, "
"now restocking a shelf of ceramic mugs, same face design, "
"same color scheme, warm afternoon light"
)
response = client.models.generate_content(
model="gemini-3-pro-image-preview",
contents=[reference_image, prompt],
)
for part in response.candidates[0].content.parts:
if part.inline_data is not None:
with open("consistent_character.png", "wb") as f:
f.write(part.inline_data.data)
Notice the prompt still explicitly calls out “same face design” and “same color scheme” instead of relying on the reference image alone. Redundancy helps here. The image anchors the model, and the text reinforces exactly which traits need to carry over, which matters most when you’re generating a character across a dozen different scenes in one sitting.
Step 6: Control Resolution and Aspect Ratio
Nano Banana Pro supports output up to 4K, according to third-party API integration guides, though generation time and cost both scale with resolution. Those same integration guides put typical generation time around 8 to 12 seconds per image at standard resolution, and reported pricing of roughly $0.134 per standard (1K/2K) image versus roughly $0.24 per 4K image. Google doesn’t publish a single, easy-to-quote pricing page alongside this feature set, so treat those figures as a planning estimate rather than a locked-in rate, and check your Google AI Studio billing dashboard for the number that actually applies to your account.
from google import genai
from google.genai import types
client = genai.Client()
response = client.models.generate_content(
model="gemini-3-pro-image-preview",
contents=["A wide banner shot of a mountain trail at sunrise, photorealistic"],
config=types.GenerateContentConfig(
image_config=types.ImageConfig(
aspect_ratio="16:9",
)
),
)
for part in response.candidates[0].content.parts:
if part.inline_data is not None:
with open("banner_16x9.png", "wb") as f:
f.write(part.inline_data.data)
If a parameter name in that config block throws an error on your installed SDK version, run help(types.ImageConfig) in a Python shell to see the exact fields your version supports. Google has adjusted parameter names before as the API has matured, and a quick introspection check saves more time than guessing.
Step 7: Get Clean, Accurate Text Rendering
Legible in-image text is one of the areas where Nano Banana Pro pulled ahead of the previous generation of image models, which is a large part of why it’s found a home in marketing and packaging mockups. Google’s own documentation describes the model’s strength here as advanced localization and brand-consistent output rather than giving a single quantified accuracy number, so the guidance below comes from testing patterns that show up consistently across the third-party guides this tutorial draws on.
Three habits make the biggest difference. Put the exact text you want rendered inside quotation marks in your prompt, rather than describing it indirectly. Keep that quoted text short, ideally under eight or nine words, since longer strings are where character-level mistakes creep in. And specify roughly where the text should sit in the frame, such as “centered near the top” or “along the bottom third,” instead of leaving placement to chance.
prompt = (
'A minimalist coffee bag label mockup, matte kraft paper texture, '
'the text "MORNING ROAST" centered near the top in a bold serif font, '
'small text "SINGLE ORIGIN" beneath it, studio lighting, front-facing angle'
)
Even with those habits, plan on generating two or three variations of anything text-heavy and picking the cleanest one, rather than expecting the first output to be flawless. That’s still faster than a design pass in traditional software, but it’s not zero-review output either.
Logos and brand marks deserve the same caution. If you already have a finished logo file, describe placement and don’t ask the model to redraw the mark itself from a text description, since even strong text rendering doesn’t guarantee pixel-perfect reproduction of an exact existing brand asset. Composite your real logo onto the generated background afterward in a lightweight image library if brand accuracy matters more than generation speed for that particular asset.
Step 8: Edit Existing Images and Iterate
Nano Banana Pro can take an existing image as input alongside a text instruction and return a modified version, which turns the workflow into something closer to a conversation than a one-shot request. This is where most real projects actually live: generate a draft, look at what’s wrong, describe the fix, and regenerate.
from google import genai
from google.genai import types
client = genai.Client()
existing_image = types.Part.from_bytes(
data=open("product_photos/draft_01.png", "rb").read(),
mime_type="image/png",
)
edit_prompt = "Keep everything the same, but change the background to pure white"
response = client.models.generate_content(
model="gemini-3-pro-image-preview",
contents=[existing_image, edit_prompt],
)
for part in response.candidates[0].content.parts:
if part.inline_data is not None:
with open("product_photos/draft_02.png", "wb") as f:
f.write(part.inline_data.data)
Notice the edit prompt opens with “keep everything the same.” Naming what should stay fixed is just as important as naming what should change. Without that anchor, the model sometimes treats an edit instruction as a cue to regenerate the whole scene, which defeats the point of iterating on a draft you already liked.
Step 9: Handle Errors, Safety Filters, and Rate Limits
Any script you plan to run more than a handful of times needs to handle three failure modes: a rejected key, a rate limit, and a prompt that trips the safety filter. The first two are transient and worth retrying. The third isn’t, and retrying it with the same prompt just wastes a call.
import time
from google import genai
client = genai.Client()
def generate_safely(prompt, max_attempts=3):
for attempt in range(1, max_attempts + 1):
try:
response = client.models.generate_content(
model="gemini-3-pro-image-preview",
contents=[prompt],
)
except Exception as error:
wait = 2 ** attempt
print(f"Request failed ({error}). Retrying in {wait}s")
time.sleep(wait)
continue
candidate = response.candidates[0]
if candidate.finish_reason not in ("STOP", None):
print(f"Generation stopped early: {candidate.finish_reason}")
return None
for part in candidate.content.parts:
if part.inline_data is not None:
return part.inline_data.data
raise RuntimeError(f"Generation failed after {max_attempts} attempts")
The exponential backoff in that retry loop (2, 4, then 8 seconds) is a reasonable default for a 429 rate-limit response, giving Google’s servers room to recover without hammering the endpoint. The finish_reason check is what catches a safety-filter rejection cleanly instead of letting your script crash on a response that has no image data to extract.
Safety filters typically trigger on prompts involving real public figures, graphic violence, or content that could be used for impersonation, and Google hasn’t published a full, granular list of every trigger condition. That’s by design. A published checklist would just become a guide for working around it. If a prompt gets blocked and you believe it shouldn’t have been, the practical fix is usually to rephrase around the specific term that likely tripped the filter, rather than appealing the decision or retrying the identical wording.
Step 10: Build a Complete Project: a Batch Product-Photo Generator
This is where everything from the previous nine steps comes together. The script below takes a list of product descriptions, applies a consistent style suffix built from the prompt framework, generates each one with retry logic, and saves the results with unique filenames so nothing gets silently overwritten mid-batch.
import os
import time
import uuid
from pathlib import Path
from google import genai
from google.genai import types
client = genai.Client(api_key=os.environ["GOOGLE_API_KEY"])
MODEL = "gemini-3-pro-image-preview"
OUTPUT_DIR = Path("product_photos")
OUTPUT_DIR.mkdir(exist_ok=True)
PRODUCTS = [
"a matte black wireless earbud case",
"a stainless steel pour-over coffee dripper",
"a minimalist leather laptop sleeve",
]
STYLE_SUFFIX = (
"studio product photography, soft rim lighting, "
"dark gradient background, centered composition, "
"shot on a 100mm macro lens, ultra sharp focus"
)
def generate_with_retry(prompt, max_attempts=3):
for attempt in range(1, max_attempts + 1):
try:
return client.models.generate_content(
model=MODEL,
contents=[prompt],
config=types.GenerateContentConfig(
image_config=types.ImageConfig(aspect_ratio="1:1")
),
)
except Exception as error:
wait = 2 ** attempt
print(f"Attempt {attempt} failed: {error}. Retrying in {wait}s")
time.sleep(wait)
raise RuntimeError(f"Generation failed after {max_attempts} attempts")
def save_first_image(response, filename):
candidate = response.candidates[0]
if candidate.finish_reason not in ("STOP", None):
print(f"Skipped, finish_reason={candidate.finish_reason}")
return None
for part in candidate.content.parts:
if part.inline_data is not None:
filepath = OUTPUT_DIR / filename
with open(filepath, "wb") as f:
f.write(part.inline_data.data)
return filepath
return None
for product in PRODUCTS:
prompt = f"{product}, {STYLE_SUFFIX}"
result = generate_with_retry(prompt)
filename = f"{uuid.uuid4().hex[:8]}.png"
saved_path = save_first_image(result, filename)
if saved_path:
print(f"Saved {saved_path}")
else:
print(f"No image returned for: {product}")
Run this against the three sample products and you’ll see three lines of output, each reading something like Saved product_photos/4f3a9b2c.png, with three matching PNG files landing in the product_photos folder. Swap the PRODUCTS list for your own catalog, adjust STYLE_SUFFIX to match your brand’s look, and this same script scales from three items to three hundred without changing its structure. For a much larger catalog, add a short pause between calls to stay comfortably under your account’s rate limit rather than firing requests as fast as the loop allows.
Step 11: Track Costs and Manage Your Budget
Image generation costs add up faster than text generation, especially once a batch script is running unattended. Based on the per-image figures reported by third-party API integration guides, a 300-image batch at standard resolution lands somewhere around $40, while the same batch at 4K climbs closer to $72. Confirm current numbers on your own Google AI Studio billing page before committing to a large run, since pricing on any API can change.
| Output Tier | Reported Price per Image | Best Use Case |
|---|---|---|
| Google AI Studio (manual, browser) | Free, with daily limits | Prompt testing and learning the framework |
| Standard resolution (1K/2K) via API | ~$0.134 | Drafts, iteration, most production use cases |
| 4K resolution via API | ~$0.24 | Final assets for print or large display |
A practical workflow that keeps costs predictable: draft and iterate at standard resolution until the composition and character consistency are locked in, then re-run only the final selections at 4K. That alone can cut a project’s total spend by more than half compared to generating everything at maximum resolution from the first attempt. Setting a budget alert in the Google Cloud console tied to your linked billing account is worth the five minutes it takes, particularly before you leave a batch script running unattended overnight.
Common Pitfalls When Writing Nano Banana Pro Prompts
Most of these show up in someone’s first week of using the API, and every one of them is avoidable once you know to watch for it.
- Writing vague, one-sentence prompts. “A cat in a garden” leaves five of the six framework elements to chance. The model fills them with statistically average choices, which is exactly the flat, generic look people complain about.
- Skipping reference images when consistency actually matters. Describing a character in text alone, then expecting it to look identical across ten generations, is asking for drift. Attach a reference image the moment consistency is a requirement, not an afterthought.
- Requesting 4K on every test iteration. Iterating at full resolution burns both money and time before you’ve even confirmed the composition works. Draft small, finalize large.
- Ignoring a blocked or empty response. A script without a finish_reason check will crash confusingly, or worse, silently write an empty file, when a prompt trips the safety filter instead of raising a clear error.
- Reusing the same output filename inside a loop. Without a unique filename per generation, each new image quietly overwrites the last one, and you won’t notice until you’re missing half a batch.
- Assuming the API and the consumer Gemini app behave identically. Rate limits, available parameters, and default settings differ between the free consumer app and the metered API, so testing that works fine in one doesn’t guarantee the other behaves the same way.
- Cramming long paragraphs of text into a single image. Text rendering accuracy drops as the quoted string gets longer. Split anything beyond a short headline and a subline into a separate design pass.
Most of these trace back to the same root cause: treating the model like a slot machine instead of a collaborator that responds predictably to specific input. Once the six-part framework from Step 4 becomes second nature, the majority of these pitfalls stop happening on their own, simply because a fully specified prompt doesn’t leave room for the model to guess wrong.
Nano Banana Pro vs Flux 2 Pro vs Midjourney v7
None of these three models is strictly better across every use case, which is why independent testers keep publishing fresh comparisons instead of settling on one winner. Here’s how they stack up on access model and the strengths each one is best known for.
| Model | Maker | How You Access It | Independent Testing Verdict |
|---|---|---|---|
| Nano Banana Pro (Gemini 3 Pro Image) | Google DeepMind | Gemini app, AI Studio, Gemini API, Vertex AI | 9.50/10 in Curious Refuge’s 2026 rankings, and Rangy’s top pick for photorealism |
| Flux 2 Pro | Black Forest Labs | API and third-party hosts such as fal.ai | 8.78/10 in the same Curious Refuge rankings, and Rangy’s photorealism runner-up |
| Midjourney v7 | Midjourney, Inc. | Discord and a web app | Remains a top search destination for prompt tutorials and stylized, artistic renders |
If your project already lives inside Google’s ecosystem, whether that’s Workspace, Vertex AI, or another Gemini-powered tool, Nano Banana Pro is the path of least friction and the current photorealism leader per both rankings cited above. Flux 2 Pro is worth a look if you need an open-weight-adjacent option you can self-host or run through a broader set of third-party API providers. Midjourney v7 still wins on stylized, illustration-heavy output where a distinct artistic look matters more than photorealistic accuracy. Our FLUX local setup tutorial covers that alternative path if you decide self-hosting fits your project better than an API call.
Cost is the other variable worth weighing before you commit a project to one model. A self-hosted Flux 2 Pro deployment shifts spending toward GPU rental or a one-time hardware cost instead of a per-image API fee, which can pencil out cheaper at very high volume but adds real infrastructure work most small teams would rather avoid. Nano Banana Pro’s pay-as-you-go pricing, covered in Step 11, keeps the operational overhead close to zero, which is usually the better trade until your monthly image count climbs into the tens of thousands.
Troubleshooting Guide: Common Errors and Fixes
Nine issues account for the overwhelming majority of problems people hit while building against the Nano Banana Pro API. Work through this table before assuming something deeper is broken.
| Error or Symptom | Likely Cause | Fix |
|---|---|---|
| 403 PERMISSION_DENIED | Missing, invalid, or expired API key | Regenerate the key in Google AI Studio and confirm the environment variable is actually set in your current shell session |
| 429 RESOURCE_EXHAUSTED | Rate limit or free-tier quota exceeded | Add exponential backoff and retry logic, or check whether your account needs to move to a paid tier |
| Empty response, no image in candidates | Prompt was likely blocked by the safety filter | Check candidate.finish_reason and rewrite the prompt rather than retrying it unchanged |
| Garbled or misspelled text inside the image | Quoted text too long, or placement left unspecified | Shorten the quoted string and state where it should sit in the frame, as shown in Step 7 |
| Character looks different across a batch | Relying on text description alone for consistency | Attach the same reference image to every call, as shown in Step 5 |
| ModuleNotFoundError: No module named google.genai | The legacy google-generativeai package is installed instead | Uninstall the old package and run pip install -U google-genai |
| Image comes back with an unexpected aspect ratio | No aspect_ratio parameter was set, so a default was applied | Explicitly pass image_config with your desired aspect_ratio, as shown in Step 6 |
| Output file is 0 bytes or won’t open | File wasn’t opened in binary write mode | Confirm you’re writing with “wb”, not “w”, when saving part.inline_data.data |
| Unexpectedly high bill at the end of a batch run | A loop generated more 4K images than intended | Log resolution and image count per run, and set a Google Cloud budget alert as covered in Step 11 |
Advanced Tips for Production Workflows
Once the basics are solid, a handful of habits separate a one-off script from something you can rely on for actual production work — echoing the direction Joulyan’s January 2026 guide took when it codified 15 advanced tips specifically for Nano Banana Pro prompting.
- Version-control your prompt templates, not just your code. Store the style suffix and framework structure you settle on in a separate config file. When a client or teammate asks for a variation, you’re editing one string instead of hunting through a script.
- Log the exact prompt alongside every saved image. A simple sidecar JSON or CSV file mapping filename to prompt text makes it possible to regenerate or tweak a specific image weeks later without guessing what produced it.
- Use a cheaper Gemini text model to expand short briefs automatically. Feeding a one-line product description into a fast text model, prompted to expand it into the six-part framework, scales well when you’re generating hundreds of variations and don’t want to hand-write every prompt.
- Build a human review queue before publishing anything commercially. Even strong models produce the occasional malformed hand, warped logo, or off-brand color. A quick manual pass before assets go live catches what an automated pipeline won’t.
- Batch during off-peak hours if you’re running hundreds of images. Latency and queue times can vary with overall API load, so a large overnight batch often completes more smoothly than the same batch run during peak daytime hours.
None of these tips matter on day one. They matter around week three, once a script you wrote for a single test image has quietly become the thing your team depends on for every product launch. Building the logging and version-control habits in early costs almost nothing. Retrofitting them onto a pipeline that’s already running in production costs considerably more.
Frequently Asked Questions
What is Nano Banana Pro, and how is it different from the original Nano Banana?
Nano Banana Pro is Google’s nickname for Gemini 3 Pro Image, announced November 20, 2025. The original Nano Banana (Gemini 2.5 Flash Image) launched earlier in 2025 and remains faster and cheaper for quick edits. Pro adds stronger text rendering, tighter composition control, and 4K output at a higher per-image cost.
Is Nano Banana Pro free to use?
Google AI Studio offers a free tier with daily limits, which is enough for learning the framework and testing prompts. The Gemini API moves to pay-as-you-go pricing once you exceed that free quota, with third-party integration guides reporting roughly $0.134 per standard image and $0.24 per 4K image.
What’s the best structure for Nano Banana Pro prompts?
Cover six elements in a single natural-language sentence: subject, action, setting, composition, style, and details. That’s the framework Google’s own prompting guidance and independent testing guides both converge on, and it’s covered in full in Step 4 above.
How many reference images can I use for character consistency?
Several third-party integration guides cite a ceiling of up to 14 images for multi-image fusion, though Google hasn’t published that exact number on its own documentation. For most character-consistency use cases, one to three clear reference images is enough.
Does Nano Banana Pro watermark its images?
Google’s Gemini image generation documentation describes SynthID invisible watermarking as part of its Gemini image output pipeline generally. If watermark-free output is a hard requirement for your project, confirm current behavior against Google’s live documentation before you rely on it.
Can I use Nano Banana Pro images commercially?
Usage rights depend on Google’s current Gemini API terms of service, which can change. Check the terms tied to your specific account tier before shipping generated images in a commercial product, rather than assuming a blanket answer applies.
Why does my output ignore part of my prompt?
This usually traces back to an overloaded single sentence or conflicting instructions. Break a complex scene into the six framework elements from Step 4, keep each one concrete, and avoid asking for contradictory details, such as two different lighting setups in the same request.
How does Nano Banana Pro compare to Midjourney for beginners?
Midjourney runs through Discord or a web app with no code required, which is a lower barrier for casual use. Nano Banana Pro’s API path takes more setup, as this tutorial shows, but it pays off once you need to batch, automate, or integrate generation into an existing application.
What’s the difference between the gemini-3-pro-image-preview and gemini-3-pro-image model IDs?
Google’s rollout launched under the preview identifier in November 2025, and that string still appears throughout current documentation and third-party integration guides. Some newer official material also references a stable gemini-3-pro-image identifier. If a call using one identifier fails, try the other, and check the current model list in your Google AI Studio dashboard for the exact string your account has access to.
Do I need a GPU to run Nano Banana Pro?
No. Generation happens entirely on Google’s infrastructure. Your machine only needs to run Python and send an HTTPS request, which is why this tutorial works the same on a basic laptop as it does on a workstation with a dedicated graphics card.
Related Coverage
- How to Run FLUX Locally in ComfyUI: 13 Steps, 90 Min [2026]
- ComfyUI Tutorial: Build SDXL & FLUX Workflows in 13 Steps [2026]
- Best AI Image Generator 2026: GPT Image 2 Hits 1370 Elo
- Gemini 3.6 Flash Debuts: 17% Cheaper, 12-Point Gain [2026]
- Claude Opus vs GPT-5.5 vs Gemini 3.5 Flash: $21 Gap [2026]
- How to Build a RAG Pipeline: 12 Steps, 90 Min [2026]
- More AI & Machine Learning Coverage


