Complete Developer’s Guide to Nano Banana Pro: From Beginner to Advanced
If you’re familiar with Nano Banana (the Flash model)—the fun, fast, and affordable image generation tool—then Nano Banana Pro is its more thoughtful older sibling. Compared to the basic version, the Pro model brings three key upgrades:
-
Thinking Mode (transparent reasoning process) -
Search Grounding (real-time Google Search data integration) -
4K Image Generation (print-quality output)
This guide will walk you through mastering Nano Banana Pro from start to finish using the Gemini Developer API, with practical examples and working code—no fluff included.
What You’ll Learn
-
How to use Nano Banana Pro in Google AI Studio -
Project setup steps -
API client initialization -
Basic image generation -
Enabling and using the “Thinking” feature -
Search Grounding usage tips -
Creating 4K images -
Multilingual image generation capabilities -
Advanced image mixing -
Pro-exclusive demo use cases -
Prompt engineering and best practices
1. Using Nano Banana Pro in Google AI Studio
End-users can access Nano Banana Pro via the Gemini app, but for developers looking to prototype and test prompts, Google AI Studio is the ideal environment. AI Studio serves as a playground for experimenting with all available AI models before writing code, and it’s also the entry point for building with the Gemini API.
Getting started is simple: Visit aistudio.google.com, sign in with your Google account, and select Nano Banana Pro (Gemini 3 Pro Image) from the model picker.
Important note: Unlike the basic Flash model, the Pro version does not offer a free tier—you’ll need to use an API key with billing enabled (see the “Project Setup” section below).
Pro Tip: You can also build Nano Banana web apps directly in AI Studio at ai.studio/apps, or explore and remix code from existing apps.
2. Project Setup Requirements
To follow this guide, you’ll need:
-
An API key from Google AI Studio -
A Google Cloud project with billing enabled -
The Google Gen AI SDK for Python or JavaScript/TypeScript
If you’re already an active Gemini API user, feel free to skip this section. New users can follow the steps below.
Step A: Get Your API Key
When you first log into AI Studio, a Google Cloud project and corresponding API key are automatically created for you.
Open the API key management page and click the “copy” icon to retrieve your API key.
Step B: Enable Billing
Since Nano Banana Pro has no free tier, you’ll need to enable billing for your Google Cloud project.
On the API key management page, find your project and click “Set up billing” next to it. Follow the on-screen instructions to complete the process.
How Much Does Nano Banana Pro Cost?
Image generation with Nano Banana Pro is more expensive than the Flash version—especially for 4K images. As of now, a 1K or 2K image costs 0.24. These prices include token fees for input and text output.
Pro Tip: Use the Batch API to save 50% on generation costs. Note that processing may take up to 24 hours.
Step C: Install the SDK
Choose and install the SDK for your preferred programming language:
For Python:
pip install -U google-genai
# Install the Pillow library for image manipulation
pip install Pillow
For JavaScript/TypeScript:
npm install @google/genai
Note: The examples below use the Python SDK for demonstration purposes.
3. Initialize the Client
To use the Pro model, you’ll need to specify the model ID: gemini-3-pro-image-preview.
from google import genai
from google.genai import types
# Initialize the client
client = genai.Client(api_key="YOUR_API_KEY")
# Set the model ID
PRO_MODEL_ID = "gemini-3-pro-image-preview"
4. Basic Image Generation
Before diving into advanced features, let’s cover standard image generation. You can customize outputs using response_modalities (to get text + images or just images) and aspect_ratio.
prompt = "Create a photorealistic image of a Siamese cat with a green left eye and a blue right eye"
aspect_ratio = "16:9" # Options: "1:1", "2:3", "3:2", "3:4", "4:3", "4:5", "5:4", "9:16", "16:9", or "21:9"
response = client.models.generate_content(
model=PRO_MODEL_ID,
contents=prompt,
config=types.GenerateContentConfig(
response_modalities=['Text', 'Image'], # Or just ['Image']
image_config=types.ImageConfig(
aspect_ratio=aspect_ratio,
)
)
)
# Save the image
for part in response.parts:
if image := part.as_image():
image.save("cat.png")
Chat mode is also available (and recommended for multi-turn editing). See the “Multilingual Capabilities” section (Section 8) for an example.
(Image generated by Nano Banana Pro)
5. Using the “Thinking” Process
Nano Banana Pro doesn’t just generate images—it thinks first. It can reason through complex, nuanced prompts before creating visuals. Best of all, you can see its thought process!
To enable this feature, set include_thoughts=True in thinking_config.
prompt = "Create an unusual but realistic image that could go viral"
aspect_ratio = "16:9"
response = client.models.generate_content(
model=PRO_MODEL_ID,
contents=prompt,
config=types.GenerateContentConfig(
response_modalities=['Text', 'Image'],
image_config=types.ImageConfig(
aspect_ratio=aspect_ratio,
),
thinking_config=types.ThinkingConfig(
include_thoughts=True # Enable thought process output
)
)
)
# Display the image and thought process
for part in response.parts:
if part.thought:
print(f"Thought Process: {part.text}")
elif image := part.as_image():
image.save("viral.png")
You’ll receive output similar to this:
## Imagining Llama Commuters
I'm focusing on llamas now. The goal is to capture them as daily commuters on a bustling bus in La Paz, Bolivia. My plan involves a vintage bus crammed with amused passengers. The image will highlight details like one llama looking out the window, another interacting with a passenger, and people taking photos.
[IMAGE]
## Visualizing the Concept
I'm now fully immersed in the requested scenario. My primary focus is on the "unusual yet realistic" aspects. The scene is starting to take shape with key elements established.
This transparency lets you understand how the model interprets your request—like collaborating directly with an artist!
(Image generated by Nano Banana Pro)
6. Real-Time Magic: Search Grounding
One of the Pro model’s most revolutionary features is Search Grounding. Unlike the basic version, it isn’t limited to outdated data— it can access real-time information from Google Search to generate accurate, up-to-date images. Need a weather forecast visualization? No problem.
For example, you can ask it to visualize a 5-day weather forecast:
prompt = "Visualize the current 5-day weather forecast for Tokyo as a clean, modern weather chart. Include visuals of what to wear each day."
response = client.models.generate_content(
model=PRO_MODEL_ID,
contents=prompt,
config=types.GenerateContentConfig(
response_modalities=['Text', 'Image'],
image_config=types.ImageConfig(
aspect_ratio="16:9",
),
tools=[{"google_search": {}}] # Enable Google Search
)
)
# Save the image
for part in response.parts:
if image := part.as_image():
image.save("weather.png")
# Display sources (required by policy)
print(response.candidates[0].grounding_metadata.search_entry_point.rendered_content)
(Image generated by Nano Banana Pro)
7. Go Big: 4K Image Generation
Need print-quality images? Nano Banana Pro supports 4K resolution—because sometimes, bigger really is better.
prompt = "A photo of an oak tree experiencing all four seasons"
resolution = "4K" # Options: "1K", "2K", "4K" (lowercase values do not work)
response = client.models.generate_content(
model=PRO_MODEL_ID,
contents=prompt,
config=types.GenerateContentConfig(
response_modalities=['Text', 'Image'],
image_config=types.ImageConfig(
aspect_ratio="1:1",
image_size=resolution
)
)
)
Note: 4K generation comes at a higher cost—use it strategically!
(Image generated by Nano Banana Pro)
8. Multilingual Capabilities
The Pro model can generate and translate text within images in over a dozen languages—acting as a universal translator for visual content.
# Generate an infographic in Spanish
message = "Create an infographic explaining Einstein's Theory of General Relativity, suitable for a 6th grader. Use Spanish."
response = chat.send_message(message,
config=types.GenerateContentConfig(
image_config=types.ImageConfig(aspect_ratio="16:9")
)
)
# Save the image
for part in response.parts:
if image := part.as_image():
image.save("relativity.png")
# Translate to Japanese
message = "Translate this infographic to Japanese, keeping all other elements the same."
response = chat.send_message(message)
# Save the image
for part in response.parts:
if image := part.as_image():
image.save("relativity_JP.png")
(Image generated by Nano Banana Pro)
(Image generated by Nano Banana Pro)
9. Advanced Image Mixing
While the Flash model can process up to 3 images, the Pro version handles up to 14 images—perfect for creating complex collages or showcasing entire product lines.
# Mix multiple images
response = client.models.generate_content(
model=PRO_MODEL_ID,
contents=[
"An office group photo of these people making funny faces.",
PIL.Image.open('John.png'),
PIL.Image.open('Jane.png'),
# ... add up to 14 images
],
)
# Save the image
for part in response.parts:
if image := part.as_image():
image.save("group_picture.png")
Note: For maximum fidelity with people or objects, limit inputs to 5 images—more than enough for a dynamic group shot!
(Image generated by Nano Banana Pro)
10. Pro-Exclusive Demos
Here are examples of what’s only possible with Nano Banana Pro—prepare to be impressed:
Personalized Pixel Art (with Search Grounding)
Prompt: “Search the web and generate an isometric, detailed pixel art image showing Guillaume Vernade’s career.”
This uses Search Grounding to gather specific information about an individual and present it in a custom style.
Complex Text Integration
Prompt: “Create an infographic about how sonnets work. Include a sonnet about bananas and a detailed literary analysis of the poem. Use a vintage aesthetic.”
The model generates coherent, lengthy text and seamlessly embeds it into complex layouts.
High-Fidelity Mockups
Prompt: “A photo of a Broadway show program for ‘TCG Players’ on a nice theater seat. The program should be professional, well-made, and glossy—show both the cover and a page featuring a stage photo.”
Generate photorealistic mockups of print materials with precise lighting and textures.
11. Best Practices for Nano Banana & Nano Banana Pro
To get the best results from Nano Banana models, follow these prompting and usage tips:
-
Be hyper-specific: The more detail you provide about subjects, colors, lighting, and composition, the more control you’ll have over outputs. -
Add context and intent: Describe the image’s purpose or desired mood—context helps the model make better creative decisions. -
Iterate and refine: Don’t expect perfection on the first try. Use the model’s conversational capabilities to make small adjustments and improve images. -
Use step-by-step instructions: For complex scenes, break prompts into clear, sequential steps. -
Frame positively: Avoid negative prompts like “no cars.” Instead, describe what you want: “an empty, deserted street with no visible traffic.” -
Control the “camera”: Use photography and cinematography terms to guide composition—e.g., “wide-angle shot,” “macro photography,” or “low-angle perspective.” -
Leverage Search Grounding effectively: When using real-time or real-world data, be precise. For example: “Search for the latest Olympique Lyonnais match and create an infographic” works better than “Make an infographic of OL’s recent games.” -
Use the Batch API to cut costs and boost quota: The Batch API lets you send multiple requests at once. Processing takes up to 24 hours, but you’ll save 50% on costs and get higher usage limits.
Frequently Asked Questions (FAQ)
What’s the difference between Nano Banana Pro and the Flash (basic) version?
The key differences are: Pro has Thinking Mode (transparent reasoning), Search Grounding (real-time data), and 4K image generation. The Flash version lacks these features but offers a free tier—Pro requires billing.
How do I get an API key for Nano Banana Pro?
Sign in to Google AI Studio—a project and API key are created automatically. Retrieve your key from the API key management page.
When should I use 4K image generation?
4K is ideal for print, large-format displays, or high-detail use cases (e.g., posters, brochures). For social media or quick previews, 1K/2K is sufficient.
Does Search Grounding cost extra?
No—Search Grounding is included in the standard image generation cost. However, you must display sources when using this feature.
How many images can I mix at once?
Pro supports up to 14 images, but limit to 5 for high-fidelity results (especially for people/objects).
How much does the Batch API save, and what are the tradeoffs?
The Batch API cuts costs by 50% but has a processing time of up to 24 hours. It’s best for non-urgent, high-volume image generation.
Which languages are supported for multilingual generation?
Over a dozen languages are supported, including Spanish, Japanese, English, and more. Specify the target language directly in your prompt.
Is a longer prompt always better?
Not necessarily—precision matters more than length. Simple requests can be concise, but complex scenes benefit from detailed, step-by-step descriptions.
With this guide, you now have a complete overview of Nano Banana Pro’s features and usage. From basic image generation to advanced real-time data integration, the Pro model offers developers flexible, powerful tools for creative projects. Follow the steps and best practices above to unlock its full potential and meet any image generation need.

