π¦ ClawHub
Qwen Skill
by @huiya-code
Generate and edit images with Qwen Image via DashScope API. This is a skill, not a callable tool. First use the read tool to open this SKILL.md, then run the...
βοΈ Configuration
Install dependencies:
pip3 install -r {baseDir}/requirements.txt
Set API key:
export DASHSCOPE_API_KEY="your_api_key"
Optional region switch:
export DASHSCOPE_REGION="sg" # sg or bj
Or use .env (auto-loaded from current directory, then {baseDir}):
cat > .env <<'EOF'
DASHSCOPE_API_KEY=your_api_key
DASHSCOPE_REGION=sg
OPENCLAW_MEDIA_OUTBOUND_DIR=~/.openclaw/media/outbound
OPENCLAW_MEDIA_BASE_URL=
EOF
Static URL mapping example (Nginx):
location /gen/ {
alias /home/huiya/.openclaw/media/outbound/;
autoindex off;
}
π Tips & Best Practices
qwen-image-2.0-pro (quality first). qwen-image-2.0 can be used for faster/cheaper runs.data:image/...;base64,....--out-dir.OPENCLAW_MEDIA_OUTBOUND_DIR (default: ~/.openclaw/media/outbound)..view.html preview pages and uses those URLs in visible text to reduce markdown-image rewrites.OPENCLAW_MEDIA_BASE_URL is optional. Keep it empty for portable packaging; set it per deployment only when you need public links (e.g. https://example.com/gen or local http://127.0.0.1:8090).--emit-media-ref + final one-line MEDIA: reply is recommended for Feishu to avoid duplicate media sends.--reply-format link..env values.InvalidApiKey.TERMINAL
clawhub install qwen-skill