aliyun-cosyvoice-voice…
Use when creating cloned voices with Alibaba Cloud Model Studio CosyVoice customization models, especially cosyvoice-v3.5-plus or…
Use when editing videos with DashScope Wan 2.7 video editing model (wan2.7-videoedit). Use when implementing video style transfer, instruction-based video editing with optional reference images, or video content modification via the video-synthesis async API.
$ npx -y skills add cinience/alicloud-skills --skill aliyun-wan-videoedit --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/aliyun-wan-videoeditContext preview
The summary Claude sees to decide when to auto-load this skill.
Use when editing videos with DashScope Wan 2.7 video editing model (wan2.7-videoedit). Use when implementing video style transfer, instruction-based video editing with optional reference images, or video content modification via the video-synthesis async API.
name: aliyun-wan-videoedit description: Use when editing videos with DashScope Wan 2.7 video editing model (wan2.7-videoedit). Use when implementing video style transfer, instruction-based video editing with optional reference images, or video content modification via the video-synthesis async API.
mkdir -p output/aliyun-wan-videoedit python -m py_compile skills/ai/video/aliyun-wan-videoedit/scripts/edit_video.py && echo "py_compile_ok" > output/aliyun-wan-videoedit/validate.txt
Pass criteria: command exits 0 and `output/aliyun-wan-videoedit/validate.txt` is generated.
python3 -m venv .venv . .venv/bin/activate python -m pip install dashscope
| Capability | Description | Required media | |---|---|---| | Style transfer | Convert video to a different visual style (clay, anime, etc.) | `video` only | | Instruction editing | Edit video content with text instructions and optional reference images | `video` + optional `reference_image` (up to 3) |
POST https://dashscope.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis
Required headers:
Singapore endpoint: replace `dashscope.aliyuncs.com` with `dashscope-intl.aliyuncs.com`.
**Video** (type=video):
**Reference images** (type=reference_image):
| Resolution | Ratio | Output (W*H) | |---|---|---| | 720P | 16:9 | 1280*720 | | 720P | 9:16 | 720*1280 | | 720P | 1:1 | 960*960 | | 720P | 4:3 | 1104*832 | | 720P | 3:4 | 832*1104 | | 1080P | 16:9 | 1920*1080 | | 1080P | 9:16 | 1080*1920 | | 1080P | 1:1 | 1440*1440 | | 1080P | 4:3 | 1648*1248 | | 1080P | 3:4 | 1248*1648 |
import os
import json
import time
import requests
API_KEY = os.getenv("DASHSCOPE_API_KEY")
BASE_URL = "https://dashscope.aliyuncs.com/api/v1"
def create_videoedit_task(req: dict) -> str:
"""Create a video editing task and return task_id."""
payload = {
"model": "wan2.7-videoedit",
"input": {
"prompt": req.get("prompt", ""),
"media": req["media"],
},
"parameters": {
"resolution": req.get("resolution", "1080P"),
"prompt_extend": req.get("prompt_extend", True),
"watermark": req.get("watermark", False),
},
}
if req.get("negative_prompt"):
payload["input"]["negative_prompt"] = req["negative_prompt"]
if req.get("ratio"):
payload["parameters"]["ratio"] = req["ratio"]
if req.get("duration"):
payload["parameters"]["duration"] = req["duration"]
if req.get("audio_setting"):
payload["parameters"]["audio_setting"] = req["audio_setting"]
if req.get("seed") is not None:
payload["parameters"]["seed"] = req["seed"]
resp = requests.post(
f"{BASE_URL}/services/aigc/video-generation/video-synthesis",
headers={
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json",
"X-DashScope-Async": "enable",
},
json=payload,
)
resp.raise_for_status()
data = resp.json()
return data["output"]["task_id"]
def poll_task(task_id: str, interval: int = 15) -> dict:
"""Poll until task completes. Returns final response."""
while True:
resp = requests.get(
f"{BASE_URL}/tasks/{task_id}",
headers={"Authorization": f"Bearer {API_KEY}"},
)
resp.raise_for_status()
data = resp.json()
status = data["output"]["task_status"]
if status in ("SUCCEEDED", "FAILED", "CANCELED"):
return data
time.sleeUse 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…