PromptZone - AI Prompts, Guides and Tools for Builders

Cover image for Nano Banana Pro: How to Migrate Preview API Code to Stable
Lucia Arellano
Lucia Arellano

Posted on Edited on

Nano Banana Pro: How to Migrate Preview API Code to Stable

To migrate Nano Banana Pro preview code, replace gemini-3-pro-image-preview with the stable gemini-3-pro-image identifier and check the request options against Google's API reference. Nano Banana Pro is Google DeepMind's hosted image-generation and editing model; Google released the stable API version on May 28, 2026 and scheduled the preview's shutdown for June 25, 2026. Release notes, model documentation, API reference

What are the key facts about the stable Nano Banana Pro API?

Fact Verified detail
Developer Google DeepMind. Announcement
Released November 20, 2025, public announcement; stable Gemini API version released May 28, 2026. Announcement, release notes
Type Image generation and editing with text and image inputs and outputs. Model documentation
Size or parameters Not published in the official model documentation. Model documentation
License and access Hosted Google service with no open weights; API access follows Google's terms. Announcement, terms
Where it runs Google-hosted inference, accessed through its consumer and developer services. Announcement

Nano Banana Pro uses gemini-3-pro-image; Nano Banana 2 uses gemini-3.1-flash-image. Choose the identifier for the model your application intends to call. Pro documentation, Nano Banana 2 documentation

Which Nano Banana Pro capabilities should you check after migration?

Google's Pro announcement emphasizes text rendering, image composition, and creative controls.

Its current model page identifies graphic design and product mockups as intended applications. Announcement, model documentation

Those capabilities suggest a concrete evaluation task: turn an approved written brief into a draft visual, then inspect whether the required wording and layout survived generation.

Keep the brief short enough to judge each requested element.

For example, ask for a workshop poster with a supplied title, venue, and schedule. Verify the written content before generating the image. Then evaluate the visual hierarchy, legibility, and placement against your brief.

The model page lists thinking and Google Search grounding as supported. These are documented capabilities of Gemini 3 Pro Image, but they do not make every generated statement or diagram automatically correct. Model documentation

If the project uses factual material, supply the facts you have already checked and review the finished visual against them.

Treat generation as a design stage with an acceptance review, especially when the output contains numbers or labels.

What changes when you migrate from the Pro preview?

Google's image guide explains that the number of image outputs may differ from the requested count. It also specifies SynthID on generated images and recommends iterative refinement. Image generation guide

Prompting a polished design does not establish that its spelling, relationships, or measurements are correct. Review those features individually.

If exact typography matters, decide in advance whether the generated image is a draft or the final publication asset.

The model's official documentation does not publish a parameter count or a local weight package.

Nano Banana Pro has no open weights through the release described here, and its API access is hosted. Model documentation, announcement

Preview identifiers are a separate operational concern. Google's release notes say gemini-3-pro-image-preview was deprecated when the stable model launched and scheduled for shutdown on June 25, 2026.

Current examples should use the stable identifier. Release notes

Check the model name, endpoint, and settings together when migrating sample code. Record the identifier sent by the application with each test result.

How do you migrate Nano Banana Pro preview code to stable?

Resolve the model before adapting an example

Start from the official model page and record gemini-3-pro-image.

If the task actually targets Nano Banana 2, follow its separate page and use gemini-3.1-flash-image instead. Pro documentation, Nano Banana 2 documentation

For old Pro samples, replace the retired preview model identifier and review each option against the current API documentation. Google's release notes provide the dated migration context. Release notes, API reference

Make the first check a plain text-to-image request. Adding several references and specialized settings immediately makes it harder to tell whether a failure concerns access, an obsolete option, or the creative instruction.

Send a stable-model request

Create a Gemini API key in Google AI Studio and make it available as GEMINI_API_KEY. Use the model page's AI Studio link if you prefer to inspect the model interactively first. API key guide, model documentation

The following request uses the documented generateContent method and the stable Pro identifier.

Its example prompt is original; it is intended as a small integration test, not a demonstration of measured output quality. API reference, model documentation

curl --fail-with-body \
  "https://generativelanguage.googleapis.com/v1beta/models/gemini-3-pro-image:generateContent" \
  -H "x-goog-api-key: $GEMINI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"contents":[{"parts":[{"text":"Design a cream and blue workshop poster with the exact title: CERAMICS CLUB."}]}],"generationConfig":{"responseModalities":["TEXT","IMAGE"]}}' \
  -o response.json
Enter fullscreen mode Exit fullscreen mode

Inspect the returned candidates and content parts. The response is JSON; decode returned image data according to its MIME type before opening it as an image.

Handle an API error or a response without an image explicitly. API reference

Now compare the result against the prompt. Check the exact title first, followed by the palette and poster layout. Keep a written note of any failure, then revise the instruction around that detail.

For a reference-based task, preserve the same review process. Define which image supplies the subject, what should change, and what must remain recognizable.

Google's guide recommends specific prompts and iterative adjustment. Image generation guide

When the request works, save the model identifier, prompt, and accepted result together.

For running the Pro model inside a visual graph, use the sibling Nano Banana Pro ComfyUI guide.

How do Nano Banana Pro and Nano Banana 2 identifiers differ?

Official name Current identifier Selection context
Nano Banana Pro gemini-3-pro-image Complex design and image-editing tasks. Documentation
Nano Banana 2 gemini-3.1-flash-image Speed-oriented image creation and editing. Documentation

For the Flash model and a workload evaluation method, see the Nano Banana 2 workflow guide.

What are common Nano Banana Pro migration questions?

Is Nano Banana Pro officially called Gemini 3 Pro Image?

Google identifies Nano Banana Pro as Gemini 3 Pro Image, with gemini-3-pro-image as the stable developer identifier. Announcement, model documentation

Is Nano Banana 2 another name for Pro?

Nano Banana 2 is Gemini 3.1 Flash Image, with the identifier gemini-3.1-flash-image. Nano Banana Pro uses gemini-3-pro-image. Nano Banana 2 documentation, Pro documentation

Should I use the Pro preview API identifier?

For Nano Banana Pro, use the stable gemini-3-pro-image identifier. Google's release notes document the preview's deprecation and June 25, 2026 shutdown date. Model documentation, release notes

Can I download Nano Banana Pro from Hugging Face?

Google's Nano Banana Pro release provides hosted access and no open weights. Access the model through Google's consumer or developer services, including AI Studio. Announcement, model documentation

Sources

Top comments (0)