Generate images with Nano Banana 2 (and GPT Image 2, Seedream, Flux, Z-Image) from inside Claude Code, using a Claude Imagine API key — no Google API key required. Use when the user asks to generate, create, or make an image, illustration, icon, hero graphic, mockup, or any visual asset.
Scanned 9/2/2026
Install to Claude Code
npx -y skills add lumian2015/nano-banana-claude-skill --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of nano-banana-claude?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/lumian2015-nano-banana-claude)More formats (shields.io, HTML) on the badges page.
---
name: nano-banana-claude
description: Generate images with Nano Banana 2 (and GPT Image 2, Seedream, Flux, Z-Image) from inside Claude Code, using a Claude Imagine API key — no Google API key required. Use when the user asks to generate, create, or make an image, illustration, icon, hero graphic, mockup, or any visual asset.
---
# Nano Banana for Claude Code
Generates images through the Claude Imagine API. Nano Banana 2 is the default
model. Billing is in Claude Imagine credits — there is no Google AI Studio
project, no Google billing account, and no Gemini key to source.
## Setup (once)
1. Create an API key at https://claudeimagine.com/settings/apikeys — it is
displayed once and stored only as a hash, so copy it immediately. If you
lose it, delete that key and create a new one.
2. Export it:
```bash
export CLAUDEIMAGINE_API_KEY="sk-..."
```
Put the export in your shell profile to persist it. New accounts get free
signup credits, so the first images cost nothing.
## Generating an image
Run the bundled script — `scripts/generate.py`, alongside this SKILL.md. Commands
run from the project root, so prefix it with this Skill's directory (normally
`.claude/skills/nano-banana-claude/`). It writes the image to disk and prints
the path.
```bash
python3 .claude/skills/nano-banana-claude/scripts/generate.py \
"a red ceramic teapot on a windowsill, soft morning light"
```
`--out` is relative to the working directory, so images land in the user's
project, not in the Skill folder.
Options:
- `--model` — `nano-banana-2` (default), `gpt-image-2`, `seedream-4.5`,
`flux-2-pro`, `z-image`. Seedream and Flux need a Pro or Studio plan.
- `--aspect` — `1:1` (default), `4:3`, `3:4`, `16:9`, `9:16`
- `--out` — output path (default: an auto-named `.png` in the current directory)
```bash
python3 scripts/generate.py "isometric server rack icon, flat vector" \
--model nano-banana-2 --aspect 1:1 --out assets/icon.png
```
## Writing the prompt
Nano Banana 2 follows descriptive, sentence-form prompts better than
comma-separated tag soup. When the user's request is short, expand it before
calling the script — state the subject, the setting, the lighting, and the
framing, then generate.
Weak: `cat logo`
Better: `a minimal line-art cat face logo, single black stroke on white, centered, generous margins`
## Costs and failures
- Nano Banana 2 costs 3 credits per image on every plan, including free.
- Failed generations are refunded automatically.
- HTTP 402 means the balance is short — top up at https://claudeimagine.com/pricing
- HTTP 401 means the key is missing, wrong, or revoked.
Report the credit cost back to the user after a batch so they can track spend.
## Notes
Claude Imagine is an independent tool, not affiliated with Anthropic or Google.
Claude is a trademark of Anthropic, PBC; Nano Banana and Gemini are trademarks
of Google LLC.
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!