nano-banana-pro-openrouter
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseNano Banana Pro OpenRouter
Nano Banana Pro OpenRouter
Overview
概述
Generate or edit images with OpenRouter using the model. Support prompt-only generation, single-image edits, and multi-image composition.
google/gemini-3-pro-image-preview通过OpenRouter使用模型生成或编辑图片。支持仅用提示词生成、单张图片编辑以及多图片合成。
google/gemini-3-pro-image-previewPrompt-only generation
仅用提示词生成图片
uv run {baseDir}/scripts/generate_image.py \
--prompt "A cinematic sunset over snow-capped mountains" \
--filename sunset.pnguv run {baseDir}/scripts/generate_image.py \
--prompt "A cinematic sunset over snow-capped mountains" \
--filename sunset.pngEdit a single image
编辑单张图片
uv run {baseDir}/scripts/generate_image.py \
--prompt "Replace the sky with a dramatic aurora" \
--input-image input.jpg \
--filename aurora.pnguv run {baseDir}/scripts/generate_image.py \
--prompt "Replace the sky with a dramatic aurora" \
--input-image input.jpg \
--filename aurora.pngCompose 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.pnguv 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.pngResolution
分辨率
- Use with
--resolution,1K, or2K.4K - Default is if not specified.
1K
- 使用参数指定
--resolution、1K或2K分辨率。4K - 若未指定,默认分辨率为。
1K
System prompt customization
系统提示词自定义
The skill reads an optional system prompt from . This allows you to customize the image generation behavior without modifying code.
assets/SYSTEM_TEMPLATE该技能可从读取可选的系统提示词。无需修改代码即可自定义图片生成行为。
assets/SYSTEM_TEMPLATEBehavior and constraints
行为与限制
- Accept up to 3 input images via repeated .
--input-image - accepts relative paths (saves to current directory) or absolute paths.
--filename - If multiple images are returned, append ,
-1, etc. to the filename.-2 - Print for each saved image. Do not read images back into the response.
MEDIA: <path>
- 通过重复使用参数,最多可接受3张输入图片。
--input-image - 参数支持相对路径(保存至当前目录)或绝对路径。
--filename - 若返回多张图片,会在文件名后追加、
-1等后缀。-2 - 每张保存的图片都会输出,请勿将图片读回响应中。
MEDIA: <path>
Troubleshooting
故障排查
If the script exits non-zero, check stderr against these common blockers:
| Symptom | Resolution |
|---|---|
| Ask the user to set it. PowerShell: |
| 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. |
| 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.
如果脚本非零退出,请对照以下常见问题检查标准错误输出:
| 症状 | 解决方法 |
|---|---|
| 请用户设置该环境变量。PowerShell: |
| 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>。然后重启终端。 |
| API密钥无效或无可用额度。请在https://openrouter.ai/settings/keys验证。 |
对于临时错误(如HTTP 429、网络超时),等待30秒后重试一次。同一错误请勿重试超过两次,而是将问题告知用户。