aliyun-cosyvoice-voice…
Use when creating cloned voices with Alibaba Cloud Model Studio CosyVoice customization models, especially cosyvoice-v3.5-plus or…
Use when generating or editing images with DashScope Wan 2.7 image models (wan2.7-image, wan2.7-image-pro). Use when implementing text-to-image, image editing, interactive editing with bounding boxes, sequential group image generation, or color palette control via the
$ npx -y skills add cinience/alicloud-skills --skill aliyun-wan-image --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/aliyun-wan-imageContext preview
The summary Claude sees to decide when to auto-load this skill.
Use when generating or editing images with DashScope Wan 2.7 image models (wan2.7-image, wan2.7-image-pro). Use when implementing text-to-image, image editing, interactive editing with bounding boxes, sequential group image generation, or color palette control via the
name: aliyun-wan-image description: Use when generating or editing images with DashScope Wan 2.7 image models (wan2.7-image, wan2.7-image-pro). Use when implementing text-to-image, image editing, interactive editing with bounding boxes, sequential group image generation, or color palette control via the multimodal-generation API.
mkdir -p output/aliyun-wan-image python -m py_compile skills/ai/image/aliyun-wan-image/scripts/generate_image.py && echo "py_compile_ok" > output/aliyun-wan-image/validate.txt
Pass criteria: command exits 0 and `output/aliyun-wan-image/validate.txt` is generated.
python3 -m venv .venv . .venv/bin/activate python -m pip install dashscope
| Capability | Description | |---|---| | Text-to-image | Generate images from text prompts | | Image editing | Edit images with text instructions (1-9 input images) | | Interactive editing | Edit specific regions via bounding boxes (`bbox_list`) | | Group generation | Generate consistent multi-image sequences (`enable_sequential=true`, up to 12 images) | | Color palette | Control color theme with custom hex+ratio palette (3-10 colors) | | Thinking mode | Enhanced reasoning for better quality (text-to-image only) |
**Sync (recommended):**
POST https://dashscope.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation
**Async (for long tasks):**
POST https://dashscope.aliyuncs.com/api/v1/services/aigc/image-generation/generation Header: X-DashScope-Async: enable
import os
from dashscope.aigc.image_generation import ImageGeneration
def generate_image(req: dict) -> dict:
messages = [
{
"role": "user",
"content": [{"text": req["prompt"]}],
}
]
# Add reference images if provided
ref_images = req.get("reference_images") or []
if req.get("reference_image"):
ref_images = [req["reference_image"]] + ref_images
for img in ref_images:
messages[0]["content"].append({"image": img})
params = {
"model": req.get("model", "wan2.7-image"),
"messages": messages,
"size": req.get("size", "2K"),
"n": req.get("n", 1),
"api_key": os.getenv("DASHSCOPE_API_KEY"),
"seed": req.get("seed"),
"watermark": req.get("watermark", False),
}
if req.get("enable_sequential"):
params["enable_sequential"] = True
if req.get("thinking_mode") is not None:
params["thinking_mode"] = req["thinking_mode"]
if req.get("bbox_list"):
params["bbox_list"] = req["bbox_list"]
if req.get("color_palette"):
params["color_palette"] = req["color_palette"]
response = ImageGeneration.call(**params)
content = response.output["choices"][0]["message"]["content"]
images = [item["image"] for item in content if isinstance(item, dict) and item.get("image")]
return {
"image_urls": images,
"image_count": response.usage.get("image_count"),
"size": response.usage.get("size"),
}| Model | Supported sizes | Default | |---|---|---| | wan2.7-image-pro | 1K, 2K, 4K (text-to-image only), or [768, 4096] px | 2K | | wan2.7-image | 1K, 2K, or [768, 2048] px | 2K |
| Error | Likely cause | Action | |---|---|---| | 401/403 | Missing or invalid `DASHSCOPE_API_KEY` | Check env var or credentials file. | | 400 `InvalidParameter` | Unsupported size, bad n value, or missing required image | Validate parameters against model limits. | | 429 | Rate limit or quota | Retry with backoff. |
1) Confirm user intent: text-to-image, image editing, group generation, or interactive editing. 2) Select appropriate model (pro for 4K or higher quality, standard for speed). 3) Execute with explicit parameters and bounded scope. 4) Download and save generated images before URL expiration.
Use when creating cloned voices with Alibaba Cloud Model Studio CosyVoice customization models, especially cosyvoice-v3.5-plus or…
Use when designing custom voices with Alibaba Cloud Model Studio CosyVoice customization models, especially cosyvoice-v3.5-plus…
Use when low-latency realtime speech recognition is needed with Alibaba Cloud Model Studio Qwen ASR Realtime models, including…
Use when transcribing non-realtime speech with Alibaba Cloud Model Studio Qwen ASR models (`qwen3-asr-flash`, `qwen-audio-asr`,…
Use when live speech translation is needed with Alibaba Cloud Model Studio Qwen LiveTranslate models, including bilingual…
Use when real-time speech synthesis is needed with Alibaba Cloud Model Studio Qwen TTS Realtime models. Use when low-latency…