Blog

Writing a Nano Banana Prompt: Examples and Code (2026)

Unicorn API Team · · 11 min read

Diagram of a nano banana prompt broken into subject, setting, light and style, feeding a Nano Banana model that outputs a photo

A nano banana prompt is plain text you send to one of Google’s Gemini image models, and the wording decides whether you get a usable image on the first attempt or the fifth. The models are forgiving about grammar and unforgiving about ambiguity. Leave the lighting out and you get whatever lighting the training data considers average. Ask for “a professional product shot” and you get an average of every product shot ever posted. This guide covers the structure that holds up across subjects, five prompts you can copy and adapt, which of the four Nano Banana models to send each one to, what they cost in credits, and the mistakes that waste most of people’s attempts.

What is a nano banana prompt?

“Nano Banana” began as a codename. Google’s Gemini Flash Image model was tested anonymously on the public model-comparison site Arena.ai under the codename “Nano Banana”, people noticed how good it was at editing photos before anyone knew who made it, and the nickname outlived the secret. It became popular enough that people used Nano Banana directly in social posts to turn prompts into photos, and Google now ships the name on the product: Nano Banana, Nano Banana Pro, Nano Banana 2 Lite and Nano Banana 2.1.

So a nano banana prompt is just the natural-language input to a text-to-image model: a machine learning model that takes a written description and produces an image matching it. There are two jobs a prompt can do, and they are worth separating in your head before you write a word:

  • Generation. There is no input image. Your prompt has to supply everything: subject, place, light, framing, style.
  • Editing. You pass one or more reference images and the prompt describes only the change. This is what Nano Banana became famous for, and it is the mode most people under-use.

The same text behaves differently across model families. Gemini’s image models, ByteDance’s Seedream and Black Forest Labs’ Flux are all routinely compared against each other and all respond to the same prompt in their own way, so treat a prompt as something you tune per model rather than a universal recipe.

The parts of a nano banana prompt that matter

A nano banana prompt is not a keyword list. These models read sentences, so write sentences. What you are really doing is filling slots, and any slot you leave empty gets filled by the model’s own default. Here are the slots, roughly in the order worth writing them:

  1. Subject. One subject, described concretely. “A 40-year-old man with a short grey beard”, not “a person”.
  2. Action or pose. What is happening. Static subjects read as stock photos; a verb fixes that.
  3. Setting. Where it is, and how much of it you can see. “A narrow kitchen with open shelving behind him, out of focus.”
  4. Light. The single highest-value sentence in most prompts. Direction, quality, colour: “low side light from a window on the left, soft shadows, slightly cool.”
  5. Camera or medium. Lens and distance for photography (“85mm, waist-up, shallow depth of field”), or medium for everything else (“gouache on textured paper”, “flat vector illustration”).
  6. Text, if any. The exact string in quotation marks, plus where it sits.
  7. Constraints. Things that must be true: “background is seamless white”, “the mug is centred and fully inside the frame”.

Two things do not belong in the prompt. Resolution and aspect ratio are API fields, not adjectives, so set resolution and aspect_ratio instead of writing “4K, 16:9” into the text. And negatives are mostly wasted: “no hands in frame” often produces hands. Say what should be there instead: “the mug sits alone on the surface.”

Describe the photograph you wish you had taken, not the adjectives you would use to praise it. “Award-winning, hyper-detailed, masterpiece” tells the model nothing about what to draw.

Compare a weak prompt with a structured one. Weak: professional headshot of a woman, high quality, 8k, beautiful lighting. Structured: A woman in her early thirties in a charcoal blazer, three-quarter turn to camera, relaxed closed-mouth smile, against a plain mid-grey backdrop. Soft large key light from the upper left, gentle fill on the right, no harsh shadows. 85mm portrait lens, head and shoulders, shallow depth of field. The second one is 50 words and leaves almost nothing to chance. A nano banana prompt rarely needs more than 80; past that you are adding instructions that compete with each other.

Anatomy diagram labelling the six parts of an image prompt
Every slot you leave empty is a slot the model fills with its own default.

