qwencloud-video-generation

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
Agent setup: If your agent doesn't auto-load skills (e.g. Claude Code), see agent-compatibility.md once per session.
Agent设置: 如果你的Agent不会自动加载技能(例如Claude Code),每个会话首次使用时请查看agent-compatibility.md

Qwen Video Generation

Qwen视频生成

Generate videos using Wan models. All tasks are asynchronous — submit, then poll until completion. This skill is part of qwencloud/qwencloud-ai.
⚠️ Critical Parameter Differences by Mode:
  • kf2v (First+Last Frame): Duration is fixed at 5 seconds — other values will fail. Output is silent only.
  • Resolution parameter varies: t2v/r2v/vace use
    size
    (e.g.
    "1280*720"
    ); i2v/kf2v use
    resolution
    (e.g.
    "720P"
    ).
使用Wan模型生成视频,所有任务都是异步的——提交后需要轮询直到任务完成。 该技能属于 qwencloud/qwencloud-ai 的一部分。
⚠️ 不同模式的核心参数差异:
  • kf2v(首尾帧模式): 时长固定为5秒——其他值会请求失败,输出仅无音频版本
  • 分辨率参数差异: t2v/r2v/vace使用
    size
    参数(例如
    "1280*720"
    );i2v/kf2v使用
    resolution
    参数(例如
    "720P"
    )。

Skill directory

技能目录

Use this skill's internal files to execute and learn. Load reference files on demand when the default path fails or you need details.
LocationPurpose
scripts/video.py
Default execution — mode auto-detect, submit, poll, download
references/execution-guide.md
Fallback: curl for all 5 modes, code generation
references/request-fields.md
Field tables and audio handling by mode
references/workflows.md
Duration extensions, multi-shot, VACE pipelines
references/polling-guide.md
Polling patterns and timing
references/merge-media.md
Concat, trim, audio overlay — ffmpeg/moviepy recipes
references/prompt-guide.md
Per-mode prompt formulas, sound description, multi-shot structure
references/examples.md
Full script examples per mode
references/sources.md
Official documentation URLs
references/agent-compatibility.md
Agent self-check: register skills in project config for agents that don't auto-load
使用该技能的内部文件执行操作和查阅说明,当默认路径失效或需要详细信息时按需加载参考文件。
路径用途
scripts/video.py
默认执行脚本——自动检测模式、提交任务、轮询状态、下载结果
references/execution-guide.md
备选方案:所有5种模式的curl调用方法、代码生成说明
references/request-fields.md
不同模式的请求字段表和音频处理说明
references/workflows.md
时长延长、多镜头、VACE流程说明
references/polling-guide.md
轮询规则和时间间隔建议
references/merge-media.md
拼接、裁剪、音频叠加——ffmpeg/moviepy使用指南
references/prompt-guide.md
分模式的prompt编写公式、音效描述、多镜头结构说明
references/examples.md
各模式的完整脚本示例
references/sources.md
官方文档链接
references/agent-compatibility.md
Agent自检指南:为不会自动加载技能的Agent在项目配置中注册技能

Security

安全说明

NEVER output any API key or credential in plaintext. Always use variable references (
$DASHSCOPE_API_KEY
in shell,
os.environ["DASHSCOPE_API_KEY"]
in Python). Any check or detection of credentials must be non-plaintext: report only status (e.g. "set" / "not set", "valid" / "invalid"), never the value. Never display contents of
.env
or config files that may contain secrets.
When the API key is not configured, NEVER ask the user to provide it directly. Instead, help create a
.env
file with a placeholder (
DASHSCOPE_API_KEY=sk-your-key-here
) and instruct the user to replace it with their actual key from the QwenCloud Console. Only write the actual key value if the user explicitly requests it.
绝对不要明文输出任何API密钥或凭证。 始终使用变量引用(Shell中用
$DASHSCOPE_API_KEY
,Python中用
os.environ["DASHSCOPE_API_KEY"]
)。任何凭证检查都必须不暴露明文:仅返回状态(例如“已设置”/“未设置”、“有效”/“无效”),绝不返回具体值。绝对不要展示可能包含密钥的
.env
或配置文件内容。
当API密钥未配置时,绝对不要直接要求用户提供密钥。 而是帮助创建带有占位符的
.env
文件(
DASHSCOPE_API_KEY=sk-your-key-here
),并指导用户从QwenCloud控制台获取实际密钥替换占位符。仅当用户明确要求时才写入实际密钥值。

