zenmux-image-gen

Generate 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.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "zenmux-image-gen" with this command: npx skills add thinkthinking/zenmux-image-gen

ZenMux Image Generation

Generate images from text prompts using ZenMux API with Google Gemini models.

Quick Start

# 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

API Key Setup

Get your API key from https://zenmux.ai.

# Set environment variable
export ZENMUX_API_KEY="sk-..."

Security Rules:

  • NEVER use --api-key flag (visible in shell history)
  • NEVER commit API keys to git

Script Options

OptionDescription
--model MODELModel name (default: google/gemini-3.1-flash-image-preview)
--input-image PATHInput image for image-to-image generation
--temperature NRandomness 0.0-2.0 (default: 1.0)
--max-tokens NMax output tokens
--aspect-ratio RATIO1:1, 2:3, 3:2, 3:4, 4:3, 9:16, 16:9, 21:9
--image-size SIZE1K (default), 2K, 4K

Image-to-Image

Edit existing images with text prompts:

python3 scripts/generate_image.py "Make it nighttime" result.png --input-image photo.jpg

Available Models

ModelAliasUse Case
google/gemini-3.1-flash-image-previewNano Banana 2Fast & quality (default)
google/gemini-3-pro-image-previewNano Banana ProBest quality
google/gemini-2.5-flash-imageNano BananaFaster generation

Prompt Tips

Writing effective prompts:

  • Be specific: "A golden retriever puppy playing on grass" instead of "a dog"
  • Include details: lighting (golden hour, soft light), style (photorealistic, anime, oil painting)
  • For image-to-image: describe the desired change clearly, e.g., "Change to nighttime with city lights"
  • Try 10+ words for better results

Troubleshooting

ErrorFix
Input image not foundCheck file path; verify file exists
Image too largeMax input size is 20 MB; compress before uploading
401 UnauthorizedCheck ZENMUX_API_KEY is set correctly
429 Rate limitedWait and retry, or upgrade to paid tier
Request timeoutAPI may be slow; wait and retry
Network errorCheck internet connection
No image in responseTry a different prompt or model
Poor image qualityUse more descriptive prompt (10+ words)

Script Features

  • Timeout protection: Requests timeout after 300 seconds (5 minutes)
  • Auto-create directories: Output directories are created automatically
  • Auto-rename on conflict: If output file exists, automatically appends number (e.g., image_1.png, image_2.png)
  • Input validation: Checks image format, size, and existence
  • Clear error messages: Human-readable error explanations
  • Format support: JPG, PNG, WebP, GIF input formats

Batch Generation

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

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

public-media-curator

On-demand German public-media documentary picks filtered against a personal profile, delivered via the configured output channel

Registry SourceRecently Updated
General

Red Team Verificator

Аудит стратегических анализов стартапов с фокусом на поиск ошибок, галлюцинаций и искажений в данных и Red Team-отчетах.

Registry SourceRecently Updated
General

AI Product Manager

OpenClaw-first AI product manager for turning analytics, revenue, crash, store, and feedback signals into execution-ready proposals and backlog work.

Registry SourceRecently Updated
General

Startup Verifier

Проверяет стартапы по 14 критериям для адаптации на российский рынок и выдает вердикт: GREEN, YELLOW или RED.

Registry SourceRecently Updated