nano-banana

agent
Guvenlik Denetimi
Uyari
Health Uyari
  • License — License: MIT
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Low visibility — Only 5 GitHub stars
Code Uyari
  • network request — Outbound network request in .github/scripts/make_badges.py
Permissions Gecti
  • Permissions — No dangerous permissions requested

Bu listing icin henuz AI raporu yok.

SUMMARY

Agent skill for generating and editing images with Google's Nano Banana (Gemini) models, with cost estimates and a prompting guide. Unofficial.

README.md

nano-banana logo: a glossy yellow banana character waving on a dark graphite square

nano-banana

Images from your coding agent, with the bill under control.

Tests Validate Release License: MIT Stars

Claude Code plugin Agent Skills format Python 3.11 or newer Gemini API

Install · Quick start · Gallery · How it works · Models and prices · FAQ

English · 简体中文 · Español · 日本語 · Português (Brasil) · Deutsch · Français · 한국어 · Čeština

A glossy 3D banana character paints a sunny landscape on a small easel, next to a long paper receipt and a few gold coins. The title reads nano-banana.

nano-banana is an agent skill that lets Claude Code and other coding agents make and edit images with Google's Nano Banana models. It also keeps track of what that costs.

Ask an agent for a hero image and you get one. Ask it to "try a few more variations" and a plain API call can run a dozen 4K generations while you are still looking at the first. Every image is billed, and nothing in the chat tells you how much.

This skill prints the estimated price before each call and the real cost after it. It checks your options against what the chosen model supports, so a wrong size or an unsupported thinking level fails on your machine and not at the API. For everything else it gives the agent a short routine: ask what the image is for, get reference photos when the subject has to look like something real, write the prompt in English, and look at the result before calling it done.

Unofficial. Not affiliated with or endorsed by Google. "Nano Banana" and "Gemini" are Google's names for its image models and API.

See it work

Terminal output of one generation: the model, an estimated cost of 0.0504 USD, the interaction ID, the usage of 1680 image tokens for 0.0504 USD, and the saved file path.

That is a real run. A 2K image on the default model costs about five US cents, and you see the number before the call and again after it.

Gallery

Apart from the text and the terminal screenshot, every image in this README was made with the skill. Every person, place and object in them is AI-generated. The prompts are in assets/prompts.

A phone photo of a single banana stuck to a white gallery wall with silver duct tape, next to a blank white card, while two visitors in the soft-focus background study it seriously. A phone photo of a banana buckled into the child seat of a supermarket shopping cart with a red seat belt. A phone photo from the driver's seat of a banana sitting upright in the passenger seat with the seat belt fastened across it.
Phone-style photos. A banana taped to a gallery wall, buckled into a shopping cart and belted into a car seat. Model 2.1, 2K, 3:4, about 5 cents each.

A woman walks past a shop window at night, lit by a harsh camera flash, holding a half-peeled banana and looking to the left. The same photo in bright afternoon sunlight under a blue sky: the same woman, pose, banana and shop window.
Edit with --image. A flash photo at night became a sunny afternoon. Everything except the light stayed the same. Model 2.1, 1K, about 3 cents.

An infographic titled Anatomy of a banana: a glossy banana on a dark background with four labels pointing to the Stem, Peel, Fruit and Tip.
A retro travel poster that reads BANANA ISLAND and Visit the sunny side, with a banana-shaped island, palm trees and a sailboat at sunset. A flat vector illustration of a banana built from geometric shapes in yellow and amber on a soft teal background.
Graphics. An infographic and a text poster on Model Pro (2K, about 13 cents each), and a flat vector illustration on Model 2.1 (2K, about 5 cents).

The glossy 3D banana mascot in sunglasses relaxing in a hammock between two palm trees on a tropical beach. The glossy 3D banana mascot riding a small surfboard on a turquoise wave with its arms out for balance.
Same mascot, new scenes with --follow-up. Model 2.1, 1K, about 3 cents each.

Install

Claude Code, from the plugin marketplace:

/plugin marketplace add jakubcurik/nano-banana
/plugin install nano-banana@nano-banana

Any agent that reads SKILL.md skills, through npx skills:

npx skills add jakubcurik/nano-banana

Or copy skills/nano-banana/ into your agent's skills folder by hand, for example ~/.claude/skills/ for Claude Code or ~/.agents/skills/ for Codex, Gemini CLI and Cursor.

You also need:

  • uv, which fetches google-genai and Python 3.11+ on its own. Without it, install Python 3.11+ and pip install "google-genai>=3.6,<4".
  • A Gemini API key from Google AI Studio, with billing turned on. The image models have no free tier.

Give the script the key through the environment, or save it once outside any repository:

