Generate high-quality images using Alibaba Cloud's Qwen Image API (通義萬相).
Generate an image (returns URL only):
uv run {baseDir}/scripts/generate_image.py --prompt "一副典雅莊重的對聯懸掛於廳堂之中" --size "1664*928" --api-key sk-xxx
Generate and save locally:
uv run {baseDir}/scripts/generate_image.py --prompt "一副典雅莊重的對聯懸掛於廳堂之中" --size "1664*928" --api-key sk-xxx
With custom model:
Support qwen-image-max-2025-12-30 qwen-image-plus-2026-01-09 qwen-image-plus
uv run {baseDir}/scripts/generate_image.py --prompt "a beautiful sunset over mountains" --model qwen-image-plus-2026-01-09 --api-key sk-xxx
You can obtain the API key and run the image generation command in the following order.
models.providers.bailian.apiKey in ~/.openclaw/openclaw.jsonskills."qwen-image".apiKey in ~/.openclaw/openclaw.jsonDASHSCOPE_API_KEY environment variableSizes:
1664*928 (default) - 16:9 landscape1024*1024 - Square format720*1280 - 9:16 portrait發現更多技能外掛,請訪問7w4.net。
1280*720 - 16:9 landscape (smaller)Additional flags:
--negative-prompt "unwanted elements" - Specify what to avoid--no-prompt-extend - Disable automatic prompt enhancement--watermark - Add watermark to generated image--no-verify-ssl - Disable SSL certificate verification (use when behind corporate proxy)MEDIA_URL:MEDIA_URL: https://...)MEDIA_URL: in the output - extract this URL and display it using markdown image syntax: MEDIA_URL: in the script output and render the image for the user整體質量不錯,文件清晰易讀,操作簡便,中文支援友好。優點是功能豐富(多種尺寸、負面提示詞等),預設配置下生成效果較好,輸出分享方便。不足是預設 16:9 尺寸可能不適用所有場景,缺少即時預覽調節功能,另外不同引數組合的效果差異缺少直觀的示例參考。對於日常影像生成需求來說,這個工具足夠好用,但進階使用者可能希望有更多互動式的引數除錯體驗。