Nano Banana Pro Prompt Guide for Developers
Write a Nano Banana Pro prompt that works by API: scene briefs, edit instructions with reference pictures, text in images and reusable templates.
Updated 4 min read
A good Nano Banana Pro prompt reads like a brief you would hand a photographer or a designer: what is in the frame, where it is, how it is lit, through which lens, in what mood, and the exact words that must appear, in quotes. To edit, write the change and what must stay untouched, and say what each reference picture is for: Nano Banana Pro reads up to 6 of them per request.
This guide breaks a scene prompt into its parts, gives examples you can adapt, covers edit instructions and lettering, and ends with templates that assemble prompts in Python and Node. A prompt can run to 2,400 characters through the API, and every image costs $0.16 whatever its length, so the words you add are free; the takes you throw away are not.
The parts of a Nano Banana Pro prompt
Write the brief in this order, and drop any part the picture does not need:
| Part | What to write | Example |
|---|---|---|
| Subject | Who or what, with one or two defining details | a hand-thrown teapot with a crackled green glaze |
| Setting | Where it is and what surrounds it | on a slate tray in a quiet tea room |
| Light | Source, direction, softness, hour | low morning sun from the left, long soft shadows |
| Camera | Shot size, lens, depth of field | close-up, 85mm, shallow depth of field |
| Style and mood | Medium, palette, feeling | editorial photograph, muted greens and grays, calm |
| Words | The exact text in quotes, and where it sits | a small paper tag reading "Spring harvest" |
Assembled, it becomes one or two plain sentences:
A hand-thrown teapot with a crackled green glaze on a slate tray in a quiet tea room, low morning sun from the left casting long soft shadows, a small paper tag on the handle reading "Spring harvest", close-up, 85mm, shallow depth of field, editorial photograph in muted greens and graysA few habits make the difference between a usable first take and a fourth attempt:
- Concrete nouns over praise. "Linen", "brushed brass" and "rain on glass" give the model something to render; "beautiful" and "high quality" give it nothing.
- Decide the shot. Close-up, medium or wide, and from which height. A prompt that leaves the framing open gets a framing you did not choose.
- Say plainly what must stay out. If the background must be empty or the frame must carry no other text, write that in the prompt itself.
- Vary one clause per run. Keep the rest of the prompt fixed so you can tell which change moved the picture.
- Ask for several takes at once.
ngoes up to 4, each image charged on its own, so one request shows how much a prompt varies.
Scene prompts you can adapt
Three briefs for common jobs, each written with the parts above. Swap the nouns and keep the structure.
A matte black water bottle standing on wet river stones, a mossy bank blurred behind it, overcast daylight with a soft sheen on the bottle, low angle, 50mm, crisp detail on the brushed metal cap, clean outdoor catalog lookPortrait of a bearded man in his forties wearing a navy wool coat, standing at a tram stop on a rainy evening, neon shop signs reflected in the wet street, medium close-up, 50mm, shallow depth of field, cinematic teal and amber gradeA sunlit reading corner with a green velvet armchair, a brass floor lamp and a stack of worn hardcover books, late afternoon light through sheer curtains, wide-angle interior photograph, warm and unhurriedIf you want to settle the framing on a lower-priced model first, Nano Banana Pro vs Nano Banana 2.1 shows a draft-then-finish pipeline on one key.
Edit instructions with reference pictures
Pictures go in reference_images, up to 6 per request: an https URL, an upload (upl_…) or one of your own outputs (file_…). The prompt then becomes an instruction rather than a scene:
- Name each picture by its place in the list: "the first picture", "the second picture".
- Give each one a role: the product to keep, the room to use, the style to borrow.
- Write the change in one sentence, not the whole scene again.
- Close with what stays: "Keep the label, the bottle's shape and the lighting unchanged."
- One change per request when it must be exact. Then send the result's
file_…id back with the next change.
{
"model": "nano-banana-pro",
"prompt": "Place this armchair in a bright Scandinavian living room with white walls and a tall window. Keep the chair's fabric, color and shape exactly as they are.",
"reference_images": ["upl_7Rk2PqV9wXm4Tn8Lc1BdZe"],
"aspect_ratio": "4:3"
}{
"model": "nano-banana-pro",
"prompt": "Put the canvas backpack from the first picture on the wooden bench from the second picture, early morning in a park, 35mm. Keep the backpack's color, straps and logo patch unchanged.",
"reference_images": ["https://example.com/backpack.jpg", "https://example.com/bench.jpg"],
"n": 2
}A photo of a person is a reference like any other, with one rule: use it only with that person's consent, as the acceptable use policy requires. Post any of these bodies to POST /v1/generations/quote to see its price before it runs; sending pictures does not change what an image costs on this model.
Text in images
Lettering is part of the brief, not an afterthought:
- Put the exact words in quotes and keep them few: a title, a short line, a name.
- Place them. "Across the top", "on the bottle's label", "painted on the window glass".
- Describe the letters: a heavy serif, thin capitals, hand-lettered chalk, red neon tubes, embossed metal.
- Spell out unusual words exactly as they should read, and avoid long sentences inside the frame.
- Read every take before it ships. Ask for
n: 4and keep the one whose lettering is right.
A vintage enamel sign reading "OPEN LATE" in red block letters, screwed to a brick wall beside a diner door, warm streetlight at night, slight rust around the screws, 35mmPrompt templates in code
When prompts come from a form or a product catalog, assemble them from fields so every request keeps the same order. This Python script builds a scene prompt and an edit instruction, sends the scene and saves what comes back:
import os
import time
import requests
API = "https://frameport.ai/v1"
headers = {"Authorization": f"Bearer {os.environ['FRAMEPORT_API_KEY']}"}
def scene(subject, setting, light, camera, style, words=None):
"""A scene prompt in a fixed order: subject, setting, light, words, camera, style."""
parts = [subject, setting, light]
if words:
parts.append(f'with the words "{words}" clearly printed')
parts += [camera, style]
return ", ".join(part for part in parts if part)
def edit(change, keep):
"""An edit instruction: the change first, then what must not move."""
return f"{change}. Keep {', '.join(keep)} exactly as they are."
prompt = scene(
subject="A hand-thrown coffee mug with a speckled cream glaze",
setting="on a walnut desk beside an open notebook",
light="soft window light from the left",
camera="close-up, 85mm, shallow depth of field",
style="calm editorial photograph",
words="Good morning",
)
print(edit("Change the desk to white marble", ["the mug", "its glaze", "the light"]))
gen = requests.post(f"{API}/images/generations", headers=headers, json={
"model": "nano-banana-pro", "prompt": prompt, "n": 2, "aspect_ratio": "4:3",
}).json()
if gen.get("error"):
raise SystemExit(gen["error"]["message"])
while gen["status"] in ("queued", "running"):
time.sleep(3)
gen = requests.get(f"{API}/images/generations/{gen['id']}", headers=headers).json()
for index, output in enumerate(gen["outputs"]):
if output["status"] == "succeeded":
open(f"mug-{index}.png", "wb").write(requests.get(output["url"]).content)
print("charged", gen["cost_usd"])The same templates in Node, as functions that return template literals:
const scene = ({ subject, setting, light, camera, style, words }) =>
[subject, setting, light, words && `with the words "${words}" clearly printed`, camera, style]
.filter(Boolean)
.join(', ')
const edit = (change, keep) => `${change}. Keep ${keep.join(', ')} exactly as they are.`
console.log(scene({
subject: 'A red bicycle leaning on a yellow wall',
light: 'hard noon sun with crisp shadows',
camera: 'wide shot, 35mm',
style: 'bold graphic photograph',
}))
// An edit of one of your outputs, built from the template
const gen = await fetch('https://frameport.ai/v1/images/generations', {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.FRAMEPORT_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
model: 'nano-banana-pro',
prompt: edit('Change the background to a sunny beach', ['the bottle', 'its label']),
reference_images: ['file_8Hc2RkQw5ZpT1mVb7nXe3L'],
}),
}).then(res => res.json())
if (gen.error) throw new Error(gen.error.message)
console.log(gen.id, 'holding', gen.reserved_usd)The images reference lists every field these requests use, and the Nano Banana Pro API guide covers polling, batches and billing in full.
FAQ
What makes a good Nano Banana Pro prompt?
Specifics in a steady order: the subject with a detail or two, the setting, the light, the camera, the style, and any words in quotes. Concrete materials and a decided framing do more than adjectives such as "stunning" or "detailed".
How long can a Nano Banana Pro prompt be?
Up to 2,400 characters through the API. Most strong prompts need far less: one or two sentences of specifics, plus a keep-list when you edit a picture.
How many reference pictures can I send with a prompt?
Up to 6 per request, in reference_images, as URLs, uploads or your own outputs. Refer to them in the prompt by their order and say what each one brings.
How do I get readable text in a Nano Banana Pro image?
Quote the exact words, keep them short, say where they go and what the letters look like, then generate a few takes and keep the clean one. The Nano Banana Pro vs GPT Image 2.5 comparison covers the other text-friendly models on the same key.
Do Nano Banana Pro prompts work on Nano Banana 2.1?
A scene prompt can be sent to both by changing model; how each renders it is for you to compare. Edit instructions are for Pro only, since Nano Banana 2.1 reads no pictures.
Can I test prompts without writing code?
Yes: open Nano Banana Pro in the Studio, or try it online, and pay from the same balance at the same price per image.