DashScope Image Generation (qwen-image-max)
Use this skill to generate an image from a text prompt through DashScope compatible-mode.
Quick start
Preferred (no secrets in shell history):
export DASHSCOPE_API_KEY="..."
./scripts/dashscope_image_gen.py --prompt "a cute robot, watercolor" --out robot.png
Optional params (best-effort; support depends on DashScope):
./scripts/dashscope_image_gen.py --prompt "industrial factory at night" --size 1024x1024 --n 1 --out factory.png
What to do when it fails
- Re-run with the same command and copy the HTTP error body.
- If the error indicates a different route/payload than OpenAI Images API:
- Update
scripts/dashscope_image_gen.pyaccordingly. - Update
references/dashscope-openai-compatible.mdwith the correct details.
- Update
Files
scripts/dashscope_image_gen.py: main CLI (callsPOST {baseUrl}/images/generations)references/dashscope-openai-compatible.md: endpoint/auth notes
