PromptZone - AI Prompts, Guides and Tools for Builders

Cover image for Nano Banana: How to Transform Photos with Precise Edit Prompts
Riya Ahmadi
Riya Ahmadi

Posted on Edited on

Nano Banana: How to Transform Photos with Precise Edit Prompts

To transform a photo with Nano Banana, submit the image with a text instruction describing the change and the details to preserve. Google's original Gemini 2.5 Flash Image supports this editing workflow through hosted services including Gemini API and AI Studio. Google's announcement, model documentation

What are the key facts about Nano Banana photo editing?

Fact Verified detail
Developer Google DeepMind. Announcement
Released August 26, 2025, initial public launch. Announcement
Type Image and text input, with image and text output. Model documentation
Size or parameters Not published in the official model documentation. Model documentation
License and access Google-hosted service with no open weights; API use is governed by service terms. Announcement, terms
Where it runs Google's infrastructure via Gemini API, AI Studio, or Vertex AI. Announcement

This walkthrough focuses on editing a supplied photograph with the original model. Keep gemini-2.5-flash-image in your experiment notes so the results remain distinguishable from later Nano Banana models. Model documentation

What photo transformations can Nano Banana perform?

Google documents natural-language edits such as changing a background or an object's appearance.

Its launch examples also show combining reference images, giving you a documented basis for testing a subject in a different scene. Announcement

The useful prompting pattern is to identify the subject, state the requested change, and name the details that should remain recognizable.

Google's image guide recommends specific instructions and iterative refinement. Image generation guide

For example: change the wall behind a chair to pale blue; preserve the chair's shape, upholstery, position, and shadows. This is an original practice prompt.

It gives you clear criteria for reviewing the result without assuming the model will satisfy every instruction.

For style transfer, assign each reference a role. Describe which image supplies the subject and which supplies the intended palette or visual treatment.

Then review whether the output applied the treatment without replacing the subject you intended to keep.

Keep a short written brief beside the reference. A useful brief names the intended output, the requested change, and the features that would make the result unacceptable. This turns image selection into a repeatable editorial decision.

What are the limits of Nano Banana photo editing?

Google recommends the original model work with up to three input images for best performance. It also warns that the number of generated images may differ from the number requested.

These are workflow constraints, not local memory specifications. Image guide

The model documentation does not provide a local checkpoint, parameter count, or GPU requirement.

The service has no open weights; uploading a photograph to an API is hosted processing. Model documentation, access announcement

All generated images include SynthID according to Google's image guide. The same guide recommends iteration, so treat a successful request as a candidate edit that still needs inspection. Image guide

For review, examine the edited region first, then compare surrounding details against the source. Pay particular attention to labels, object outlines, facial features, and repeated patterns when they matter to your project.

If several details change together, simplify the next instruction. Ask for the most important transformation on a fresh copy of the original reference.

This is a troubleshooting method you can evaluate, rather than a promise of exact pixel preservation.

How do you edit a reference photo with Nano Banana?

Prepare the reference and instruction

Choose a photograph with an unambiguous subject. Write a short description of the change before opening the interface, then decide which details you will compare afterward. Keep the untouched source file available throughout the experiment.

The official model page links to Google AI Studio for interactive access. For a scripted example, create an API key using Google's key guide and store it in GEMINI_API_KEY. Model documentation, key guide

Install Google's Python SDK and Pillow with python -m pip install google-genai pillow. The SDK documentation describes Python image inputs and image-response helpers. SDK README

Save your reference as room.jpg in the working directory. The following example submits that file with an edit instruction and saves each returned image part.

It uses the documented generate_content method. API reference, SDK README

import os

from google import genai
from google.genai import types
from PIL import Image

client = genai.Client(api_key=os.environ["GEMINI_API_KEY"], vertexai=False)
response = client.models.generate_content(
    model="gemini-2.5-flash-image",
    contents=["Change the wall to pale blue. Preserve the furniture and lighting.",
              Image.open("room.jpg")],
    config=types.GenerateContentConfig(response_modalities=["TEXT", "IMAGE"]),
)
images_saved = 0
for index, part in enumerate(response.parts or []):
    if part.inline_data:
        generated_image = part.as_image()
        if generated_image is not None:
            generated_image.save(f"room-edit-{index}.png")
            images_saved += 1
    elif part.text:
        print(part.text)
if images_saved == 0:
    raise RuntimeError("The response contained no image to save.")
Enter fullscreen mode Exit fullscreen mode

The example raises an error if no image is saved. In an application, handle API exceptions as well, then open each saved image and inspect the edit before accepting it.

Review and refine the photograph

Open the reference and output side by side. Check the wall color, furniture position, and light direction against the instruction. Make a note of any unexpected change before deciding whether to keep the result.

For a second attempt, change the wording around the failed detail. If the furniture changed, make preservation of the furniture the first instruction. Keep the desired wall color constant so the comparison remains useful.

When the task involves text in an image, draft and verify the wording before requesting the visual. Google specifically recommends generating the text first, then asking for the image containing it. Image guide

Save accepted results with their reference, instruction, and model identifier.

For reusable examples beyond this basic editing exercise, explore the sibling Awesome Nano Banana Pro prompt collection guide.

How does Nano Banana photo editing compare with Pro?

Model Relevant editing distinction
Nano Banana Original Gemini 2.5 Flash Image with image inputs and conversational editing. Model documentation
Nano Banana Pro Gemini 3 Pro Image adds documented thinking and search grounding for image work. Pro documentation

Evaluate both with the same reference and acceptance criteria. For more practice briefs, browse AI prompts on PromptZone.

What are common questions about editing photos with Nano Banana?

Which Nano Banana model does this photo-editing example use?

The example uses Google's original Gemini 2.5 Flash Image, also called Nano Banana. Its documented identifier is gemini-2.5-flash-image. Model documentation

Can Nano Banana edit an existing photo?

Nano Banana accepts an existing photo together with text instructions through Google's documented interface. The launch material explicitly describes targeted edits and combining images. API reference, announcement

Can it guarantee that everything else stays unchanged?

A Nano Banana editing instruction should be treated as a request that needs visual review. Google's guide recommends iterative refinement; compare the returned image with the original and decide whether it meets your preservation requirements. Image guide

Can I run this photo editor offline?

The Nano Banana photo-editing API calls Google's hosted service and requires connectivity. Google does not provide open Nano Banana weights through that release. Announcement

Sources

Top comments (0)