Install
openclaw skills install @thinkthinking/zenmux-image-genGenerate images from text prompts using ZenMux API (Vertex AI protocol with Gemini models). Use when: (1) User wants to generate/create images from text descriptions, (2) User asks for AI image generation, (3) User mentions ZenMux or Gemini image models, (4) User wants to create artwork, illustrations, or visual content programmatically, (5) Image-to-image editing. Supports aspect ratio and resolution control. Requires ZENMUX_API_KEY.
openclaw skills install @thinkthinking/zenmux-image-genGenerate images from text prompts using ZenMux API with Google Gemini models.
# Generate image (requires ZENMUX_API_KEY env var)
python3 scripts/generate_image.py "A cute cat" output.png
# With aspect ratio and resolution
python3 scripts/generate_image.py "A cute cat" output.png --aspect-ratio 16:9 --image-size 2K
Get your API key from https://zenmux.ai.
# Set environment variable
export ZENMUX_API_KEY="sk-..."
Security Rules:
--api-key flag (visible in shell history)| Option | Description |
|---|---|
--model MODEL | Model name (default: google/gemini-3.1-flash-image-preview) |
--input-image PATH | Input image for image-to-image generation |
--temperature N | Randomness 0.0-2.0 (default: 1.0) |
--max-tokens N | Max output tokens |
--aspect-ratio RATIO | 1:1, 2:3, 3:2, 3:4, 4:3, 9:16, 16:9, 21:9 |
--image-size SIZE | 1K (default), 2K, 4K |
Edit existing images with text prompts:
python3 scripts/generate_image.py "Make it nighttime" result.png --input-image photo.jpg
| Model | Alias | Use Case |
|---|---|---|
google/gemini-3.1-flash-image-preview | Nano Banana 2 | Fast & quality (default) |
google/gemini-3-pro-image-preview | Nano Banana Pro | Best quality |
google/gemini-2.5-flash-image | Nano Banana | Faster generation |
Writing effective prompts:
| Error | Fix |
|---|---|
| Input image not found | Check file path; verify file exists |
| Image too large | Max input size is 20 MB; compress before uploading |
| 401 Unauthorized | Check ZENMUX_API_KEY is set correctly |
| 429 Rate limited | Wait and retry, or upgrade to paid tier |
| Request timeout | API may be slow; wait and retry |
| Network error | Check internet connection |
| No image in response | Try a different prompt or model |
| Poor image quality | Use more descriptive prompt (10+ words) |
image_1.png, image_2.png)Generate multiple images by running the script multiple times with different outputs:
# Generate variations of the same prompt
for i in 1 2 3; do
python3 scripts/generate_image.py "A cute cat in different poses" "cat_$i.png"
done