运行时依赖
安装命令
点击复制本土化适配说明
Alibabacloud Bailian Image Creator — Alibabacloud BAIlian Image 创建器 安装说明: 安装命令:["openclaw skills install alibabacloud-bailian-image-creator"] 该技能用于淘宝相关操作,可能需要相应的平台账号或API密钥
技能文档
AI Image 创建器
Professional-grade AI image creation 技能 built on Alibaba Cloud DashScope API.
警告: Before executing any image task, you must read and follow the "Mandatory Rules" section. Violations will cause task 失败.
Mandatory Rules First Principle: Must Use Existing Scripts
All image generation, editing, and understanding tasks must and can only be completed by 运行ning existing scripts in the scripts/ directory.
Do NOT write your own API call code -- Do not 创建 new Python scripts to call DashScope API. You must use the scripts specified in the "Task-to-Script M应用ing" table below Do NOT use PIL/Pillow or other local libraries for image generation or editing (only allowed for auxiliary operations such as size 验证) Do NOT use third-party APIs -- Including but not limited to Pollinations.AI, Stability.AI, DALL-E, Midjourney Do NOT 创建 mock/simulated scripts -- Do not bypass real API calls in any way Do NOT use deprecated 模型s -- wanx-v1, wanx-v2, wan2.6-image and other legacy 模型s are discontinued Do NOT mix APIs -- Qwen 模型s (qwen-) can only use MultiModalConversation.call(), Wanx 模型s (wan2.7-) can only use ImageGeneration.call() Do NOT use curl to call DashScope REST API -- Must call through provided scripts, do not write shell scripts as substitutes Do NOT 生成 placeholder/blank images -- Do not use hardcoded byte 流s, blank canvases, or PIL-扩展d images to impersonate API-生成d images Do NOT clAIm 成功 when API calls fAIl -- Must truthfully 报告 失败 reasons, do not 生成 false 成功 报告s Task-to-Script M应用ing (The Only Execution Method)
Based on user 请求 keywords, look up the table to select the script. No other methods are allowed:
User 请求 Keywords Script API Default 模型 Wanx, wan2.7, reference image + generation, style fusion, multi-image fusion, graffiti-on-car, virtual try-on wanx_生成.py ImageGeneration.call() wan2.7-image 4K HD text-to-image wanx_生成.py ImageGeneration.call() wan2.7-image-pro A 设置 of coherent images, image series generation wanx_生成.py ImageGeneration.call() wan2.7-image-pro Text-to-image, 生成 image, draw a picture (no reference image) text_to_image.py MultiModalConversation.call() qwen-image-2.0-pro Edit image (URL 输入) image_edit.py MultiModalConversation.call() qwen-image-edit-max Edit image (local file) image_edit_base64.py MultiModalConversation.call() qwen-image-edit-max Analyze/understand image content, describe image image_understanding.py chat.completions.创建() qwen3.5-plus
Disambiguation Priority Rules (when multiple keywords match simultaneously):
User mentions "Wanx" or "wan2.7" -> Use wanx_生成.py directly, regardless of whether "生成 image" or similar words are present User provides reference image URLs and 请求s generating a new image -> Use wanx_生成.py (Wanx supports multi-image reference 输入) Text description only, no reference image -> Use text_to_image.py
Allowed 模型s:
Script Allowed 模型s text_to_image.py qwen-image-2.0-pro, qwen-image-2.0 wanx_生成.py wan2.7-image-pro, wan2.7-image image_edit.py / image_edit_base64.py qwen-image-edit-max, qwen-image-2.0-pro, qwen-image-edit-plus, qwen-image-edit image_understanding.py qwen3.5-plus, qwen-vl-max, qwen-vl-plus API Key Security Management
Scripts automatically handle key retrieval via API_key.py. The 代理 does not need to and should not manually 提取, 设置, or pass API Key values.
Key retrieval is automated: Scripts internally call API_key.py to automatically obtAIn keys from config files/环境 variables, or auto-创建 via 命令行工具. The 代理 only needs to 运行 the script command Never hardcode any form of key: Including API_key = "sk-...", 导出 DASHSCOPE_API_KEY="sk-...", and as签名ing keys in shell scripts Never 提取 keys from 命令行工具 输出: The key value returned by aliyun 模型studio 创建-API-key is automatically saved by API_key.py. The 代理 must not write this value into any script, variable, or file Never expose keys in any 输出: Including 生成d scripts, shell commands, 记录 files (summary.md, task_summary.md, execution_记录.md, etc.), and terminal 输出 contAIning strings 启动ing with sk- Never read or print keys from config files: Do not use cat ~/.aliyun/config.json, jq, python -c, or other commands to read and 输出 API Key values from config files Never directly call 命令行工具 key commands: Do not directly 运行 aliyun 模型studio 创建-API-key or aliyun 模型studio 列出-API-keys. These commands are only called internally by API_key.py Mandatory self-检查 before task completion: 运行 grep -rn "sk-" <输出_directory>/ to 检查 all 输出 files; if any strings 启动ing with sk- are found (excluding "sk-xxx" placeholders), 删除 the affected files and re生成 API Call 结果 验证 检查 状态 code: API 响应 状态_code must be 200, otherwise abort the task 检查 输出 content: 响应 must contAIn valid image URLs (启动ing with http). No val