Blog

How to Use Nano Banana: Gemini App, API and Code (2026)

Unicorn API Team · · 11 min read

Illustration of how to use Nano Banana to turn a text prompt and a photo into finished images, in an app and by API

Learning how to use Nano Banana comes down to two habits: write prompts the way you would brief a photographer, and change images in small, specific edits instead of starting over each time. “Nano Banana” is the nickname for Google’s Gemini image models, and there is now a small family of them with different strengths and costs. This article explains how the model works, walks through the Gemini app, helps you pick a version, covers prompting, and gives you complete code for calling it from your own software.

What is Nano Banana, and how does it work?

Nano Banana began as the codename for Gemini 2.5 Flash Image, the image model Google released on 26 August 2025. The name stuck, and Google adopted it for the whole line. Nano Banana Pro followed on 20 November 2025, focused on higher fidelity, accurate text and 4K output. The Nano Banana 2 generation arrived in 2026, including Nano Banana 2 Lite on 1 July and Nano Banana 2.1 on 7 October. The original model is still popular because it is quick and its results look natural.

Many earlier image generators are pure diffusion models: they start from random noise and remove it step by step until the picture matches the text. Google has not published Nano Banana’s full architecture. What matters is that it sits inside Gemini, which is multimodal, meaning it reads text and images together in the same conversation. In practice that gives you a few useful behaviors:

  • It follows conversational edits. Say “make the jacket navy and keep everything else the same” and it usually changes only the jacket.
  • It works from reference images. A reference image is a picture you supply as input: a product, a face, a style sample or a background. Nano Banana accepts up to 3, Nano Banana Pro up to 8 and Nano Banana 2 Lite up to 10.
  • It keeps subjects consistent. The same character or product can appear across several images without drifting into a different-looking version.
  • It renders text. Signs, labels and headlines come out readable far more often than with older models, and Pro is the strongest in the family at this.

Google also embeds SynthID, an invisible watermark, in images from its models so they can later be identified as AI-generated. You cannot see it, and it does not change how the image looks.

The practical takeaway for how to use Nano Banana well: talk to it like an editor who can see your images, not like a keyword search box.

How to use Nano Banana in the Gemini app

The quickest way to try it needs no code at all. Here is how to use Nano Banana in the Gemini app, on the web, Android or iPhone:

  1. Open Gemini and sign in with a Google account. The steps are the same in the browser and in the mobile apps, so if you were looking for how to use Nano Banana on iPhone, install the Gemini app and follow along.
  2. Ask for an image. Either pick the image creation tool from the tools menu, or type a request that starts with “Create an image of…”. Gemini sends it to the image model.
  3. Attach photos to edit them. Tap the plus button, upload one or more pictures, then describe the change: “remove the people in the background”, “turn this sketch into a watercolor”, “put this dog on a skateboard”.
  4. Refine in follow-up messages. Keep the conversation going: “warmer light”, “zoom out a little”, “make the headline bigger”. Each turn builds on the latest image.
  5. Download the result from the image’s menu.

Is it free, and how do you get Nano Banana Pro?

If you only want to know how to use Nano Banana for free, the Gemini app is the answer. Free accounts can generate and edit images each day within limits, and Google’s paid AI plans raise those limits. Nano Banana Pro is usually reached through the model or thinking options in the app’s model picker. Free accounts get a small Pro allowance, after which Gemini falls back to the standard model. Google adjusts these quotas often, so trust what your account shows over any number you read online.

Nano Banana also appears in other Google products, including Slides, and developers can test it in Google AI Studio. All of these work well for one-off images. They become awkward when you need hundreds of images, want edits to run automatically inside your own product, need exact aspect ratios every time, or cannot afford to hit a daily cap mid-project. For those cases you want an API.

Four steps for using Nano Banana in the Gemini app: prompt, attach photo, refine, download
In the Gemini app, the whole workflow is a conversation: prompt, attach, refine, download.