Which Nano Banana model should your prompt go to?

There are four Gemini image models in the family, and they differ in price by a factor of eight. Sending every prompt to the most expensive one is the most common way to burn through a budget. On a monthly plan credits cost $0.01 each, so the credit numbers below double as cents.

ModelReleasedCredits per imageReference imagesUse it for
Nano Banana 2 LiteJul 20264Up to 10Drafts, bulk jobs, fast 1K images and edits
Nano Banana 2.1Oct 20264 at 1K, 6 at 2K, 9 at 4KTakes image_inputThe sensible default when you need 2K or 4K
Nano BananaAug 20256Up to 3Quick, natural-looking images and edits
Nano Banana ProNov 202518 at 1K or 2K, 33 at 4KUp to 8High fidelity and accurate text rendering

The practical workflow: draft on Nano Banana 2 Lite at 4 credits until the prompt is right, then re-run the final wording on Nano Banana Pro if the image needs legible text or maximum fidelity. Twenty iterations on Lite plus one Pro render at 2K costs 98 credits. Twenty-one Pro renders at 4K costs 693. Same final image.

Two non-Gemini models are worth knowing when your nano banana prompt is not landing. GPT Image 1.5 from OpenAI is strong on prompt adherence and legible text, costs 3 credits at low quality, 4 at medium and 15 at high, and is the only one of these that offers a transparent background, which matters for logos and sprites. Seedream 5.0 Flash Image to Image from ByteDance is edit-only and lands at 4 credits per image. The full catalogue is at /models and plan details at /pricing. If you are weighing paid API access against the consumer apps, the free-tier limits are covered separately.

Nano banana prompt examples you can copy

These are structures, not magic strings. Replace the nouns and keep the skeleton. Each one names the model it suits best.

Product photo on seamless white

A matte black ceramic coffee mug on a seamless white background,
three-quarter view, slightly above eye level. Large soft overhead
light with a subtle gradient falloff behind the mug, one soft
contact shadow under the base. Clean commercial product
photography, 100mm macro lens, mug centred and fully in frame.

Send this to Nano Banana 2.1 at 2K. The “one soft contact shadow” line is what stops the product looking pasted onto the background, and naming the view angle stops the model rotating the object between attempts.

A poster with readable text

A minimalist event poster, portrait orientation. Large bold
sans-serif headline reading "NIGHT MARKET" across the upper
third in cream on a deep navy field. Below it, smaller text
reading "Fridays, 6pm". A single line illustration of a paper
lantern in the lower half. Flat print design, generous margins,
no other text anywhere.

This is the case for Nano Banana Pro, which is built for accurate text rendering. Put every string you want in quotation marks, keep them short, and state “no other text anywhere”, because invented extra text is the usual failure. Proofread the output; no model is reliable enough to ship text unread.

An ID-style headshot

Head-and-shoulders photo of the person in the reference image,
facing the camera directly, neutral expression, mouth closed,
eyes open and looking at the lens. Plain light grey background,
even frontal lighting with no shadows on the face or background.
Natural skin texture, no retouching, no jewellery, no hat.

Pass the person’s photo as a reference image and run it on Nano Banana or Nano Banana 2 Lite. Worth saying plainly: most governments do not accept AI-generated or AI-edited photos for passports and ID documents. Use this for staff directories, badges and profile pictures, and see how headshot generators work for the longer version.

A style transfer edit

Redraw the reference photograph as a loose watercolour: visible
paper texture, soft bleeding edges, a limited palette of ochre,
slate blue and off-white. Keep the composition, the pose and the
proportions of the building exactly as they are. Do not add or
remove any objects.

Note the shape of this nano banana prompt: one sentence on the new style, one sentence on what must not change. Edits go wrong when you only specify the first.

A cinematic scene

A woman in a yellow raincoat standing alone at a bus stop at
night, seen from across the street through light rain. Wet
asphalt reflecting a red neon sign out of frame to the right.
Single practical light inside the shelter, deep shadows
elsewhere, cool blue ambient. Anamorphic 40mm, wide shot,
slight film grain.

