通过 EchoFlow API 使用 Nano Banana Pro(Gemini 3 Pro Image)生成、编辑或合成图像(最多 14 输入),可自定义分辨率和模型。
Generate or edit images using EchoFlow API with Nano Banana Pro (Gemini 3 Pro Image). EchoFlow provides OpenAI-compatible access to Gemini's powerful image generation model.
ECHOFLOW_API_KEYskills."echoflow-image-gen".apiKeybash
uv run {baseDir}/scripts/generate_image.py --prompt "a serene mountain landscape at sunset" --filename "mountain.png"
bash
uv run {baseDir}/scripts/generate_image.py --prompt "add a rainbow in the sky" --filename "edited.png" -i "/path/to/input.png"
bash
uv run {baseDir}/scripts/generate_image.py --prompt "combine these into one scene" --filename "combined.png" -i img1.png -i img2.png -i img3.png
ParameterDescriptionDefault--prompt, -pImage description (required)---filename, -fOutput filename (required)---input-image, -iInput image for editing (can repeat, max 14)---resolution, -rOutput resolution: 1K, 2K, 4K``1K``--model, -mModel namegemini-3.1-flash-image-preview``--api-key, -kOverride API key---api-baseOverride API base URLhttps://api.echoflow.cn/v1
Auto-detection: When editing images, the script auto-detects resolution from the largest input dimension:
The script outputs:
Image saved: <full-path> - Location of saved imageMEDIA: <full-path> - Token for OpenClaw to auto-attach the image on supported chat providersbash
# Simple generation
uv run {baseDir}/scripts/generate_image.py -p "a cute cat wearing a hat" -f "cat.png"
# High resolution
uv run {baseDir}/scripts/generate_image.py -p "futuristic city" -f "city.png" -r 4K
# Edit single image
uv run {baseDir}/scripts/generate_image.py -p "add snow to the scene" -f "snowy.png" -i summer.png
# Compose multiple images
uv run {baseDir}/scripts/generate_image.py -p "create a collage of these photos" -f "collage.png" -i photo1.png -i photo2.png -i photo3.png -i photo4.png
# Use gemini-3-pro-image-preview model
uv run {baseDir}/scripts/generate_image.py -p "abstract art" -f "art.png" -m "gemini-3-pro-image-preview"
For detailed API documentation, see echoflow_api.md.
2024-03-28-18-30-landscape.pngMEDIA: line for OpenClaw to auto-attach the image on supported providers--api-base