Which Nano Banana model should you use?

Part of knowing how to use Nano Banana is choosing the right version, because the models differ more than the names suggest. On Unicorn API each one is priced in credits per image. Monthly plans give you credits at $0.01 each, so a 6-credit image costs 6 cents. Top-up credits cost $0.015 each and never expire. The full breakdown is on the pricing page.

ModelPrice per imageReference imagesBest for
Nano Banana 2 Lite4 credits (1K)Up to 10Cheap drafts, fast iteration, many references at once
Nano Banana 2.14 credits at 1K, 6 at 2K, 9 at 4KVia the image_input fieldThe newest release; large images at a low price
Nano Banana6 creditsUp to 3Natural-looking images and quick photo edits
Nano Banana Pro18 credits at 1K or 2K, 33 at 4KUp to 8Text-heavy designs, final assets, 4K output

Nano Banana and Nano Banana Pro support 16:9, 1:1, 9:16, 21:9 and 4:3 aspect ratios. Nano Banana 2 Lite adds 3:2 and 2:3.

Quick decision rules

  • Exploring ideas: Nano Banana 2 Lite. At 4 credits an image, 25 variations cost 100 credits.
  • Need a big image cheaply: Nano Banana 2.1 produces 4K for 9 credits.
  • Editing real photos so they still look real: the original Nano Banana.
  • Posters, packaging, infographics or anything with words: Nano Banana Pro. It costs more, and it saves rerolls when the text has to be right.

Nano Banana is not always the best tool. If you need a transparent background, GPT Image 1.5 from OpenAI supports one and costs 3, 4 or 15 credits at low, medium or high quality. For straightforward image-to-image edits, Seedream 5.0 Flash Image to Image from ByteDance costs 4 credits per image. All of them share the same API key, so switching models means changing one string. You can compare everything in the full model catalog, and our Gemini AI image generator guide covers the wider Gemini image lineup.

How to write prompts Nano Banana follows

Most of how to use Nano Banana well comes down to the prompt. Google’s own guidance and plenty of hands-on testing agree on a few core rules.

Describe the scene, not a pile of keywords

Write full sentences that cover the subject, action, setting, composition, lighting and style. Compare:

Weak:   cat, cafe, cozy, 4k, cinematic

Strong: A ginger cat asleep on a velvet armchair in a small Paris cafe,
        late afternoon sun through the window, warm tones, shot at eye
        level with a 50mm lens, shallow depth of field.

The strong version leaves the model far less to guess, so the output is more predictable and needs fewer retries.

Say what you want, not what you don’t

Positive framing works better. “An empty street at dawn” beats “a street with no cars and no people”, because naming cars and people puts them in front of the model.

Use camera and design language

Terms like “wide shot”, “overhead flat lay”, “macro close-up”, “softbox lighting” or “isometric illustration” are precise instructions the model understands. Choose the aspect ratio up front as well: 9:16 for phone stories, 16:9 for headers and slides, 1:1 for feeds.

Put text in quotes

If you want words in the image, quote them exactly and describe the typography: a headline reading "Open Late" in bold condensed sans-serif. Keep it short. For long or business-critical text, use Nano Banana Pro.

Edit one thing at a time and say what stays

When editing, name the change and anchor everything else: “Change the sofa to dark green leather. Keep the room, lighting and camera angle exactly the same.” With several reference images, give each one a role: “Use the first image as the product and the second as the background.”

For a larger set of tested prompts, see our guide to writing a Nano Banana prompt.

How to use Nano Banana from code with an API

If you are building an app, a content pipeline or an internal tool, here is how to use Nano Banana in code. Unicorn API offers every model in the Nano Banana family, plus other image, video, audio and chat models, behind one API key and one bill. Image jobs are asynchronous, which means you submit a job and get an ID back right away, then check on it until the image is ready.

1. Get a key