“Light out of frame” is a useful trick: it gives you coloured light on the scene without a glowing sign dominating the composition.

How to run a nano banana prompt through an API

Media models on Unicorn API are asynchronous. You create a job, poll it, then read the output URL. Get a key at /keys and keep it in an environment variable. Here is a complete generation call:

curl -s https://api.unicornapi.net/v1/jobs \
  -H "Authorization: Bearer $UNICORN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "nano-banana-pro",
    "input": {
      "prompt": "A matte black ceramic coffee mug on a seamless white background, three-quarter view, slightly above eye level. Large soft overhead light, one soft contact shadow under the base. Clean commercial product photography, 100mm macro lens.",
      "resolution": "2K",
      "aspect_ratio": "4:3",
      "output_format": "png"
    }
  }'

That returns a job with an id and a status. Poll it:

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

When status is "succeeded", the image is at outputs[0].url. In Python, with a price check before the job so you always know the cost in advance:

import os, time, requests

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

PROMPT = (
    "A woman in a yellow raincoat standing alone at a bus stop at night, "
    "seen from across the street through light rain. Wet asphalt reflecting "
    "a red neon sign out of frame to the right. Single practical light inside "
    "the shelter, deep shadows elsewhere, cool blue ambient. "
    "Anamorphic 40mm, wide shot, slight film grain."
)

def generate(model, payload):
    price = requests.post(f"{BASE}/v1/models/price", headers=HEADERS,
                          json={"model": model, "input": payload})
    print("cost:", price.json())

    job = requests.post(f"{BASE}/v1/jobs", headers=HEADERS,
                        json={"model": model, "input": payload}).json()

    while job["status"] not in ("succeeded", "failed"):
        time.sleep(2)
        job = requests.get(f"{BASE}/v1/jobs/{job['id']}", headers=HEADERS).json()

    if job["status"] == "failed":
        raise RuntimeError(job)
    return job["outputs"][0]["url"]

# draft cheap, then finish on Pro with the same wording
draft = generate("nano-banana-2-lite", {"prompt": PROMPT, "aspect_ratio": "21:9"})
final = generate("nano-banana-pro", {"prompt": PROMPT, "resolution": "4K",
                                     "aspect_ratio": "21:9"})
print(draft, final)

Swapping models means changing one string, because the request shape is the same for every image model behind one key and one bill. Note the field differences: Nano Banana Pro, Nano Banana and Nano Banana 2 Lite all accept n to produce several outputs from one call, and the price is multiplied by n, so n: 4 on Pro at 4K is 132 credits. Nano Banana 2.1 takes one output per job. Full field reference is in the docs, you can test wording in the browser at /studio/image before writing any code, and the MCP integration lets Claude Code or Cursor run these calls for you.

Four-step pipeline showing a prompt sent to the jobs endpoint, polled, then returning an image URL
Media models are asynchronous: create a job, poll it, read the output URL.

Editing with reference images instead of generating

If the subject already exists, a prompt that describes it from scratch is the wrong tool. Pass the image and describe only the delta. This is how you keep a face, a product or a layout consistent across a set, which no amount of prompt detail achieves on its own.

The field name varies: ref_images on the Gemini models and GPT Image 1.5, image_input on Nano Banana 2.1, image_urls on Seedream. Limits are 3 reference images for Nano Banana, 8 for Nano Banana Pro, 10 for Nano Banana 2 Lite and 4 for GPT Image 1.5. An edit call:

curl -s https://api.unicornapi.net/v1/jobs \
  -H "Authorization: Bearer $UNICORN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "nano-banana",
    "input": {
      "prompt": "Replace the cluttered desk background with a plain warm grey wall. Keep the person, their pose, their clothing and the lighting on their face exactly as they are.",
      "ref_images": ["https://example.com/portrait.jpg"],
      "aspect_ratio": "1:1"
    }
  }'

