Nano Banana Pro — Gemini 3 Pro Image Generation
Script: ~/clawd/skills/nano-banana-pro/scripts/generate_image.py
Runner: uv (installed at ~/.local/bin/uv)
Requires: GEMINI_API_KEY env var from https://ai.google.dev/
When to Use
- User wants to create/generate images from a text description
- User wants to edit/modify an existing image
- Multi-image composition (up to 14 inputs)
- Cost-sensitive image generation (cheaper than gpt-image)
When NOT to Use
- Screenshots/screen capture → use browser tools
- Photo analysis without generation → just describe the image
- Video generation → use video-generation skill
Generate an Image
uv run ~/clawd/skills/nano-banana-pro/scripts/generate_image.py \
--prompt "your image description" \
--filename "output.png" \
--resolution 1K
Edit an Existing Image
uv run ~/clawd/skills/nano-banana-pro/scripts/generate_image.py \
--prompt "edit instructions" \
--filename "output.png" \
-i "/path/to/input.png" \
--resolution 2K
Multi-Image Composition (up to 14 images)
uv run ~/clawd/skills/nano-banana-pro/scripts/generate_image.py \
--prompt "combine these into one scene" \
--filename "output.png" \
-i img1.png -i img2.png -i img3.png
Control Aspect Ratio
uv run ~/clawd/skills/nano-banana-pro/scripts/generate_image.py \
--prompt "portrait photo" \
--filename "output.png" \
--aspect-ratio 9:16
Options
--resolution:1K(default),2K,4K--aspect-ratio/-a:1:1,2:3,3:2,3:4,4:3,4:5,5:4,9:16,16:9,21:9- Without this flag, the model picks freely
- Use for avatars, profile pics, or consistent batch generation
Output
- The script saves the image and prints the path
- Use
MEDIA:/path/to/output.pngin response to send as attachment - Use timestamps in filenames:
yyyy-mm-dd-hh-mm-ss-name.png
Pitfalls
- ⚠️ Requires
GEMINI_API_KEY— check if set before running - Do NOT read the image back after generating — just report the saved path
- For Hermes: include
MEDIA:/absolute/pathin response to auto-attach