export GEMINI_API_KEY="your-key"
# or
mkdir -p ~/.config/nano-banana && printf '%s' "your-key" > ~/.config/nano-banana/api-key

Quick start

Ask your agent: "make a hero image for my coffee shop site, 16:9", "remove the car from this photo", "combine these two photos". The skill triggers on its own. It asks what the image is for, writes the prompt, tells you the price when it is not trivial, runs the script and checks the result.

You can also call the script yourself:

S=skills/nano-banana/scripts/generate.py

uv run --script $S "A flat illustration of a red apple on a white table" --estimate
uv run --script $S "A flat illustration of a red apple on a white table" -a 16:9 -s 2K --format jpeg
uv run --script $S "Make the apple green. Keep everything else the same." --follow-up
uv run --script $S "Put this product on a marble table" -i product.jpg -m pro -s 2K
uv run --script $S "A banner with the text \"Open daily\"" --batch -n 4 --currency EUR

Images land in .cache/nano-banana/, each next to a .txt file with the prompt, the options and the interaction ID.

All options
Option Meaning
-m 2.1 / 2 / pro / lite model, default 2.1
-s 512 / 1K / 2K / 4K resolution, default 1K (512 only on model 2)
-a 16:9 aspect ratio: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9; also 1:4, 4:1, 1:8, 8:1 on 2.1 and 2
-i photo.jpg input image for editing or as a reference, repeatable, max 14
-t minimal / medium / high thinking level, depends on the model
--search Google Search grounding, including image search (not on lite)
--follow-up [ID] continue from the last result, or from a given interaction
-n 4 number of images, each billed separately
-o folder output folder
--format png / jpeg output file format
--prompt-file file read the prompt from a file
--no-store ask Google not to keep the interaction (this disables follow-ups on it)
--batch half price, up to 24 h (models 2.1 and lite)
--estimate print the price estimate and stop
--currency CZK also show prices in this currency (rate from the Czech National Bank)

How it works

The skill makes the agent work in a fixed order. It first asks what the image is for. If the picture has to show a real species, product or place, it gets two or three reference photos and asks you to confirm them. Then it writes the prompt in English and estimates the price, and it asks you first when the estimate is above about 0.50 USD or more than four images are wanted. After generating, it looks at the result and fixes small things with a follow-up instead of starting over.

The full workflow is in SKILL.md. Prompt templates, edit templates and a list of common mistakes are in references/prompting.md.

Models and prices

Snapshot from 26 November 2026, USD per image.

Model Best for 1K 2K 4K
2.1 (gemini-nano-banana-2.1) almost everything 0.034 0.050 0.113
2 (gemini-3.1-flash-image) 512 px; deprecated by Google, no shutdown date yet 0.067 0.101 0.151
pro (gemini-3-pro-image) the hardest prompts, a lot of text 0.134 0.134 0.240
lite (gemini-3.1-flash-lite-image) many simple images, 1K only, no search 0.034 n/a n/a

Prices and model data live in models.json, the one file to edit when Google changes its price list. --search is billed on top: 5,000 grounded prompts per month are free, then 14 USD per 1,000 search queries.

Good to know

  • Google stores interactions so follow-ups work: 55 days on paid projects, 1 day on the free tier. Use --no-store for sensitive photos.
  • Every generated image carries an invisible SynthID watermark.
  • The model invents details. When a picture has to match a real species, product or building, give it 2-3 reference photos with -i. The skill's workflow insists on that.
  • A request that times out may still have been billed, so the script never retries on its own.
  • If you publish output made with --search, Google requires showing its search suggestions. The script saves them next to the image.

FAQ

Google has its own gemini-api CLI. Why use this?
The CLI makes the call, and it does that well. This skill adds what sits around the call. You may want both.

Google gemini-api CLI and skills nano-banana
Price estimate before, real cost after no yes
The agent asks before expensive runs no yes
Options checked against the model no, the API rejects them yes
Follow-up edits without copying IDs manual --follow-up
Prompt and options saved next to each image no yes
Prompting guide and templates no yes

The CLI is a beta that moves quickly, so check both before you choose.

Does it work outside Claude Code?
The skill follows the open Agent Skills format, so other agents that load SKILL.md files can use it. I have tested it in Claude Code only.

Prices changed. What do I edit?
skills/nano-banana/scripts/models.json, and the tables in SKILL.md and here.

Why does it ask for reference photos?
Without one, the model fills in the details of a real thing from its imagination, and the result looks plausible and wrong.

Contributing

Issues and pull requests are welcome, especially when Google changes models, prices or the API. Update models.json and the tables in SKILL.md and this README together. The translations in i18n/ were made with the help of AI, and corrections are welcome.

The offline tests need no API key and no network:

python -m unittest discover -s tests

License

MIT

Yorumlar (0)

Sonuc bulunamadi