Three habits make edits work. Say what stays, not just what changes. Make one change per call and chain the calls, feeding each output back in as the next reference. And when you want a specific look transferred, supply it as a second reference image rather than trying to describe it, because “in the style of the second image” is far more precise than any paragraph. More on tool choice for edit work in the image editor comparison.

Mistakes that spoil a nano banana prompt

  • Adjective soup. “Ultra detailed, cinematic, masterpiece, 8k, trending” adds no information. Replace each one with a fact about the scene.
  • Two subjects, no relationship. If you ask for a cat and a dog, say where each one is and what it is doing. Otherwise the model blends or drops one.
  • Negatives. Every “no X” puts X in the prompt. Describe the positive state of the frame instead.
  • Resolution in words. Writing “4K” in the text does nothing. Set resolution, and only pay the 33 credits for Pro at 4K when something will actually be printed or cropped into.
  • Regenerating when you should be editing. If 90% of the image is right, pass it back as a reference image and fix the 10%.
  • Iterating on the expensive model. Draft at 4 credits, finish at 18. Nothing about the wording you learn on Lite is wasted on Pro.
  • Forgetting n multiplies the bill. It is a convenience for variations, not a free lunch.
  • Trusting rendered text. Even on the model built for it, read every character before publishing.
  • Treating one model’s wording as universal. A nano banana prompt tuned for Gemini will need adjusting for GPT Image 1.5 or Seedream, usually by making the instructions more literal.
  • Polling too aggressively. Two seconds between checks is plenty; tight loops just burn rate limit.

The short version: a nano banana prompt is a specification, not an incantation. Fill the slots, set resolution and aspect ratio as fields, draft on the cheap model, and switch to Nano Banana Pro only when fidelity or text demands it. If you want to compare the output against other families before committing, the same request shape covers those too, and pricing any request before you run it means no attempt is ever a surprise. Start at /studio/image, then move the wording that works into code.

Frequently asked questions

What makes a good nano banana prompt?

Name one subject, say what it is doing, place it somewhere, describe the light, then state the medium or camera look and any text that must appear. Keep it under about 80 words and write in positive statements rather than listing what you do not want. Specify resolution and aspect ratio as API fields instead of asking for them in words.

What is the difference between Nano Banana and Nano Banana Pro?

Nano Banana, released in August 2025, makes quick natural-looking images and edits with up to 3 reference images and costs 6 credits per image. Nano Banana Pro, released in November 2025, targets high-fidelity output with accurate text rendering at 1K, 2K or 4K and accepts up to 8 reference images. Pro costs 18 credits at 1K or 2K and 33 at 4K.

Which Nano Banana model is cheapest?

Nano Banana 2 Lite at 4 credits per image, which is 4 cents on a monthly plan where credits cost $0.01 each. It produces fast 1K images and edits and accepts up to 10 reference images. Nano Banana 2.1 matches that price at 1K resolution and scales to 6 credits at 2K and 9 at 4K, so it is the better default when you need larger output.

Can a nano banana prompt render readable text in an image?

Yes. Nano Banana Pro is built for high-fidelity images with accurate text rendering, so it is the model to use for posters, packaging and UI mockups. Put the exact string in quotation marks in your prompt, keep it short, and describe where it sits and what it is printed on. Always proofread the result before shipping it.

How much does one image cost through the API?

On a monthly plan credits cost $0.01 each, so Nano Banana 2 Lite at 4 credits is 4 cents, Nano Banana at 6 credits is 6 cents, and Nano Banana Pro is 18 cents at 1K or 2K and 33 cents at 4K. Top-up credits cost $0.015 and never expire. You can price any exact request before running it with POST /v1/models/price.

Should I generate a new image or edit an existing one?

Edit when the subject already exists. Passing the photo as a reference image and describing only the change keeps faces, products and layouts consistent in a way that no amount of prompt detail can. Nano Banana accepts up to 3 reference images, Nano Banana Pro up to 8, and Nano Banana 2 Lite up to 10.

Sources

  1. Arena.ai — Wikipedia
  2. Gemini (language model) — Wikipedia
  3. Text-to-image model — Wikipedia
  4. Flux (text-to-image model) — Wikipedia