Create a key on the API keys page and export it in your shell as UNICORN_API_KEY. To see what a prompt produces before writing any code, try it in the browser playground.

2. Submit a job with curl

curl -X POST https://api.unicornapi.net/v1/jobs \
  -H "Authorization: Bearer $UNICORN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"nano-banana","input":{"prompt":"A red fox resting in a snowy forest at dawn, soft light, highly detailed"}}'

The response includes a job id. Use it to check the status:

curl https://api.unicornapi.net/v1/jobs/JOB_ID \
  -H "Authorization: Bearer $UNICORN_API_KEY"

When status is "succeeded", the image link is in outputs[0].url.

3. A complete Python script

This script submits a job, polls until it finishes and prints the image URL. It works for any model in the family. Only the model ID and input fields change.

import os
import time
import requests

API = "https://api.unicornapi.net"
HEADERS = {"Authorization": f"Bearer {os.environ['UNICORN_API_KEY']}"}


def generate(model, input_fields):
    r = requests.post(
        f"{API}/v1/jobs",
        headers=HEADERS,
        json={"model": model, "input": input_fields},
        timeout=30,
    )
    r.raise_for_status()
    job = r.json()

    while True:
        r = requests.get(f"{API}/v1/jobs/{job['id']}", headers=HEADERS, timeout=30)
        r.raise_for_status()
        job = r.json()
        if job["status"] == "succeeded":
            return job["outputs"][0]["url"]
        if job["status"] == "failed":
            raise RuntimeError(f"Job failed: {job}")
        time.sleep(2)


url = generate("nano-banana", {
    "prompt": "A matte white ceramic mug on a walnut desk beside a laptop, "
              "morning window light from the left, shallow depth of field, "
              "clean product photography",
    "aspect_ratio": "4:3",
})
print(url)

4. Editing with reference images

This is also how to use Nano Banana to edit photos in code: pass your images as references and describe the change. Here Nano Banana Pro combines a product shot with a background and adds a headline:

url = generate("nano-banana-pro", {
    "prompt": "Use the first image as the product and the second as the background. "
              "Place the mug on the cafe table, match the warm evening light, and add "
              "the words \"Slow Mornings\" in a clean serif font above it.",
    "ref_images": [
        "https://example.com/mug.png",
        "https://example.com/cafe.jpg",
    ],
    "resolution": "2K",
    "aspect_ratio": "16:9",
})

That request costs 18 credits. Two details affect your bill. First, setting n to 4 returns four images and multiplies the price by four. Second, you can send the same body to POST /v1/models/price to get the exact price before you run anything expensive. Field details and accepted image formats are in the API documentation. If you work in Cursor or Claude Code, you can also call the models from your coding agent over MCP.

API pipeline for Nano Banana: submit a job, poll its status, then read the image URL
Image jobs run asynchronously: submit, poll until succeeded, then read outputs[0].url.

Worked example: a product mockup from rough idea to final

Here is how to use Nano Banana on a real project with a real budget. Say a small coffee brand needs launch images for a new mug: one hero banner with a headline, three social posts and one large print image. The trick is to match each stage to the cheapest model that can do the job.

  1. Explore directions with Nano Banana 2 Lite. Generate 12 concepts across different settings: kitchen counter, cafe table, desk, outdoor picnic. 12 × 4 credits = 48 credits.
  2. Refine the two best concepts with Nano Banana. Pass each chosen draft back in as a reference and make focused edits: warmer light, a different angle, a cleaner background. Six edits × 6 credits = 36 credits.
  3. Produce the finals with Nano Banana Pro. Three social posts at 2K with the brand’s real product photo as a reference: 3 × 18 = 54 credits. The hero banner with the headline “Slow Mornings” at 4K in 21:9: 33 credits.
StageModelImagesCredits
ExplorationNano Banana 2 Lite1248
RefinementNano Banana636
Social finalsNano Banana Pro (2K)354
Hero bannerNano Banana Pro (4K)133
Total22171

