使用 Z-Image-Turbo 免费生成 AI 图像。说“生成一张…的图像”,即可在几秒内获得惊艳效果。
Generate images from text using Alibaba's open-source Z-Image-Turbo model. Free to use.
Activate this skill when the user asks to:
bash
python3 SKILL_DIR/imgforge.py "PROMPT" -o OUTPUT_PATH
FlagDefaultDescriptionPROMPT (positional)—Text description (English or Chinese)-o, --out``output.jpgFile path to save the image-W, --width1024Width in pixels (512–2048)-H, --height1024Height in pixels (512–2048)--jsonoffOutput result as JSON
AspectFlagsSquare (1:1)-W 1024 -H 1024Landscape (16:9)-W 1280 -H 720Portrait (9:16)-W 720 -H 1280Wide banner-W 2048 -H 1024
Add quality keywords for better output: "4K", "cinematic", "professional photography", "dramatic lighting", "shallow depth of field".
Specify a style: "oil painting", "watercolor", "anime", "pixel art", "minimalist vector".
Requires MODELSCOPE_API_KEY. If the user hasn't set it, guide them:
export MODELSCOPE_API_KEY="ms-..."For Claude Code users, add to ~/.claude/settings.json under "env".
SymptomCause & fix401 UnauthorizedToken is from modelscope.cn (wrong site) — must use modelscope.ai. Or Alibaba Cloud account not bound.Timeout after 150sAPI under load — retry in a minuteContent moderationRephrase the prompt — Alibaba's filter blocked it