Nano Banana 2 Now Available via API
Date: 2026-02-27 Version: OpenClaw 2026.2.26
Google launched Nano Banana 2 today (gemini-3.1-flash-image-preview), the Flash-speed successor to Nano Banana Pro. It's available immediately via the Gemini API with the same key.
Curl examples
Nano Banana Pro (original):
curl -X POST \
"https://generativelanguage.googleapis.com/v1beta/models/gemini-3-pro-image-preview:generateContent?key=$GEMINI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"contents":[{"parts":[{"text":"your prompt"}]}],"generationConfig":{"responseModalities":["TEXT","IMAGE"]}}'
Nano Banana 2:
curl -X POST \
"https://generativelanguage.googleapis.com/v1beta/models/gemini-3.1-flash-image-preview:generateContent?key=$GEMINI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"contents":[{"parts":[{"text":"your prompt"}]}],"generationConfig":{"responseModalities":["TEXT","IMAGE"]}}'
Pricing
| Resolution | NB2 | NB Pro | Savings |
|---|---|---|---|
| 0.5K | $0.045 | — | — |
| 1K | $0.067 | $0.134 | ~50% |
| 2K | $0.101 | $0.134 | ~25% |
| 4K | $0.151 | $0.240 | ~37% |
NB2 also adds a 0.5K tier at $0.045, not available on Pro. Quality-wise: NB2 is faster and significantly cheaper. Pro still wins on realism and fine detail, but NB2 holds its own for everyday use.
OpenClaw nano-banana-pro skill
The bundled nano-banana-pro skill in OpenClaw still uses gemini-3-pro-image-preview. If you want to switch it to NB2 locally, it's a one-line change in the script:
<openclaw>/skills/nano-banana-pro/scripts/generate_image.py
- model="gemini-3-pro-image-preview",
+ model="gemini-3.1-flash-image-preview",
Note: this change will be overwritten next time you update OpenClaw.