Generate or edit images using the built-in script.
Generate image
uv run {baseDir}/scripts/generate_image.py --prompt "你的图像描述" --filename "output.png" --resolution 1K
Edit image (single)
uv run {baseDir}/scripts/generate_image.py --prompt "编辑指令" --filename "output.png" -i "/path/in.png" --resolution 2K
Multi-image composition (up to 14 images)
uv run {baseDir}/scripts/generate_image.py --prompt "将这些图像合成为一个场景" --filename "output.png" -i img1.png -i img2.png -i img3.png
API key configuration
- Set the
GEMINI_API_KEYenvironment variable - Or set
~/.clawdbot/moltbot.jsoninskills."nano-banana-pro".apiKey/skills."nano-banana-pro".env.GEMINI_API_KEY
Notes
- Supported resolutions:
1K(default),2K、4K - It is recommended to use a timestamp format for file names:
yyyy-mm-dd-hh-mm-ss-name.png - The script outputs the
MEDIA:line so that Moltbot can automatically attach the image on supported chat platforms - Do not read the content of the generated image; just report the save path