qwencloud-video-generation
by @cuixiaoyang123
[QwenCloud] Generate videos using Wan models. Supports text-to-video, image-to-video, first+last frame, reference-based role-play, and video editing (VACE)....
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.
Environment Check
Before first execution, verify Python is available:
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.
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 first to see all available arguments.
python3 /scripts/video.py \
--request '{"prompt":"A detective in a rainy city at night","size":"1280*720","duration":5}' \
--print-response
| Argument | Description |
|----------|-------------|
| --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) |
Verify Result
0 + response has output.task_id β submission successtask_status: SUCCEEDED β generation completeFAILED status β faills -la )[ACTION_REQUIRED] or [UPDATE_AVAILABLE]. If either signal is present, you MUST follow the instructions in Update Check below before responding to the user.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 Pattern | Diagnosis | Resolution |
|---------------|-----------|------------|
| command not found: python3 | Python not on PATH | Try python or py -3; install Python 3.9+ if missing |
| Python 3.9+ required | Script version check failed | Upgrade Python to 3.9+ |
| SyntaxError near type hints | Python < 3.9 | Upgrade Python to 3.9+ |
| QWEN_API_KEY/DASHSCOPE_API_KEY not found | Missing API key | Obtain 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 key | Run 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 unreachable | Check internet; set HTTPS_PROXY if behind proxy |
| HTTP 429 | Rate limited | Wait and retry with backoff |
| HTTP 5xx | Server error | Retry with backoff |
| ImportError: moviepy | moviepy not installed | pip install moviepy, or use system ffmpeg instead (see merge-media.md) |
| PermissionError | Can't write output | Use --output to specify writable directory |
clawhub install qwencloud-video-generation