Skip to content

nano-banana + Gemini key

The nano-banana skill generates images by calling the Gemini CLI’s nanobanana extension, which hits Google’s gemini-2.5-flash-image (or gemini-3-pro-image-preview) endpoints. With the free Gemini API tier, you get ~500 images/day — plenty for personal use.

ComponentWhereNotes
@google/gemini-cliGlobal npm installnpm install -g @google/gemini-cli
nanobanana extension~/.gemini/extensions/nanobanana/Installed via gemini extensions install
nano-banana skill~/.claude/skills/nano-banana/SKILL.mdThe Claude Code wrapper
GEMINI_API_KEYUser env var (setx) + ~/.nano-banana/.envPersisted across reboots
Extension enablement~/.gemini/extensions/extension-enablement.jsonMust NOT have "overrides": ["/C:/Users/justi/*"]
Terminal window
gemini --yolo -p "/generate 'a single yellow banana on white background'"

If everything’s good, an image appears in ./nanobanana-output/. If you see “GEMINI_API_KEY not set”, the env var didn’t propagate — open a new terminal.

If you ever rotate yours:

  1. Visit aistudio.google.com/apikey
  2. Sign in with any Google account (no payment method required)
  3. Click “Create API key”
  4. Copy the key (starts with AIza...)
  5. Update it in two places:
    • User env var: setx GEMINI_API_KEY "your-key"
    • ~/.nano-banana/.env: edit the file

A known quirk during setup: gemini extensions list returns empty even when extensions are installed. Cause: the extension has an “overrides” entry in ~/.gemini/extensions/extension-enablement.json that disables it for your home directory.

Fix: edit the file so the extension’s overrides array is empty ([]) or remove the entry entirely.

{
"nanobanana": {
"overrides": []
}
}

That re-enables it globally.

As of May 2026:

  • gemini-2.5-flash-image: ~500 images/day, free
  • gemini-3-pro-image-preview: ~150 images/day, free (higher quality)
  • Resolution: up to 4K
  • Aspect ratios: 1:1, 16:9, 9:16, 4:3, 3:2, 21:9 etc.

Hard rate limits (per minute) exist but you’ll hit the daily cap first if you’re bulk-generating.

Per Google’s pricing as of mid-2026:

  • ~$0.04 per 1K image (flash)
  • ~$0.14 per 4K image (pro)

Trivial unless you batch-generate at scale.

The skill accepts model aliases:

AliasReal modelUse for
flash (default)gemini-2.5-flash-imageDaily use, speed, volume
progemini-3-pro-image-previewHigh-quality featured images, 4K

Override per call: gemini --yolo -p "/generate '...' --model pro"

Default: ./nanobanana-output/ in whatever directory you ran the command from.

In the Content Engine workflow, outputs get moved to 80-Content/assets/[slug]/. In the Visual Journal workflow, into 10-Daily/ next to the day’s note.

The skill is set up to be invoked for ANY image request the user makes. The frontmatter:

description: REQUIRED for all image generation requests. Generate and edit images using Nano Banana (Gemini CLI). Handles blog featured images, YouTube thumbnails, icons, diagrams, patterns, illustrations, photos, visual assets, graphics, artwork, pictures. Use this skill whenever the user asks to create, generate, make, draw, design, or edit any image or visual content.

If you ever want Claude to use a different image tool, edit this frontmatter.