# Nano Banana

Generate or edit images via Nano Banana image models.

- Repository: https://github.com/nexu-io/nexu (3280 stars)
- Category: Media
- License: MIT
- Last updated: 2026-04-26
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add nexu-io/nexu --skill nano-banana -g -a claude-code -y`
Codex: `npx skills add nexu-io/nexu --skill nano-banana -g -a codex -y`
Cursor: `npx skills add nexu-io/nexu --skill nano-banana -g -a cursor -y`
Gemini CLI: `npx skills add nexu-io/nexu --skill nano-banana -g -a gemini-cli -y`

## Description

Generate or edit images via Nano Banana image models. Triggers on "generate image", "image generation", "nano banana", "edit image", "nano banana pro", "nano banana 2

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Nano Banana, Image Generation

Image generation script supporting three models. Requires `sharp` for input image compression (auto-installed on first run).

## Models

| Flag | Notes |
|------|-------|
| `--model nano-banana` | **Default.** Fast, good quality. |
| `--model nano-banana-pro` | Highest quality, slower. |
| `--model nano-banana-2` | Legacy model. |

## Generate an image

```bash
node {baseDir}/scripts/generate-image.js --prompt "a cat sitting on mars" --filename "cat-on-mars.png"
```

## Edit a single image

```bash
node {baseDir}/scripts/generate-image.js \
  --prompt "make the sky purple" \
  --filename "edited.png" \
  -i "/path/to/input.png" \
  --model nano-banana-pro
```

## Multi-image composition (up to 14 images)

```bash
node {baseDir}/scripts/generate-image.js \
  --prompt "combine these into a collage" \
  --filename "collage.png" \
  -i img1.png -i img2.png -i img3.png
```

## Options

| Flag | Short | Default | Description |
|------|-------|---------|-------------|
| `--prompt` | `-p` | required | Image description or editing instruction |
| `--filename` | `-f` | required | Output filename |
| `--input-image` | `-i` |, | Input image(s), repeatable, max 14 |
| `--model` |, | `nano-banana` | `nano-banana`, `nano-banana-pro`, or `nano-banana-2` |
| `--resolution` | `-r` | `1K` | `1K`, `2K`, or `4K` |
| `--aspect-ratio` |, |, | e.g. `1:1`, `16:9`, `4:3`, `3:4`, `9:16` |

## API key

The API key is pre-configured on this machine. No flags or environment variables needed.

## Input image handling

All input images are sent as inline base64. Images over 500 KB are automatically compressed to JPEG and resized to fit under the limit. This keeps requests fast and avoids File API auth issues with the enterprise endpoint.

## Output

The rest: https://github.com/nexu-io/nexu/blob/HEAD/skills/nexubot/nano-banana/SKILL.md
