用途:nano-banana-pro 基于 Gemini 3 Pro Image(Nano Banana Pro),用于生成或编辑图像。核心用法是调用捆绑脚本 generate_image.py。
主要能力:生成新图、编辑单张图片、多图合成(最多 14 张)。可选分辨率 1K(默认)、2K、4K;可选宽高比 1:1、2:3、3:2、3:4、4:3、4:5、5:4、9:16、16:9、21:9。不指定宽高比时由模型自由选择;头像、个人资料图或需要批量一致输出时可用该参数固定。
使用方式:生成:uv run {baseDir}/scripts/generate_image.py --prompt "your image description" --filename "output.png" --resolution 1K。编辑单图:uv run {baseDir}/scripts/generate_image.py --prompt "edit instructions" --filename "output.png" -i "/path/in.png" --resolution 2K。多图合成:uv run {baseDir}/scripts/generate_image.py --prompt "combine these into one scene" --filename "output.png" -i img1.png -i img2.png -i img3.png。指定宽高比:uv run {baseDir}/scripts/generate_image.py --prompt "portrait photo" --filename "output.png" --aspect-ratio 9:16。
API key:使用 GEMINI_API_KEY 环境变量,或在 ~/.openclaw/openclaw.json 中设置 skills."nano-banana-pro".apiKey / skills."nano-banana-pro".env.GEMINI_API_KEY。
注意:文件名建议加入时间戳,如 yyyy-mm-dd-hh-mm-ss-name.png。脚本会打印 MEDIA: 行,供 OpenClaw 在支持的聊天平台自动附带;不要回读图片,只报告保存路径。其他收费、平台或使用限制资料暂未提供。