nanobanana
Original:🇺🇸 English
Translated
1 scriptsChecked / no sensitive code detected
Use when "nanobanana", "generate image", "create image", "edit image", "AI drawing", "Gemini image", "image generation"
2installs
Sourceeyadsibai/ltk
Added on
NPX Install
npx skill4agent add eyadsibai/ltk nanobananaTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Nanobanana Image Generation
Generate and edit images using Google Gemini API.
Prerequisites
| Requirement | Setup |
|---|---|
| API Key | Export |
| Dependencies | |
| Script | |
Basic Usage
| Task | Command |
|---|---|
| Generate image | |
| Edit image | |
Aspect Ratios
| Size | Ratio | Use Case |
|---|---|---|
| 1:1 | Square, logos |
| 9:16 | Portrait, stories (default) |
| 16:9 | Landscape, wallpapers |
| 2:3 | Portrait photos |
| 3:2 | Landscape photos |
| 21:9 | Ultra-wide |
Use to specify.
--size WIDTHxHEIGHTModels
| Model | Trade-off |
|---|---|
| Higher quality (default) |
| Faster generation |
Use to specify.
--model MODELResolution
| Resolution | Use Case |
|---|---|
| Testing, drafts (default) |
| Good quality |
| Final output, print |
Use to specify.
--resolution RESBest Practices
| Practice | Why |
|---|---|
| Be descriptive | Include style, mood, colors, composition |
| Use 1:1 for logos | Clean square format |
| Use 9:16 for stories | Standard mobile format |
| Use 16:9 for wallpapers | Standard widescreen |
| Start with 1K | Test before using higher resolution |
| Use flash model for iteration | Save time during drafting |
Examples
Generate landscape:
bash
python3 nanobanana.py --prompt "Mountain sunset with lake" --size 1344x768 --output "landscape.png"Generate logo:
bash
python3 nanobanana.py --prompt "Minimalist tech logo" --size 1024x1024 --output "logo.png"Edit existing image:
bash
python3 nanobanana.py --prompt "Add rainbow to sky" --input photo.png --output "edited.png"High quality output:
bash
python3 nanobanana.py --prompt "Professional portrait" --resolution 2K --output "portrait.png"Troubleshooting
| Issue | Solution |
|---|---|
| Script fails | Check |
| No image generated | Make prompt more specific |
| Can't read input | Verify file exists and is readable |
| Can't write output | Check directory is writable |