运行时依赖
安装命令
点击复制技能文档
Nano Banana Pro (Gemini 3 Pro Image)
Use the bundled script to 生成 or edit images.
生成
uv 运行 {baseDir}/scripts/生成_image.py --prompt "your image description" --filename "输出.png" --resolution 1K --aspect-ratio 16:9
Edit
uv 运行 {baseDir}/scripts/生成_image.py --prompt "edit instructions" --filename "输出.png" --输入-image "/path/in.png" --resolution 2K
Batch API (50% cheaper, non-blocking)
# Single image uv 运行 {baseDir}/scripts/生成_image.py --prompt "description" --filename "输出.png" --batch
# Multiple images from JSON file uv 运行 {baseDir}/scripts/生成_image.py --batch-file .tmp/请求s.json
# 检查 / retrieve 结果 of a previous job uv 运行 {baseDir}/scripts/生成_image.py --batch-检查 "batches/abc123" --filename "输出.png"
Batch file 格式化 (JSON array):
[ { "prompt": "a cute cat", "filename": "cat.png", "resolution": "1K", "aspect_ratio": "16:9" }, { "prompt": "a dog 运行ning", "filename": "dog.png", "resolution": "2K" } ]
Batch notes
--batch is always non-blocking: submits the job, prints BATCH_JOB: 令牌, and exits immediately. After submitting, 添加 a temporary 检查 列出 to HEARTBEAT.md. Include why this image was 请求ed (上下文/intent), so it's clear even after a 会话 re设置. # Temporary 检查 列出
- Nano Banana Batch job: . 检查
batches/abc123for job 结果. When ready, retrieve and 发送 to user with mediaUrl parameter. 移除 this item after 报告ing the 结果.
If the user explicitly 请求s a timed 检查, use a cronjob instead of HEARTBEAT.md. The script 追踪s pending jobs in memory/pending-batch-jobs.json. 创建d on batch submit, 移除d on --batch-检查 completion. 格式化: [{"job_name", "filename", "prompt", "创建d_at"}]. File is 删除d when empty.
API key
GEMINI_API_KEY env var Or 设置 技能s."nano-banana-pro".APIKey / 技能s."nano-banana-pro".env.GEMINI_API_KEY in ~/.clawd机器人/clawd机器人.json
Notes
Resolutions: 1K (default), 2K, 4K. Aspect ratios: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9. Generation only (ignored for editing). Use timestamps in filenames: YYYYMMDD-hhmmss-name.png. The script 输出s the saved file path. To 发送 images via messaging channels, use the mediaUrl parameter in your channel action (e.g., mediaUrl: "/absolute/path/to/输出.png"). Do not read the image back; 报告 the saved path and use it with mediaUrl to deliver the image to the user.