Create talking, singing, and performing videos from a portrait image and audio
Quick links: API reference: Create a digital human video, Retrieve the result, Detect a portrait image
To check whether an image meets the portrait requirements before generating, use Detect a portrait image.
The model keeps the aspect ratio of the input image and adjusts the total pixel count to the selected resolution tier. The output video lasts as long as the input audio.
Video generation takes about 5 to 10 minutes. Poll the task endpoint every 15 seconds until
wan2.2-s2v generates a digital human video from a single portrait image and an audio file. The person in the image talks, sings, or performs in sync with the audio, with natural facial expressions and head movement.
Supported regions: China North 2 (Beijing) only. Use an API key created in that region and the https://cn-beijing.maas.qwencloudapi.com endpoint. See Regions and endpoints.
Before running the SDK examples below, ensure your DashScope SDK is up to date.
Input requirements
| Input | Requirements |
|---|---|
| Portrait image | JPG, JPEG, PNG, BMP, or WEBP. Width and height between 400 and 7,000 pixels. Must be a publicly accessible HTTP or HTTPS URL. |
| Audio | WAV or MP3. File size under 15 MB, duration under 20 seconds. Must contain clear, loud human speech without background noise or music. |
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | "wan2.2-s2v" |
input.image_url | string | Yes | Publicly accessible URL of the portrait image. |
input.audio_url | string | Yes | Publicly accessible URL of the audio file. |
parameters.resolution | string | No | "480P" or "720P". Default: "480P". |
Generate a video
The model keeps the aspect ratio of the input image and adjusts the total pixel count to the selected resolution tier. The output video lasts as long as the input audio.
- curl
- Python
Step 1: Create a taskStep 2: Get the result using the task IDReplace
{task_id} with the task_id value returned by the previous call.Poll for the result
Video generation takes about 5 to 10 minutes. Poll the task endpoint every 15 seconds until task_status is SUCCEEDED or FAILED, then download the video from video_url.
video_urlexpires after 24 hours.- A
task_idis valid for 24 hours. - Task status flow:
PENDING→RUNNING→SUCCEEDEDorFAILED.
Tips
- Use a clear portrait: A front-facing image with a single person, even lighting, and no obstructions produces the best lip sync.
- Keep audio short: The video length equals the audio length and the audio must be under 20 seconds. For longer content, generate one video per audio segment and merge the results.
- Remove background noise: Background music or noise reduces lip-sync accuracy.