Turn text into images for free, right from your AI coding assistant.
Works with Claude Code · OpenClaw · Codex · Antigravity · Paperclip
English · 繁體中文 · 日本語 · 한국어 · Español · Deutsch · Français · Italiano
zimage gives your AI assistant the ability to generate images from natural language. It calls Z-Image-Turbo — an open-source 6B-parameter model by Alibaba's Tongyi-MAI team — through ModelScope's free API.
You: Create an image of a fox reading a book in a library
AI: Submitting: a fox reading a book in a library
Task 91204 — waiting for result…
Saved → fox_library.jpg
| zimage | DALL-E 3 | Midjourney | |
|---|---|---|---|
| Price | Free | $0.04–0.08 / image | From $10/mo |
| Open source | Apache 2.0 | No | No |
| Setup time | ~5 min | Billing required | Discord required |
Free tier: 2,000 API calls/day total, 500/day per model. Limits may be dynamically adjusted. (official limits)
Register at https://www.alibabacloud.com/campaign/benefits?referral_code=A9242N
You'll need to verify your phone number and add a payment method during registration. Z-Image itself is free and will not charge you, but Alibaba Cloud requires payment info on file for all accounts.
- Go to https://modelscope.ai/register?inviteCode=futurizerush&invitorName=futurizerush&login=true&logintype=register → sign up (GitHub login works)
- Open Settings → Bind Alibaba Cloud Account and link the account from step 1
- Visit https://modelscope.ai/my/access/token
- Click Create Your Token
- Copy it — looks like
ms-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Claude Code
Say this in Claude Code:
Install the zimage skill from https://github.com/FuturizeRush/zimage-skill
Then:
Set my MODELSCOPE_API_KEY environment variable to ms-your-token
Restart Claude Code.
OpenClaw / ClawHub
openclaw skills install zimage
# or
npx clawhub@latest install zimageexport MODELSCOPE_API_KEY="ms-your-token"Codex / Antigravity / Paperclip / Other
git clone https://github.com/FuturizeRush/zimage-skill.git
cd zimage-skill
pip install Pillow # optional, for format conversion
export MODELSCOPE_API_KEY="ms-your-token"python3 imgforge.py "a sunset over the ocean" sunset.jpgJust ask naturally:
Generate an image of a cozy coffee shop, warm lighting, cinematic
Draw a pixel-art dragon breathing fire
Create a minimalist logo, blue gradients, clean vector style
# Basic
python3 imgforge.py "a cat astronaut on Mars"
# Custom size (landscape)
python3 imgforge.py "mountain panorama at golden hour" -o panorama.jpg -W 2048 -H 1024
# Machine-readable output
python3 imgforge.py "abstract art" --json
# → {"ok": true, "path": "output.jpg", "task": "91204"}| Flag | Default | Description |
|---|---|---|
prompt |
(required) | What to generate |
-o / --out |
output.jpg |
Output path (.jpg, .png, .webp) |
-W / --width |
1024 |
Width, 512–2048 px |
-H / --height |
1024 |
Height, 512–2048 px |
--json |
off | JSON output for scripting |
Quality boosters: 4K, cinematic, professional photography, dramatic lighting, shallow depth of field
Style keywords: oil painting, watercolor, anime, pixel art, ink wash, blueprint, isometric
| Problem | Solution |
|---|---|
MODELSCOPE_API_KEY is not set |
See Setup above |
401 Unauthorized |
Use modelscope.ai (not .cn). Bind Alibaba Cloud in settings. Regenerate token. |
| Timeout | API under load — retry in a minute |
| Content moderation | Rephrase your prompt |
- Zero required dependencies — uses Python's
urllib.request. Pillow is optional (auto-detected for format conversion). - Supports custom image dimensions from 512×512 to 2048×2048.
--jsonflag enables integration with other tools and scripts.- Image URLs from the API expire in 24h — the script downloads immediately.
- Model: Tongyi-MAI/Z-Image-Turbo (Apache 2.0)
- API: ModelScope International (
api-inference.modelscope.ai)
MIT-0 — do whatever you want with it.