Nano Banana can be prompt engineered for nuanced AI image generation
TL;DR Highlight
Markdown rule lists and buzzwords make Nano Banana follow complex image prompts closely.
Who Should Read
A developer building image generation or editing features on the Gemini image API who is struggling to make prompts stick.
Core Mechanics
- Nano Banana follows prompts very well
- It is Gemini 2.5 Flash Image, an autoregressive model that generates 1,290 tokens per image.
- The author credits its strong text encoder and says Google understates how well it works.
- API cost is about a quarter of gpt-image-1
- The gemini-2.5-flash-image endpoint costs roughly $0.04 per 1-megapixel image.
- gpt-image-1 costs $0.17 per image.
- Five edits in one prompt all landed
- The skull pancake prompt used 'Make ALL of the following edits' with a dashed list of five edits.
- The author says only the necessary parts changed, such as blueberries moving aside for the mint garnish.
- Buzzwords changed the composition
- Adding 'Pulitzer-prize-winning cover photo for The New York Times' gave rule-of-thirds framing, negative space and better color balance.
- Appending 'Do not include any text or watermarks.' removed the newspaper text and kept the composition.
- Long rule lists were followed
- The three-kitten prompt used hex colors, rule-of-thirds placement and eye-color constraints with MUST/NEVER.
- The author says every rule was followed, while ChatGPT's result on the same prompt was worse in composition and polish.
- Markdown and code training may explain it
- The author reasons that Gemini 2.5 Flash was trained on lots of Markdown and JSON, which its image encoder can use.
- CLIP only takes 77 tokens and T5 512 tokens.
Community Reactions
- Storyboard workflow experience
- One commenter generates dozens of images a day and keeps characters consistent with 7-layer prompts for environment, camera, subject, composition, light, colors and quality.
- They draw bounding boxes on flawed images and have Claude write the fix prompt.
- Pushback on 'only necessary aspects changed'
- Commenters said unchanged regions still get regenerated, with different texture, sharpness and scale.
- One said Nano Banana randomly adds a fireplace or garage even at temperature zero, making a reliable app hard.
- Left/right instructions came out reversed
- Commenters noted the strawberry and blackberry sit in the opposite eye sockets from the prompt.
- They suggest training captions mostly describe directions from the viewer's point of view.
- Style transfer and prompt helper tips
- One commenter found style transfer works better when you give at least two images, one to transform and one as a style reference.
- Another has Gemini 2.5 write the image prompt first and passes it to Nano Banana for higher-quality results.
How to Apply
- Rewrite edit requests as a dashed rule list
- Take your current image edit prompt, rewrite it as 'Make ALL of the following edits' with a dashed list, and run it in Google AI Studio.
- Compare the result side by side with the old one-sentence prompt.
- Add composition buzzwords and bans
- Append 'Pulitzer Prize winning cover photo' and 'NEVER include any text, watermarks' to the end of your prompt.
- A/B test with the same input to see how composition and text change.
- Wrap API calls with gemimg and measure cost
- Call gemini-2.5-flash-image through the gemimg package and log cost per image.
- Compare against the roughly $0.04 per image baseline and gpt-image-1's $0.17.
- Write left/right from the viewer's view
- In any prompt with left or right, state 'left in the image as seen by the viewer'.
- Add a check for flipped sides to your review step.
Try It
# Paste into Claude or ChatGPT to build a Nano Banana prompt (simplified version of the article's method)
Rewrite the image request below as a prompt for Nano Banana.
Rules:
- Start with 'Create an image of ...' and write requirements as a Markdown dashed list.
- Use MUST for things that must be followed and NEVER for things that are forbidden.
- Include composition rules (rule of thirds, camera angle, lighting).
- End with 'Do not include any text or watermarks.'
- State left/right from the viewer's point of view.
Request: {{description of the image you want}}Terminology
Related Papers
Why Do LLMs Help with Scientific Misconduct Requests and What to Do About It?: Increasing the Trustworthiness of AI for Science
Adding an intention-analysis system prompt raised refusal of misconduct requests from 58% to 87%.
How Specification Explicitness Shapes Failure in LLM-Generated Code
Spelling out invariants, edge cases and constraints cut hidden-test failures in LLM code by 47.2%.
Same Task, Different Statement: When and How Reformulation Helps LLM Problem Solving
Rewriting problem statements to fit their type raises LLM accuracy, but blind rewriting hurts.
Show HN: STE80 Humanizer – de-AI text by writing 80% of the way to ASD-STE100
A skill strips 26 AI tells and rewrites text in short ASD-STE100-style sentences
Character-Name Concentration in LLM Fiction: Measuring Displacement and Mitigating Repetition
Drafting name candidates and filtering by frequency cut LLM character-name repetition by 95%
LLM Voice
Martin Fowler: LLM-drafted prose keeps an uncanny tone even after human editing.
The Instruction Tax on Factual Recall: Base Models Can Beat Their Instruction-Tuned Counterparts
Few-shot completion with repeated sampling on a base model beat chat: F1 0.684 vs 0.568
AI is a tool and using it well takes skill
A rebuttal to Hickey: LLMs are tools, and skill in directing and checking them decides the outcome