
Nano Banana Pro Openrouter
Generate or edit marketing and product images from prompts via OpenRouter without wiring a separate image API stack.
Overview
Nano Banana Pro OpenRouter is an agent skill for the Build phase that generates or edits images through OpenRouter using the Gemini 3 Pro Image preview model.
Install
npx skills add https://github.com/github/awesome-copilot --skill nano-banana-pro-openrouterWhat is this skill?
- Prompt-only generation, single-image edit, and multi-image compositing via one uv script
- 1K, 2K, and 4K output with --resolution (defaults to 1K)
- Up to 3 input images per compose/edit run
- Optional system prompt from assets/SYSTEM_TEMPLATE without code changes
- Requires OPENROUTER_API_KEY and uv on PATH
- Supports 1K, 2K, and 4K resolution flags
- Accepts up to 3 input images for compositing
Adoption & trust: 9.6k installs on skills.sh; 34.6k GitHub stars; 1/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need on-brand or scenario-specific images during development but do not want to leave the agent session or maintain a separate image pipeline.
Who is it for?
Indie builders who already use OpenRouter and want agent-driven image gen and light editing from the terminal.
Skip if: Teams that need fine-grained local SD/ComfyUI control, video generation, or workflows without an OpenRouter API key.
When should I use this skill?
Generate or edit images via OpenRouter with Gemini 3 Pro Image; prompt-only, edits, or multi-image compositing.
What do I get? / Deliverables
You get PNG (or chosen filename) outputs from text prompts or up to three reference images, ready to drop into your app, docs, or launch assets.
- Image file(s) at --filename (e.g. PNG/JPG output from generation or edit)
Recommended Skills
Journey fit
Image generation hooks into the product during implementation when you need assets, mocks, or composited visuals inside the agent workflow. OpenRouter + Gemini image preview is an external API integration the agent invokes from the build phase.
How it compares
Agent skill integration for OpenRouter image models—not a hosted design app or a general MCP media server.
Common Questions / FAQ
Who is nano-banana-pro-openrouter for?
Solo and indie developers using AI coding agents who want Gemini-class image generation and edits billed through OpenRouter.
When should I use nano-banana-pro-openrouter?
During build when you need new illustrations, edit an existing asset’s sky or background, or composite two reference faces into one studio portrait before ship or launch.
Is nano-banana-pro-openrouter safe to install?
Review the Security Audits panel on this Prism page and treat OPENROUTER_API_KEY as a secret; the skill runs local scripts and calls external APIs.
SKILL.md
READMESKILL.md - Nano Banana Pro Openrouter
# Nano Banana Pro OpenRouter ## Overview 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. ### Prompt-only generation ``` uv run {baseDir}/scripts/generate_image.py \ --prompt "A cinematic sunset over snow-capped mountains" \ --filename sunset.png ``` ### Edit a single image ``` uv run {baseDir}/scripts/generate_image.py \ --prompt "Replace the sky with a dramatic aurora" \ --input-image input.jpg \ --filename aurora.png ``` ### Compose multiple images ``` uv run {baseDir}/scripts/generate_image.py \ --prompt "Combine the subjects into a single studio portrait" \ --input-image face1.jpg \ --input-image face2.jpg \ --filename composite.png ``` ## Resolution - Use `--resolution` with `1K`, `2K`, or `4K`. - Default is `1K` if not specified. ## System prompt customization The skill reads an optional system prompt from `assets/SYSTEM_TEMPLATE`. This allows you to customize the image generation behavior without modifying code. ## Behavior and constraints - Accept up to 3 input images via repeated `--input-image`. - `--filename` accepts relative paths (saves to current directory) or absolute paths. - If multiple images are returned, append `-1`, `-2`, etc. to the filename. - Print `MEDIA: <path>` for each saved image. Do not read images back into the response. ## Troubleshooting If the script exits non-zero, check stderr against these common blockers: | Symptom | Resolution | |---------|------------| | `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-..."` | | `uv: command not found` or not recognized | macOS/Linux: <code>curl -LsSf https://astral.sh/uv/install.sh | sh</code>. Windows: <code>powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"</code>. Then restart the terminal. | | `AuthenticationError` / HTTP 401 | Key is invalid or has no credits. Verify at <https://openrouter.ai/settings/keys>. | 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. You are a visionary image‑creation artist with a poetic, dreamlike imagination. Your role is to transform any user request—whether highly detailed or very minimal—into a vivid, concrete, and model‑ready image description. When information is missing, infer the user's intent in a gentle and intuitive way (such as creating a character portrait, sticker design, sci‑fi avatar, creature concept, etc.). If the user does not specify an art style, you may offer subtle optional suggestions (for example, "soft illustration," "minimal line style," or "playful entertainment‑meme style") without imposing them. Your responsibilities: - Ensure any text appearing in the image matches the user's language (unless explicitly specified otherwise) - Create visually compelling and technically excellent images - Pay attention to composition, lighting, color, and visual balance - Follow the user's specific style preferences and requirements - For image edits, preserve the original context while making requested modifications - For multi-image composition, seamlessly blend subjects into cohesive results Remember: Output only the generated image without additional commentary. #!/usr/bin/env python3 # /// script # requires-python = ">=3.10" # dependencies = [ # "openai", # ] # /// """ Generate or edit images via OpenRouter using openai-pytho