Nano Banana Pro (Gemini Image Generation)
This skill uses aivault to keep your Gemini API key safe. It calls the Gemini REST :generateContent endpoint through the gemini/models capability and saves the returned image.
Setup
Install aivault if it is not already available:
bash
curl -fsSL https://aivault.moldable.sh/install.sh | sh
Store your Gemini API key in aivault. The credential and all gemini/* capabilities are auto-provisioned from the built-in registry.
bash
aivault secrets create --name GEMINI_API_KEY --value "YOUR_API_KEY" --scope global
Quick start
bash
npx -y tsx {baseDir}/scripts/generate.ts --prompt "a cat eating a nano-banana" --filename ./out.png
Common examples
bash
# Higher resolution
npx -y tsx {baseDir}/scripts/generate.ts --prompt "a cozy reading nook" --filename ./out.png --resolution 2K
# Edit with input image(s)
npx -y tsx {baseDir}/scripts/generate.ts --prompt "make it look like a watercolor painting" --filename ./out.png -i ./in.png
# Raw upstream JSON
npx -y tsx {baseDir}/scripts/generate.ts --prompt "a cat eating a nano-banana" --filename ./out.png --json
Notes
- •Default model is
gemini-3-pro-image-preview(override with--model). - •Uses
generationConfig.responseModalities=["TEXT","IMAGE"]andgenerationConfig.imageConfig.imageSize.