Key Compatibility

密钥兼容性说明

Scripts require a standard QwenCloud API key (
sk-...
). Coding Plan keys (
sk-sp-...
) cannot be used — video generation models are not available on Coding Plan, and Coding Plan does not support the native QwenCloud API. Video generation incurs per-second charges on standard keys. The script detects
sk-sp-
keys at startup and prints a warning. If qwencloud-ops-auth is installed, see its
references/codingplan.md
for full details.
脚本需要标准QwenCloud API密钥
sk-...
格式)。编程计划密钥(
sk-sp-...
格式)无法使用——编程计划不支持视频生成模型,也不兼容原生QwenCloud API。视频生成按秒在标准密钥上扣费,脚本启动时会自动检测
sk-sp-
格式的密钥并输出警告。如果安装了qwencloud-ops-auth,可查看其
references/codingplan.md
获取完整说明。

Mode Selection Guide

模式选择指南

User WantModeKey Field
Generate video from text description onlyt2v
prompt
only
Animate a single imagei2v
img_url
or
reference_image
Transition between two images (⚠️ 5s fixed, silent only)kf2v
first_frame_url
+
last_frame_url
Role-play: make characters act a new scriptr2v
reference_urls
(up to 5)
Video editing: multi-image ref, repainting, local edit, extend, outpaintvace
function
用户需求模式核心字段
仅通过文本描述生成视频t2v仅需
prompt
让单张图片动起来i2v
img_url
reference_image
在两张图片之间生成过渡动画(⚠️ 固定5秒,仅无音频kf2v
first_frame_url
+
last_frame_url
角色扮演:让指定角色按照新脚本表演r2v
reference_urls
(最多5个)
视频编辑:多图参考、重绘、局部编辑、时长延长、外绘vace
function

Model Selection

模型选择

  1. User specified a model → use directly.
  2. Consult the qwencloud-model-selector skill when model choice depends on capability, scenario, or pricing.
  3. No signal, clear task → per-mode defaults: t2v →
    wan2.6-t2v
    , i2v →
    wan2.6-i2v-flash
    , kf2v →
    wan2.2-kf2v-flash
    , r2v →
    wan2.6-r2v-flash
    , vace →
    wan2.1-vace-plus
    .
  1. 用户指定了模型 → 直接使用。
  2. 当模型选择需要参考能力、场景或定价时 → 调用qwencloud-model-selector技能查询。
  3. 无特殊要求、任务明确 → 各模式默认模型:t2v →
    wan2.6-t2v
    ,i2v →
    wan2.6-i2v-flash
    ,kf2v →
    wan2.2-kf2v-flash
    ,r2v →
    wan2.6-r2v-flash
    ,vace →
    wan2.1-vace-plus

Models

模型列表

t2v (Text-to-Video)

t2v(文生视频)

ModelFeatures
wan2.6-t2v
recommended
Audio, multi-shot, 2–15s, 720P/1080P
wan2.5-t2v-preview
Audio, 5s/10s, 480P/720P/1080P
wan2.2-t2v-plus
Silent, 5s, 480P/1080P
模型特性
wan2.6-t2v
推荐
支持音频、多镜头、2–15秒、720P/1080P
wan2.5-t2v-preview
支持音频、5秒/10秒、480P/720P/1080P
wan2.2-t2v-plus
无音频、5秒、480P/1080P

i2v (Image-to-Video)

i2v(图生视频)

ModelFeatures
wan2.6-i2v-flash
recommended
Audio/silent, multi-shot, 2–15s, 720P/1080P
wan2.6-i2v
Audio, multi-shot, 2–15s, 720P/1080P
wan2.5-i2v-preview
Audio, 5s/10s, 480P/720P/1080P
模型特性
wan2.6-i2v-flash
推荐
支持音频/无音频、多镜头、2–15秒、720P/1080P
wan2.6-i2v
支持音频、多镜头、2–15秒、720P/1080P
wan2.5-i2v-preview
支持音频、5秒/10秒、480P/720P/1080P

kf2v / r2v / vace

kf2v / r2v / vace

ModelFeatures
wan2.2-kf2v-flash
(kf2v default)
Silent, 5s, 480P/720P/1080P
wan2.6-r2v
Audio, single/multi character, 2–10s, 720P/1080P
wan2.6-r2v-flash
(r2v default)
Audio/silent, multi-character, 2–10s, 720P/1080P
wan2.1-vace-plus
(vace)
Multi-image ref, repainting, local edit, ≤5s, 720P
⚠️ Important: The model list above is a point-in-time snapshot and may be outdated. Model availability changes frequently. Always check the official model list for the authoritative, up-to-date catalog before making model decisions.
模型特性
wan2.2-kf2v-flash
(kf2v默认)
无音频、5秒、480P/720P/1080P
wan2.6-r2v
支持音频、单/多角色、2–10秒、720P/1080P
wan2.6-r2v-flash
(r2v默认)
支持音频/无音频、多角色、2–10秒、720P/1080P
wan2.1-vace-plus
(vace默认)
多图参考、重绘、局部编辑、≤5秒、720P
⚠️ 重要提示: 上述模型列表是当前时间点的快照,可能已过时。模型可用性会频繁更新,在选择模型前请务必查阅官方模型列表获取权威、最新的目录

Execution

执行说明

⚠️ Multiple artifacts: When generating multiple files in a single session, you MUST append a numeric suffix to each filename (e.g.
out_1.mp4
,
out_2.mp4
) to prevent overwrites.
⚠️ 多文件生成: 单会话生成多个文件时,必须为每个文件名添加数字后缀(例如
out_1.mp4
out_2.mp4
)避免覆盖。

Prerequisites

前置要求

  • API Key: Check that
    DASHSCOPE_API_KEY
    (or
    QWEN_API_KEY
    ) is set using a non-plaintext check only (e.g. in shell:
    [ -n "$DASHSCOPE_API_KEY" ]
    ; report only "set" or "not set", never the key value). If not set: run the * qwencloud-ops-auth* skill if available; otherwise guide the user to obtain a key from QwenCloud Console and set it via
    .env
    file (
    echo 'DASHSCOPE_API_KEY=sk-your-key-here' >> .env
    in project root or current directory) or environment variable. The script searches for
    .env
    in the current working directory and the project root. Skills may be installed independently — do not assume qwencloud-ops-auth is present.
  • Python 3.9+ (stdlib only, no pip install needed)
  • For media merging (concat, trim, audio overlay): see merge-media.md for ffmpeg/moviepy recipes suited to the user's environment
  • API密钥: 仅通过非明文方式检查
    DASHSCOPE_API_KEY
    (或
    QWEN_API_KEY
    )是否已设置(例如Shell中用
    [ -n "$DASHSCOPE_API_KEY" ]
    ;仅返回“已设置”或“未设置”,绝不返回密钥值)。如果未设置:如果有qwencloud-ops-auth技能则运行该技能;否则指导用户从QwenCloud控制台获取密钥,并通过
    .env
    文件设置(在项目根目录或当前目录执行
    echo 'DASHSCOPE_API_KEY=sk-your-key-here' >> .env
    )或环境变量设置。脚本会在当前工作目录和项目根目录搜索
    .env
    文件。技能可能独立安装,不要默认qwencloud-ops-auth已存在。
  • Python 3.9+(仅需标准库,无需pip安装依赖
  • 媒体合并需求(拼接、裁剪、音频叠加):查看merge-media.md获取适配用户环境的ffmpeg/moviepy使用指南

Environment Check

环境检查

Before first execution, verify Python is available:
bash
python3 --version  # must be 3.9+
If
python3
is not found, try
python --version
or
py -3 --version
. If Python is unavailable or below 3.9, skip to Path 2 (curl) in execution-guide.md.
首次执行前,验证Python是否可用:
bash
python3 --version  # 必须为3.9+
如果找不到
python3
,尝试
python --version
py -3 --version
。如果Python不可用或版本低于3.9,跳转至execution-guide.md中的路径2(curl)

Default: Run Script

默认方式:运行脚本

Script path: Scripts are in the
scripts/
subdirectory of this skill's directory (the directory containing this SKILL.md). You MUST first locate this skill's installation directory, then ALWAYS use the full absolute path to execute scripts. Do NOT assume scripts are in the current working directory. Do NOT use
cd
to switch directories before execution.
Execution note: Run all scripts in the foreground — wait for stdout; do not background.
Discovery: Run
python3 <this-skill-dir>/scripts/video.py --help
first to see all available arguments.
bash
python3 <this-skill-dir>/scripts/video.py \
  --request '{"prompt":"A detective in a rainy city at night","size":"1280*720","duration":5}' \
  --print-response
ArgumentDescription
--request '{...}'
JSON request body
--file path.json
Load request from file
--mode MODE
Override auto-detected mode (t2v/i2v/kf2v/r2v/vace)
--model ID
Override model
--output dir/
Save video and response JSON
--print-response
Print response JSON to stdout
--submit-only
Submit and exit (print task_id)
--task-id ID
Operate on existing task
--poll-interval N
Seconds between polls (default: 15)
--timeout N
Max wait seconds (default: 600)
脚本路径: 脚本位于该技能目录(包含本SKILL.md的目录)的
scripts/
子目录下。必须先定位该技能的安装目录,始终使用完整绝对路径执行脚本。不要默认脚本在当前工作目录,执行前不要使用
cd
切换目录。
执行注意: 所有脚本在前台运行——等待标准输出,不要后台运行。
参数查询: 先执行
python3 <该技能目录>/scripts/video.py --help
查看所有可用参数。
bash
python3 <该技能目录>/scripts/video.py \
  --request '{"prompt":"A detective in a rainy city at night","size":"1280*720","duration":5}' \
  --print-response
参数说明
--request '{...}'
JSON请求体
--file path.json
从文件加载请求体
--mode MODE
覆盖自动检测的模式(t2v/i2v/kf2v/r2v/vace)
--model ID
覆盖默认模型
--output dir/
保存视频和响应JSON的目录
--print-response
把响应JSON打印到标准输出
--submit-only
仅提交任务并退出(返回task_id)
--task-id ID
操作已存在的任务
--poll-interval N
轮询间隔秒数(默认:15)
--timeout N
最大等待秒数(默认:600)

Verify Result

结果验证

  • Exit code
    0
    + response has
    output.task_id
    submission success
  • Poll reaches
    task_status: SUCCEEDED
    generation complete
  • Non-zero exit, HTTP error, or
    FAILED
    status → fail
  • Post-execution check: Verify the output video file exists and has non-zero size (
    ls -la <output_dir>
    )
  • MANDATORY — stderr signal check: After confirming the result, scan the command's stderr output for
    [ACTION_REQUIRED]
    or
    [UPDATE_AVAILABLE]
    . If either signal is present, you MUST follow the instructions in Update Check below before responding to the user.
  • 退出码
    0
    + 响应包含
    output.task_id
    提交成功
  • 轮询到
    task_status: SUCCEEDED
    生成完成
  • 非零退出码、HTTP错误、或
    FAILED
    状态 → 执行失败
  • 执行后检查: 验证输出视频文件存在且大小非零(
    ls -la <output_dir>
  • 必填——错误输出信号检查: 确认结果后,扫描命令的标准错误输出是否包含
    [ACTION_REQUIRED]
    [UPDATE_AVAILABLE]
    。如果存在任一信号,必须先按照下方更新检查(执行后必填)的说明操作,再响应用户。

On Failure

故障处理

If the script fails, match the error output against the diagnostic table below to determine the resolution. If no match, read execution-guide.md for alternative paths: curl commands (Path 2 — all 5 modes), code generation (Path 3), and autonomous resolution (Path 5).
If Python is not available at all → skip directly to Path 2 (curl) in execution-guide.md.
Error PatternDiagnosisResolution
command not found: python3
Python not on PATHTry
python
or
py -3
; install Python 3.9+ if missing
Python 3.9+ required
Script version check failedUpgrade Python to 3.9+
SyntaxError
near type hints
Python < 3.9Upgrade Python to 3.9+
QWEN_API_KEY/DASHSCOPE_API_KEY not found
Missing API keyObtain key from QwenCloud Console; add to
.env
:
echo 'DASHSCOPE_API_KEY=sk-...' >> .env
; or run qwencloud-ops-auth if available
HTTP 401
Invalid or mismatched keyRun qwencloud-ops-auth (non-plaintext check only); verify key is valid
SSL: CERTIFICATE_VERIFY_FAILED
SSL cert issue (proxy/corporate)macOS: run
Install Certificates.command
; else set
SSL_CERT_FILE
env var
URLError
/
ConnectionError
Network unreachableCheck internet; set
HTTPS_PROXY
if behind proxy
HTTP 429
Rate limitedWait and retry with backoff
HTTP 5xx
Server errorRetry with backoff
ImportError: moviepy
moviepy not installed
pip install moviepy
, or use system ffmpeg instead (see merge-media.md)
PermissionError
Can't write outputUse
--output
to specify writable directory
如果脚本运行失败,对照下方诊断表匹配错误输出确定解决方案。如果没有匹配项,查看execution-guide.md获取备选方案:curl命令(路径2——支持所有5种模式)、代码生成(路径3)、自主解决(路径5)。
如果完全没有Python环境 → 直接跳转至execution-guide.md中的路径2(curl)。
错误特征诊断解决方案
command not found: python3
Python不在PATH中尝试
python
py -3
;如果缺失则安装Python 3.9+
Python 3.9+ required
脚本版本检查失败升级Python到3.9+
类型语法附近的
SyntaxError
Python版本<3.9升级Python到3.9+
QWEN_API_KEY/DASHSCOPE_API_KEY not found
缺失API密钥QwenCloud控制台获取密钥;添加到
.env
echo 'DASHSCOPE_API_KEY=sk-...' >> .env
;如果有qwencloud-ops-auth技能则运行该技能
HTTP 401
密钥无效或不匹配运行qwencloud-ops-auth(仅做非明文检查);验证密钥有效性
SSL: CERTIFICATE_VERIFY_FAILED
SSL证书问题(代理/企业网络)macOS:运行
Install Certificates.command
;其他系统设置
SSL_CERT_FILE
环境变量
URLError
/
ConnectionError
网络不可达检查网络;如果使用代理则设置
HTTPS_PROXY
环境变量
HTTP 429
触发限流等待后指数退避重试
HTTP 5xx
服务端错误等待后指数退避重试
ImportError: moviepy
moviepy未安装
pip install moviepy
,或使用系统ffmpeg替代(查看merge-media.md
PermissionError
无输出目录写入权限使用
--output
指定可写目录

Request Fields Summary

请求字段汇总

All modes require
prompt
. See request-fields.md for full field tables per mode.
所有模式都需要
prompt
字段。查看request-fields.md获取各模式的完整字段表。

⚠️ Resolution Parameter by Mode (Critical)

⚠️ 不同模式的分辨率参数(核心注意项)

ModeParameterFormatExample
t2v
size
"WxH"
"1280*720"
,
"1920*1080"
r2v
size
"WxH"
"1280*720"
,
"1920*1080"
vace
size
"WxH"
"1280*720"
i2v
resolution
"xxxP"
"720P"
,
"1080P"
kf2v
resolution
"xxxP"
"480P"
,
"720P"
,
"1080P"
Using the wrong parameter name will cause the API call to fail.
模式参数名格式示例
t2v
size
"宽*高"
"1280*720"
"1920*1080"
r2v
size
"宽*高"
"1280*720"
"1920*1080"
vace
size
"宽*高"
"1280*720"
i2v
resolution
"xxxP"
"720P"
"1080P"
kf2v
resolution
"xxxP"
"480P"
"720P"
"1080P"
使用错误的参数名会导致API调用失败。

Mode-Specific Required Fields

各模式必填特殊字段

  • i2v needs
    img_url
    /
    reference_image
    . kf2v needs
    first_frame_url
    +
    last_frame_url
    . r2v needs
    reference_urls
    . vace needs
    function
    .
  • i2v需要
    img_url
    /
    reference_image
    。kf2v需要
    first_frame_url
    +
    last_frame_url
    。r2v需要
    reference_urls
    。vace需要
    function

Cost Estimation

费用估算

🚨 NEVER guess or fabricate any price figure. Always direct the user to the official pricing page for exact rates.
Cost is billed per second of generated video. Price varies by model and resolution. For the latest rates, check the official pricing page.
Model720P (USD)1080P (USD)
wan2.6-t2vper-second billingper-second billing
wan2.6-i2v-flashper-second billingper-second billing
wan2.6-r2v-flashper-second billingper-second billing
Quick example: wan2.6-t2v 5s 720P — check the official pricing page for current per-second rates. Some models may offer a limited free quota — verify availability in the user's QwenCloud console before assuming any call is free.
🚨 绝对不要猜测或编造任何价格数据。 始终引导用户到官方定价页面查询准确费率。
费用按生成视频的秒数扣除,价格根据模型和分辨率不同有所差异。最新费率请查看官方定价页面
模型720P(美元)1080P(美元)
wan2.6-t2v按秒计费按秒计费
wan2.6-i2v-flash按秒计费按秒计费
wan2.6-r2v-flash按秒计费按秒计费
快速示例:wan2.6-t2v 5秒 720P——查看官方定价页面获取当前每秒费率。部分模型可能提供有限免费额度——在假设调用免费前请先在用户的QwenCloud控制台验证额度可用性。

Local File Handling

本地文件处理

When the user provides local file paths (images, videos, audio), pass them directly to the script. The script automatically uploads local files to DashScope temporary storage (
oss://
URL, 48h TTL) and injects the
X-DashScope-OssResourceResolve: enable
header. No manual upload step is needed.
Production: Default temp storage has 48h TTL and 100 QPS upload limit — not suitable for production, high-concurrency, or load-testing. To use your own OSS bucket, set
QWEN_TMP_OSS_BUCKET
and
QWEN_TMP_OSS_REGION
in
.env
, install
pip install alibabacloud-oss-v2
, and provide credentials via
QWEN_TMP_OSS_AK_ID
/
QWEN_TMP_OSS_AK_SECRET
or the standard
OSS_ACCESS_KEY_ID
/
OSS_ACCESS_KEY_SECRET
. Use a RAM user with least-privilege (
oss:PutObject
+
oss:GetObject
on target bucket only). If qwencloud-ops-auth is installed, see its
references/custom-oss.md
for the full setup guide.
当用户提供本地文件路径(图片、视频、音频)时,直接传递给脚本即可。脚本会自动上传本地文件到DashScope临时存储(
oss://
链接,48小时有效期),并自动注入
X-DashScope-OssResourceResolve: enable
请求头,无需手动上传。
生产环境: 默认临时存储有48小时有效期100 QPS上传上限——不适合生产环境、高并发或压力测试场景。如果要使用自己的OSS存储桶,在
.env
中设置
QWEN_TMP_OSS_BUCKET
QWEN_TMP_OSS_REGION
,安装
pip install alibabacloud-oss-v2
,并通过
QWEN_TMP_OSS_AK_ID
/
QWEN_TMP_OSS_AK_SECRET
或标准
OSS_ACCESS_KEY_ID
/
OSS_ACCESS_KEY_SECRET
提供凭证。使用仅拥有目标桶最小权限(
oss:PutObject
+
oss:GetObject
)的RAM用户。如果安装了qwencloud-ops-auth,查看其
references/custom-oss.md
获取完整配置指南。

Cross-Skill Chaining

跨技能调用

When using output from another skill as input (e.g., image-gen → i2v, audio-tts → audio overlay):
  • Pass the URL directly (e.g.,
    "img_url": "<image_url from image-gen>"
    ) — do NOT download and re-pass as local path
  • The script detects URL prefixes (
    https://
    ,
    oss://
    ) and passes them through without re-upload
  • Use
    local_path
    from the response only for user preview or non-API operations
When passing this skill's output to another skill (e.g., vace edit, vision analyze):
  • Pass
    video_url
    from the response
    — do NOT download and re-pass as local path
ScenarioUse
Feed to another skill
video_url
/
image_url
(URL)
Show to user / local playback
local_path
(local file)
当使用其他技能的输出作为输入时(例如图片生成→i2v、语音合成→音频叠加):
  • 直接传递URL(例如
    "img_url": "<图片生成技能返回的image_url>"
    )——不要下载后再作为本地路径传递
  • 脚本会自动识别URL前缀(
    https://
    oss://
    ),无需重新上传
  • 仅在用户预览或非API操作时使用响应中的
    local_path
当把该技能的输出传递给其他技能时(例如VACE编辑、视觉分析):
  • 传递响应中的
    video_url
    ——不要下载后再作为本地路径传递
场景使用字段
作为其他技能的输入
video_url
/
image_url
(URL)
展示给用户/本地播放
local_path
(本地文件)

Important Notes

重要注意事项

  • Async only: All video APIs require
    X-DashScope-Async: enable
    header.
  • kf2v: Uses a different API endpoint. Duration fixed at 5s, silent only.
  • r2v: Use
    character1
    /
    character2
    /... in prompt. Up to 5 references (max 3 videos).
  • vace: Must specify
    function
    . Silent only, output ≤5s.
  • Multi-shot: Set
    shot_type: "multi"
    AND
    prompt_extend: true
    .
  • Video URL expires in 24h — the script auto-downloads to
    --output
    dir. When chaining to another skill (e.g., vace edit), pass
    video_url
    directly — do NOT re-download.
  • For advanced workflows → see workflows.md.
  • 仅支持异步: 所有视频API都需要
    X-DashScope-Async: enable
    请求头。
  • kf2v: 使用独立的API端点,时长固定为5秒仅无音频版本
  • r2v: 在prompt中使用
    character1
    /
    character2
    /...指代角色,最多支持5个参考素材(最多3个视频)。
  • vace: 必须指定
    function
    仅无音频版本,输出时长**≤5秒**。
  • 多镜头: 同时设置
    shot_type: "multi"
    prompt_extend: true
  • 视频URL24小时后过期——脚本会自动下载到
    --output
    指定目录。当传递给其他技能时(例如VACE编辑),直接传递
    video_url
    ——不要重新下载。
  • 高级工作流→查看workflows.md

Error Handling

错误处理

ErrorCauseAction
401 Unauthorized
Invalid or missing API keyRun qwencloud-ops-auth if available; else prompt user to set key (non-plaintext check only)
current user api does not support synchronous calls
Missing async headerAdd
X-DashScope-Async: enable
429
/
5xx
Rate limit or server errorRetry with backoff
Task
FAILED
Generation failedCheck
output.message
in poll response
错误原因处理方式
401 Unauthorized
API密钥无效或缺失如果有qwencloud-ops-auth则运行该技能;否则提示用户设置密钥(仅做非明文检查)
current user api does not support synchronous calls
缺失异步请求头添加
X-DashScope-Async: enable
429
/
5xx
触发限流或服务端错误指数退避重试
任务
FAILED
生成失败查看轮询响应中的
output.message

Output Location

输出位置

Prefer the current working directory. Default subdirectory:
./output/qwencloud-video-generation/
.
Write prohibition: NEVER write output files into this skill's installation directory or any
skills/
hierarchy. All generated content must go to
output/
under the current working directory or a user-specified path.
优先使用当前工作目录,默认子目录:
./output/qwencloud-video-generation/
写入禁止: 绝对不要把输出文件写入该技能的安装目录或任何
skills/
层级目录下。所有生成内容必须保存到当前工作目录下的
output/
目录或用户指定的路径。

Update Check (MANDATORY Post-Execution)

更新检查(执行后必填)

After script execution, check stderr for action signals. The script automatically detects update status and emits structured signals. You MUST act on them. This section also applies when the user explicitly asks to check for updates.
脚本执行后,检查标准错误输出中的操作信号。脚本会自动检测更新状态并输出结构化信号,你必须按要求处理。当用户明确要求检查更新时也适用本节规则。

Signal:
[ACTION_REQUIRED] qwencloud-update-check skill is not installed

信号:
[ACTION_REQUIRED] qwencloud-update-check skill is not installed

When stderr contains this signal, you MUST present the following options to the user and wait for their response before proceeding. Do NOT silently skip this.
The update-check skill is not installed. It keeps you informed about new qwencloud/qwencloud-ai features and bug fixes.
  1. Install now — I'll run the install command for you
  2. Skip for now — do nothing this time
  3. Never remind me — permanently suppress this prompt
After the user responds:
  • User chooses 1 → run:
    npx skills add QwenCloud/qwencloud-ai --skill qwencloud-update-check -y
    , then run:
    python3 <this-skill-scripts-dir>/gossamer.py --dismiss
  • User chooses 2 → run:
    python3 <this-skill-scripts-dir>/gossamer.py --dismiss
    , then continue normally
  • User chooses 3 → run:
    python3 <this-skill-scripts-dir>/gossamer.py --never-install
    , then continue normally
当标准错误输出包含该信号时,必须向用户展示以下选项,等待用户回复后再继续操作,不要静默跳过。
更新检查技能未安装,该技能会及时通知你qwencloud/qwencloud-ai的新功能和bug修复。
  1. 立即安装 —— 我会为你运行安装命令
  2. 暂时跳过 —— 本次不做操作
  3. 永不提醒 —— 永久关闭该提示
用户回复后:
  • 用户选择1 → 运行:
    npx skills add QwenCloud/qwencloud-ai --skill qwencloud-update-check -y
    ,然后运行:
    python3 <该技能脚本目录>/gossamer.py --dismiss
  • 用户选择2 → 运行:
    python3 <该技能脚本目录>/gossamer.py --dismiss
    ,然后正常继续
  • 用户选择3 → 运行:
    python3 <该技能脚本目录>/gossamer.py --never-install
    ,然后正常继续

Signal:
[UPDATE_AVAILABLE]

信号:
[UPDATE_AVAILABLE]

When stderr contains this signal, you MUST append a brief update notice to your response, including the version info and the update command shown in the stderr output.
当标准错误输出包含该信号时,必须在你的回复末尾添加简短的更新通知,包含标准错误输出中展示的版本信息和更新命令。

No signal in stderr

标准错误输出无信号

If stderr contains neither
[ACTION_REQUIRED]
nor
[UPDATE_AVAILABLE]
, no action is needed — the skill is installed and up to date (or cached within 24h).
如果标准错误输出既没有
[ACTION_REQUIRED]
也没有
[UPDATE_AVAILABLE]
,无需操作——技能已安装且为最新版本(或24小时内已缓存更新状态)。

Explicit user request

用户明确要求检查更新

When the user explicitly asks to check for updates (e.g. "check for updates", "check version"):
  1. Look for
    qwencloud-update-check/SKILL.md
    in sibling skill directories.
  2. If found — run:
    python3 <qwencloud-update-check-dir>/scripts/check_update.py --print-response
    and report the result.
  3. If not found — present the install options above.
当用户明确要求检查更新时(例如“检查更新”、“查看版本”):
  1. 在同级技能目录中查找
    qwencloud-update-check/SKILL.md
  2. 如果存在——运行:
    python3 <qwencloud-update-check目录>/scripts/check_update.py --print-response
    并返回结果。
  3. 如果不存在——展示上述安装选项。

References

参考文档

  • execution-guide.md — Fallback paths (curl for all modes, code generation, autonomous)
  • request-fields.md — Detailed field tables by mode + audio handling
  • workflows.md — Duration extensions, audio workarounds, multi-shot, VACE pipelines
  • polling-guide.md — Polling patterns and timing recommendations
  • merge-media.md — Guide for generating merge/trim/audio-overlay code
  • examples.md — Full script execution examples for all modes
  • sources.md — Official documentation URLs
  • execution-guide.md —— 备选执行路径(所有模式的curl调用、代码生成、自主解决)
  • request-fields.md —— 分模式的详细字段表+音频处理说明
  • workflows.md —— 时长延长、音频方案、多镜头、VACE流程
  • polling-guide.md —— 轮询规则和时间间隔建议
  • merge-media.md —— 媒体合并/裁剪/音频叠加代码生成指南
  • examples.md —— 所有模式的完整脚本执行示例
  • sources.md —— 官方文档链接