171 credits is $1.71 on a monthly plan, or about $2.57 with top-up credits. The Starter plan’s $25 buys 2,500 credits, which covers about 14 projects like this. Running every image through Pro would have cost more than twice as much, with no visible benefit at the drafting stage.

The same pattern works for most jobs: cheap and fast while you are still deciding, high quality only once you know what you want.

Common mistakes when using Nano Banana

Most problems people hit while learning how to use Nano Banana come from a handful of habits:

  • Rerolling instead of editing. If an image is 80% right, edit it. A fresh generation throws away everything that was already working.
  • Stacking many changes into one edit. “Change the color, move the lamp, add a plant and make it night” often gets some of it wrong. Make one or two changes per turn.
  • Not saying what should stay the same. Without an anchor like “keep the face and pose identical”, the model may quietly change details you liked.
  • Using negative prompts. “No text, no people” can backfire. Describe the clean scene you want instead.
  • Using the wrong tier for text. If a headline keeps coming out misspelled, switch to Nano Banana Pro rather than burning ten cheaper retries.
  • Feeding in low-quality references. Blurry or tiny reference images lead to blurry products. Use the sharpest source photos you have.
  • Forgetting that n multiplies cost. Asking for four Pro images at 4K costs 132 credits, not 33. Check with the price endpoint first.
  • Skipping the aspect ratio. Cropping a square image into a 9:16 story wastes the composition. Set the ratio in the request.

To sum up how to use Nano Banana: in the Gemini app for quick personal images, through an API when it has to be part of a product or a repeatable workflow, with descriptive prompts and small edits either way. Start with the cheapest model that fits the stage you are at, move up to Pro only for final assets, and check the price before large batches. Grab a key, run the Python script above, and you will have your first image in under a minute.

Frequently asked questions

How does Nano Banana work?

Nano Banana is Google's Gemini image model. It sits inside a multimodal model that reads text and images together. That lets it understand plain-language instructions, follow edits across a conversation and keep subjects consistent from one image to the next. You describe a scene or upload photos as references, and it generates a new image. Google adds an invisible SynthID watermark so the output can later be identified as AI-generated.

Is Google Nano Banana free to use?

Yes, within limits. Free Gemini app accounts can create and edit images every day, and Google's paid AI plans raise those limits and include more Nano Banana Pro use. Google changes the quotas regularly, so check what your own account shows. With an API you pay per image instead. On Unicorn API, Nano Banana costs 6 credits per image, which works out to 6 cents on a monthly plan.

How do I use Nano Banana Pro?

In the Gemini app, pick the higher-quality or thinking option in the model picker before you ask for an image. Free accounts get a small Pro allowance. On Unicorn API, submit a job with the model id nano-banana-pro and a prompt. You can also set a resolution of 1K, 2K or 4K and add up to 8 reference images. It costs 18 credits per image at 1K or 2K and 33 credits at 4K.

What is Nano Banana best used for?

It is strongest at photo edits that need to look natural, product mockups, keeping one character consistent across a series, social media visuals and designs with short text. Use Nano Banana 2 Lite for cheap drafts and the original Nano Banana for natural edits. Use Nano Banana Pro for posters, infographics and final assets where accurate text and 4K output matter.

How do I use Nano Banana to edit photos?

Upload the photo, then describe one change at a time and say what should stay the same, for example: change the wall to sage green, keep the furniture and lighting identical. In the Gemini app, attach the image with the plus button. Through the API, pass the photo's URL in ref_images along with your prompt, then feed each new output back in for further edits.

Can I use Nano Banana on iPhone?

Yes. Install the Gemini app from the App Store, sign in with a Google account, then ask for an image or attach a photo to edit. The steps are the same as on the web. If you are building your own iPhone app, call the model through an API from your backend so your API key never ships inside the app.