Nano Banana Pro via OpenRouter

Nano Banana Pro via OpenRouter

by:

@OpenSourceBuffGuy

🎨 Image, Video & Audio

Lets an agent generate, edit and composite images through OpenRouter with the Gemini 3 Pro Image model, with 1K, 2K or 4K output.

Skill files3 files

assets/

scripts/

SKILL.md75 lines
1
---
2
name: nano-banana-pro-openrouter
3
description: 'Generate or edit images via OpenRouter with the Gemini 3 Pro Image model. Use for prompt-only image generation, image edits, and multi-image compositing; supports 1K/2K/4K output.'
4
metadata:
5
emoji: 🍌
6
requires:
7
bins:
8
- uv
9
env:
10
- OPENROUTER_API_KEY
11
primaryEnv: OPENROUTER_API_KEY
12
---
13
14
15
# Nano Banana Pro OpenRouter
16
17
## Overview
18
19
Generate or edit images with OpenRouter using the `google/gemini-3-pro-image-preview` model. Support prompt-only generation, single-image edits, and multi-image composition.
20
21
### Prompt-only generation
22
23
```
24
uv run {baseDir}/scripts/generate_image.py \
25
--prompt "A cinematic sunset over snow-capped mountains" \
26
--filename sunset.png
27
```
28
29
### Edit a single image
30
31
```
32
uv run {baseDir}/scripts/generate_image.py \
33
--prompt "Replace the sky with a dramatic aurora" \
34
--input-image input.jpg \
35
--filename aurora.png
36
```
37
38
### Compose multiple images
39
40
```
41
uv run {baseDir}/scripts/generate_image.py \
42
--prompt "Combine the subjects into a single studio portrait" \
43
--input-image face1.jpg \
44
--input-image face2.jpg \
45
--filename composite.png
46
```
47
48
## Resolution
49
50
- Use `--resolution` with `1K`, `2K`, or `4K`.
51
- Default is `1K` if not specified.
52
53
## System prompt customization
54
55
The skill reads an optional system prompt from `assets/SYSTEM_TEMPLATE`. This allows you to customize the image generation behavior without modifying code.
56
57
## Behavior and constraints
58
59
- Accept up to 3 input images via repeated `--input-image`.
60
- `--filename` accepts relative paths (saves to current directory) or absolute paths.
61
- If multiple images are returned, append `-1`, `-2`, etc. to the filename.
62
- Print `MEDIA: <path>` for each saved image. Do not read images back into the response.
63
64
## Troubleshooting
65
66
If the script exits non-zero, check stderr against these common blockers:
67
68
| Symptom | Resolution |
69
|---------|------------|
70
| `OPENROUTER_API_KEY is not set` | Ask the user to set it. PowerShell: `$env:OPENROUTER_API_KEY = "sk-or-..."` / bash: `export OPENROUTER_API_KEY="sk-or-..."` |
71
| `uv: command not found` or not recognized | macOS/Linux: <code>curl -LsSf https://astral.sh/uv/install.sh &#124; sh</code>. Windows: <code>powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 &#124; iex"</code>. Then restart the terminal. |
72
| `AuthenticationError` / HTTP 401 | Key is invalid or has no credits. Verify at <https://openrouter.ai/settings/keys>. |
73
74
For transient errors (HTTP 429, network timeouts), retry once after 30 seconds. Do not retry the same error more than twice — surface the issue to the user instead.
75

© GitHub, Inc. · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 14,621 prompts

More by @OpenSourceBuffGuy

See all
Sea turtle carrying floating film studio island prompt image

Sea turtle carrying floating film studio island

Draws a giant sea turtle carrying a floating island film studio through a starry sky, where fairies polish rough film strips into golden film.

image-prompt, nano-banana, 3d-render, cartoon, fantasy-world, creatures, animals, whimsical, dreamy, cinematic, dramatic-lighting, vibrant-colors, bokeh, miniature, widescreen, night-scene, illustration, concept-art, surreal, storytelling, clay-3d

Desert buggy escapes drones past industrial outpost prompt image

Desert buggy escapes drones past industrial outpost

Builds a 15-second desert chase video where a racer in an armored buggy escapes drones past an industrial outpost, using five reference images with set jobs.

video-prompt, hailuo, action, multi-shot, timed-beats, camera-movement, reference-image, character-consistency, negative-prompt, cinematic, sci-fi, cars, landscape, aerial-view, tracking-shot, photorealistic, sound-effects, structured-output, long-form, widescreen

1 view
Cozy Pixel Art Farm Island Village prompt image

Cozy Pixel Art Farm Island Village

Draws a cozy 16-bit pixel-art farming village across six small islands joined by bridges, with exact counts for buildings, animals and crops.

image-prompt, gpt-image, pixel-art, isometric, game-assets, concept-art, maps, worldbuilding, cozy, vibrant-colors, ocean, landscape, wide-shot, widescreen, game-development, video-games, structured-output, whimsical, summer, high-angle, aerial-view, animals, negative-prompt, cityscape

1 view

Reviews

Loading reviews…

Discussion

Loading comments…