
Alicloud Ai Video Wan R2v
- 272 installs
- 396 repo stars
- Updated July 18, 2026
- cinience/alicloud-skills
alicloud-ai-video-wan-r2v is a version 1.0.0 agent skill that connects Alibaba Cloud Wan reference-to-video models to applications for developers who need multi-shot videos from reference images or clips with consistent
About
alicloud-ai-video-wan-r2v is a version 1.0.0 Cinience agent skill for Alibaba Cloud Model Studio Wan reference-to-video (R2V) generation—distinct from single-image i2v flows. It supports two exact model strings, wan2.6-r2v-flash for lower latency and wan2.6-r2v, via the dashscope Python SDK with DASHSCOPE_API_KEY authentication. The normalized video.generate_reference interface accepts prompt, reference_video, optional reference_image, duration, fps, size, and seed, returning video_url and task_id for async jobs. Developers reach for this skill when building products or agents that create video from reference material while preserving character style across shots. A prepare_r2v_request.py helper validates request JSON, async polling runs at 15–20 second intervals until SUCCEEDED, and outputs land in output/aliyun-wan-r2v/videos/. Validation uses py_compile on bundled scripts with evidence snapshots saved for reproducibility.
- WAN reference-to-video API setup
- Async job submit and polling
- Reference media upload patterns
- Generated clip retrieval
- Pipeline hook examples
Alicloud Ai Video Wan R2v by the numbers
- 272 all-time installs (skills.sh)
- Ranked #534 of 1,335 Generative Media skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/cinience/alicloud-skills --skill alicloud-ai-video-wan-r2vAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 272 |
|---|---|
| repo stars | ★ 396 |
| Last updated | July 18, 2026 |
| Repository | cinience/alicloud-skills ↗ |
How do you generate video from reference clips on Alibaba Cloud?
Connect Alibaba Cloud WAN reference-to-video generation into products or agents that create video from reference images, clips, or prompts using managed generative APIs.
Who is it for?
Developers integrating Alibaba Wan R2V into agents or content pipelines that need style-consistent video from reference images or clips.
Skip if: Single-image-to-video without reference material should use aliyun-wan-i2v or aliyun-wan-video skills instead of R2V.
When should I use this skill?
User needs reference-to-video generation with Wan models, character style preservation, or multi-shot video from reference media.
What you get
Normalized R2V request JSON, async task_id, polled video_url, and evidence files under output/aliyun-wan-r2v/.
- Normalized R2V request JSON
- Generated video_url output
- Polling evidence in output/aliyun-wan-r2v/
By the numbers
- Version 1.0.0 skill supporting 2 Wan R2V model strings
- Async polling at 15-20 second intervals until terminal status
Files
Category: provider
Model Studio Wan R2V
Validation
mkdir -p output/alicloud-ai-video-wan-r2v
python -m py_compile skills/ai/video/alicloud-ai-video-wan-r2v/scripts/prepare_r2v_request.py && echo "py_compile_ok" > output/alicloud-ai-video-wan-r2v/validate.txtPass criteria: command exits 0 and output/alicloud-ai-video-wan-r2v/validate.txt is generated.
Output And Evidence
- Save reference input metadata, request payloads, and task outputs in
output/alicloud-ai-video-wan-r2v/. - Keep at least one polling result snapshot.
Use Wan R2V for reference-to-video generation. This is different from i2v (single image to video).
Critical model names
Use one of these exact model strings:
wan2.6-r2v-flashwan2.6-r2v
Newer official releases may prefer the flash variant for lower latency and lower cost.
Prerequisites
- Install SDK in a virtual environment:
python3 -m venv .venv
. .venv/bin/activate
python -m pip install dashscope- Set
DASHSCOPE_API_KEYin your environment, or adddashscope_api_keyto~/.alibabacloud/credentials.
Normalized interface (video.generate_reference)
Request
prompt(string, required)reference_video(string | bytes, required)reference_image(string | bytes, optional)duration(number, optional)fps(number, optional)size(string, optional)seed(int, optional)
Response
video_url(string)task_id(string, when async)request_id(string)
Async handling
- Prefer async submission for production traffic.
- Poll task result with 15-20s intervals.
- Stop polling when
SUCCEEDEDor terminal failure status is returned.
Local helper script
Prepare a normalized request JSON and validate response schema:
.venv/bin/python skills/ai/video/alicloud-ai-video-wan-r2v/scripts/prepare_r2v_request.py \
--prompt "Generate a short montage with consistent character style" \
--reference-video "https://example.com/reference.mp4"Output location
- Default output:
output/alicloud-ai-video-wan-r2v/videos/ - Override base dir with
OUTPUT_DIR.
Workflow
1) Confirm user intent, region, identifiers, and whether the operation is read-only or mutating. 2) Run one minimal read-only query first to verify connectivity and permissions. 3) Execute the target operation with explicit parameters and bounded scope. 4) Verify results and save output/evidence files.
References
references/sources.md
interface:
display_name: "Alibaba Cloud AI Video Wan R2V"
short_description: "Wan reference-to-video workflows"
default_prompt: "Use $alicloud-ai-video-wan-r2v to complete this ai/video reference-based generation task on Alibaba Cloud."
- https://help.aliyun.com/zh/model-studio/wan-video-to-video-api-reference
- https://help.aliyun.com/zh/model-studio/newly-released-models
- https://help.aliyun.com/zh/model-studio/reference-to-video
- https://help.aliyun.com/zh/model-studio/models
#!/usr/bin/env python3
"""Prepare and validate normalized request/response for Wan R2V."""
from __future__ import annotations
import argparse
import json
import sys
from pathlib import Path
def _load_json(path: str) -> dict:
return json.loads(Path(path).read_text(encoding="utf-8"))
def main() -> None:
parser = argparse.ArgumentParser(description="Prepare video.generate_reference request and validate response shape")
parser.add_argument("--prompt", required=True)
parser.add_argument("--reference-video", required=True)
parser.add_argument("--reference-image")
parser.add_argument("--duration", type=float)
parser.add_argument("--fps", type=float)
parser.add_argument("--size")
parser.add_argument("--seed", type=int)
parser.add_argument("--output", default="output/ai-video-wan-r2v/request.json")
parser.add_argument("--validate-response", help="Path to JSON response file")
args = parser.parse_args()
req = {
"prompt": args.prompt,
"reference_video": args.reference_video,
}
if args.reference_image:
req["reference_image"] = args.reference_image
if args.duration is not None:
req["duration"] = args.duration
if args.fps is not None:
req["fps"] = args.fps
if args.size:
req["size"] = args.size
if args.seed is not None:
req["seed"] = args.seed
out = Path(args.output)
out.parent.mkdir(parents=True, exist_ok=True)
out.write_text(json.dumps(req, ensure_ascii=False, indent=2), encoding="utf-8")
result = {"ok": True, "request_path": str(out)}
if args.validate_response:
resp = _load_json(args.validate_response)
if "video_url" not in resp and "task_id" not in resp:
print(json.dumps({"ok": False, "error": "missing video_url and task_id"}, ensure_ascii=False))
sys.exit(1)
result["response_valid"] = True
print(json.dumps(result, ensure_ascii=False))
if __name__ == "__main__":
main()
Related skills
How it compares
Use alicloud-ai-video-wan-r2v when reference clips or images drive style; choose aliyun-wan-i2v for single-image-to-video without reference material.
FAQ
Which models does alicloud-ai-video-wan-r2v support?
alicloud-ai-video-wan-r2v supports two exact Wan R2V model strings: wan2.6-r2v-flash for lower latency and cost, and wan2.6-r2v for the standard reference-to-video endpoint.
How is alicloud-ai-video-wan-r2v different from i2v?
alicloud-ai-video-wan-r2v handles reference-to-video from reference video or image material for multi-shot style consistency, while i2v generates video from a single still image without reference clips.
How do you handle async results in alicloud-ai-video-wan-r2v?
alicloud-ai-video-wan-r2v prefers async submission, polling dashscope task endpoints every 15-20 seconds until task_status returns SUCCEEDED, then downloads output.video_url.