$npx -y skills add cinience/alicloud-skills --skill aliyun-videoretalkUse when replacing lip sync in existing videos with Alibaba Cloud Model Studio VideoRetalk (videoretalk). Use when creating dubbed videos, replacing narration, or synchronizing a talking-head video to a new speech track.
| 1 | Category: provider |
| 2 | |
| 3 | # Model Studio VideoRetalk |
| 4 | |
| 5 | ## Validation |
| 6 | |
| 7 | ```bash |
| 8 | mkdir -p output/aliyun-videoretalk |
| 9 | python -m py_compile skills/ai/video/aliyun-videoretalk/scripts/prepare_retalk_request.py && echo "py_compile_ok" > output/aliyun-videoretalk/validate.txt |
| 10 | ``` |
| 11 | |
| 12 | Pass criteria: command exits 0 and `output/aliyun-videoretalk/validate.txt` is generated. |
| 13 | |
| 14 | ## Output And Evidence |
| 15 | |
| 16 | - Save normalized request payloads, target face selection settings, and task polling snapshots under `output/aliyun-videoretalk/`. |
| 17 | - Record the exact video/audio input URLs and whether `video_extension` was enabled. |
| 18 | |
| 19 | Use VideoRetalk when the input is already a person video and the job is to replace lip sync with a new speech track. |
| 20 | |
| 21 | ## Critical model names |
| 22 | |
| 23 | Use this exact model string: |
| 24 | - `videoretalk` |
| 25 | |
| 26 | ## Prerequisites |
| 27 | |
| 28 | - This model currently only supports China mainland (Beijing). |
| 29 | - API is HTTP async only; there is no online console experience. |
| 30 | - Set `DASHSCOPE_API_KEY` in your environment, or add `dashscope_api_key` to `~/.alibabacloud/credentials`. |
| 31 | |
| 32 | ## Normalized interface (video.retalk) |
| 33 | |
| 34 | ### Request |
| 35 | - `model` (string, optional): default `videoretalk` |
| 36 | - `video_url` (string, required) |
| 37 | - `audio_url` (string, required) |
| 38 | - `ref_image_url` (string, optional): target face when input video contains multiple faces |
| 39 | - `video_extension` (bool, optional): extend video to match longer audio |
| 40 | - `query_face_threshold` (int, optional): `120` to `200` |
| 41 | |
| 42 | ### Response |
| 43 | - `task_id` (string) |
| 44 | - `task_status` (string) |
| 45 | - `video_url` (string, when finished) |
| 46 | - `usage` (object, optional) |
| 47 | |
| 48 | ## Endpoint and execution model |
| 49 | |
| 50 | - Submit task: `POST https://dashscope.aliyuncs.com/api/v1/services/aigc/image2video/video-synthesis/` |
| 51 | - Poll task: `GET https://dashscope.aliyuncs.com/api/v1/tasks/{task_id}` |
| 52 | - HTTP calls are async only and must set header `X-DashScope-Async: enable`. |
| 53 | |
| 54 | ## Quick start |
| 55 | |
| 56 | ```bash |
| 57 | python skills/ai/video/aliyun-videoretalk/scripts/prepare_retalk_request.py \ |
| 58 | --video-url "https://example.com/talking-head.mp4" \ |
| 59 | --audio-url "https://example.com/new-voice.wav" \ |
| 60 | --video-extension |
| 61 | ``` |
| 62 | |
| 63 | ## Operational guidance |
| 64 | |
| 65 | - Keep input videos front-facing and close enough for stable face tracking. |
| 66 | - If the video contains multiple faces, provide `ref_image_url` to anchor the intended target. |
| 67 | - If the new audio is longer than the input video, decide explicitly whether to extend the picture track or truncate the audio. |
| 68 | - URLs must be public HTTP/HTTPS links; local file paths are not accepted by the API. |
| 69 | |
| 70 | ## Output location |
| 71 | |
| 72 | - Default output: `output/aliyun-videoretalk/request.json` |
| 73 | - Override base dir with `OUTPUT_DIR`. |
| 74 | |
| 75 | ## References |
| 76 | |
| 77 | - `references/sources.md` |