Digital human wan2.2-s2v video generation API reference

Updated at:

The digital human wan2.2-s2v model generates natural talking, singing, or performing videos based on a single image and an audio file .

  • Audio-driven: Input human-voice audio to drive the person in a static image, synchronizing lip movements, facial expressions, and actions with the audio.
  • Rich scenarios: Supports three lip-sync scenarios: "speaking", "singing", and "performing".
  • Diverse character styles: Supports real people (portrait, half-body, full-body) and cartoon characters.
  • Output video resolution: Provides 480P and 720P resolution options.

ImportantThis document applies only to the China (Beijing) region. Use an API key from this region.

Models and pricing

Model name

Price

Throttling (shared by primary account and RAM users)

Free quota(View)

Task submission RPS limit

Concurrent tasks limit

wan2.2-s2v

480P: CNY 0.5/second

720P: CNY 0.9/second

5

1

100 seconds

HTTP API

Prerequisites

Step 1: Create a task to get a task ID

POST https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/services/aigc/image2video/video-synthesis

Replace {WorkspaceId} with your actual workspace ID.

Note

  • Because this model takes a long time to process, tasks are created asynchronously.
  • After a task is created, the system immediately returns a task_id. In the next step, use this task_id to query the task result within 24 hours.

Request parameters

ParameterTypeLocationRequiredDescriptionExample value

Content-Type

String

Header

Yes

Request type: application/json.

application/json

Authorization

String

Header

Yes

API key in the format Bearer sk-xxx.

Bearer sk-1a**2b

X-DashScope-Async

String

Header

Yes

Fixed value: enable. Indicates that the asynchronous calling method is used.

enable

model

String

Body

Yes

Specifies the model to call.

wan2.2-s2v

input.image_url

String

Body

Yes

URL of the uploaded image.

  • Image formats: jpg, jpeg, png, bmp, and webp are supported.
  • Image resolution: The width and height must be within [400, 7000] pixels.
  • The image must be accessible via a public HTTP/HTTPS URL. For local files, you can obtain a temporary URL by uploading the file.

http://aaa/bbb.jpg

input.audio_url

String

Body

Yes

URL of the uploaded audio file.

  • Audio formats: wav and mp3.
  • Audio limits: file <15 MB, duration <20 seconds.
  • Audio content: The audio must contain clear, loud human speech, with ambient noise, background music, and other interference removed.
  • The audio must be accessible via a public HTTP/HTTPS URL. For local files, you can obtain a temporary URL by uploading the file.

http://aaa/bbb.mp3

parameters.resolution

String

Body

No

Video resolution tier.

Valid values: 480P and 720P. Default value: 480P.

The model tries to keep the output video's aspect ratio consistent with the input image, and adjusts the total pixel count to the selected tier while keeping the aspect ratio unchanged.

Examples

480P: typically 640 x 480 (about 310,000 pixels), 4:3 aspect ratio.

720P: typically 1280 x 720 (about 920,000 pixels), 16:9 aspect ratio.

Example: If the input image has a 4:5 aspect ratio and you select the 480P tier, the output video keeps the 4:5 aspect ratio and the resolution is adjusted to about 310,000 pixels. For example, the output video resolution is 480 x 600, for a total of 288,000 pixels. This data is for reference only; the actual output may vary.

480P

NoteThe generated video duration matches the input audio duration. Therefore, the maximum video duration per request is also limited by the audio duration (must be less than 20 seconds). If the input audio exceeds 20 seconds, the task fails. To generate a longer video, split the long audio into segments shorter than 20 seconds, call this interface for each segment, and then use a video editing tool to concatenate the segments into a complete video.

Response parameters

Parameter

Type

Description

Example value

output.task_id

String

Unique ID of the asynchronous task.

a8532587-fa8c-4ef8-82be-0c46b17950d1

output.task_status

String

Job status after the asynchronous task is submitted.

PENDING

request_id

String

Unique ID of this request.

7574ee8f-38a3-4b1e-9280-11c33ab46e51

Request example

The following is the China (Beijing) region URL. Replace {WorkspaceId} with your Bailian workspace ID. URLs vary by region.

curl

curl 'https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/services/aigc/image2video/video-synthesis' \
 --header 'X-DashScope-Async: enable' \
 --header "Authorization: Bearer $DASHSCOPE_API_KEY" \
 --header 'Content-Type: application/json' \
 --data '{
     "model": "wan2.2-s2v",
     "input": {
            "image_url": "https://img.alicdn.com/imgextra/i3/O1CN011FObkp1T7Ttowoq4F_!!6000000002335-0-tps-1440-1797.jpg",
            "audio_url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250825/iaqpio/input_audio.MP3"
        },
        "parameters": {
            "resolution": "480P"
        }
    }'

Python SDK

from http import HTTPStatus
from dashscope import VideoSynthesis
import dashscope
import os

# If you have not configured environment variables, replace the following line with your API Key: api_key="sk-xxx"
# Get API Key: https://help.aliyun.com/en/model-studio/get-api-key
api_key = os.getenv("DASHSCOPE_API_KEY")

def sample_async_call():
    # Submit video generation task asynchronously
    rsp = VideoSynthesis.async_call(api_key=api_key,
                                model='wan2.2-s2v',
                                img_url='https://img.alicdn.com/imgextra/i3/O1CN011FObkp1T7Ttowoq4F_!!6000000002335-0-tps-1440-1797.jpg',
                                audio_url='https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250825/iaqpio/input_audio.MP3',
                                resolution='480P')
    print(rsp)
    if rsp.status_code == HTTPStatus.OK:
        print("task_id: %s" % rsp.output.task_id)
    else:
        print('Failed, status_code: %s, code: %s, message: %s' %
              (rsp.status_code, rsp.code, rsp.message))

    # Query task status
    status = VideoSynthesis.fetch(task=rsp, api_key=api_key)
    if status.status_code == HTTPStatus.OK:
        print(status.output.task_status)
    else:
        print('Failed, status_code: %s, code: %s, message: %s' %
              (status.status_code, status.code, status.message))

    # Wait for task to complete
    rsp = VideoSynthesis.wait(task=rsp, api_key=api_key)
    print(rsp)
    if rsp.status_code == HTTPStatus.OK:
        print(rsp.output.video_url)
    else:
        print('Failed, status_code: %s, code: %s, message: %s' %
              (rsp.status_code, rsp.code, rsp.message))

if __name__ == '__main__':
    sample_async_call()

Response example

{
    "output": {
        "task_id": "a8532587-fa8c-4ef8-82be-xxxxxx",
        "task_status": "PENDING"
    }
    "request_id": "7574ee8f-38a3-4b1e-9280-xxxxxx"
}

Step 2: Query results by task ID

Use the task_id obtained in the previous step to send a GET request to query the task status and result. Replace {task_id} in the URL with your actual task ID,and replace {WorkspaceId} with your actual workspace ID.

GET https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/tasks/{task_id}

Note

  • Video generation tasks take a long time (about 5-10 minutes). We recommend using a polling mechanism with a reasonable query interval (for example, 15 seconds) to retrieve results.
  • The video_url returned after a successful task is valid for 24 hours. Download and save the video promptly.
  • The default QPS of this query interface is 20. For higher-frequency queries or event notifications, see Configure asynchronous task callbacks.
  • For batch queries or task cancellation, see Manage asynchronous tasks.

Request parameters

Parameter

Type

Location

Required

Description

Example value

Authorization

String

Header

Yes

API key, for example, Bearer sk-xxx.

Bearer sk-xxx

task_id

String

Url Path

Yes

ID of the task to query.

a8532587-fa8c-4ef8-82be-0c46b17950d1

Response parameters

Parameter

Type

Description

Example value

output.task_id

String

ID of the queried task.

a8532587-fa8c-4ef8-82be-0c46b17950d1

output.task_status

String

Task status. Possible values:

  • PENDING: Queuing

  • RUNNING: Processing

  • SUCCEEDED: Success

  • FAILED: Failure

  • UNKNOWN: Job does not exist or status is unknown

  • CANCELED: Task canceled successfully

SUCCEEDED

output.submit_time

String

Task submission time.

2025-09-01 09:37:27.468

output.scheduled_time

String

Task execution start time.

2025-09-01 09:37:34.885

output.end_time

String

Task completion time.

2025-09-01 09:40:20.734

output.results.video_url

String

Generated video file.

The video_url is valid for 24 hours. Download it promptly.

https://xxx/1.mp4?Expires=xxx

usage.duration

Float

Video duration in seconds. Used for billing, charged per second.

10.23

usage.video_count

Integer

Number of generated videos.

1

usage.SR

Integer

Resolution tier of the generated video.

480

usage.size

String

Resolution of the video generated by this request.

"size": "640*480"

usage.fps

Integer

Frame rate of the video generated by this request.

"fps": 16

output.code

String

Error code. Returned when the task fails.

InvalidParameter

output.message

String

Error details. Returned when the task fails.

The request is missing required parameters or in a wrong format

request_id

String

Unique ID of this request.

7574ee8f-38a3-4b1e-9280-11c33ab46e51

Request example

Replace 86ecf553-d340-4e21-xxxxxxxxx with the actual task_id,and replace {WorkspaceId} with your actual workspace ID.

curl -X GET https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/tasks/86ecf553-d340-4e21-xxxxxxxxx \
--header "Authorization: Bearer $DASHSCOPE_API_KEY"

NoteThe task_id can be used to query task results only within 24 hours. After that, the system automatically clears it.

Response example

Successful response

Task data (such as task status and video URL) is retained for only 24 hours. After that, it is automatically cleared. Save the results promptly.

{
    "output": {
        "task_id": "bcae8761-f242-4775-a11e-xxxxxx",
        "task_status": "SUCCEEDED",
        "submit_time": "2025-09-01 09:37:27.468",
        "scheduled_time": "2025-09-01 09:37:34.885",
        "end_time": "2025-09-01 09:40:20.734",
        "results": {
            "video_url": "http://dashscope-result-hz.oss-cn-hangzhou.aliyuncs.com/1d/xxx.mp4?Expires=xxxxxx"
        }
    },
    "usage": {
        "duration": 18.13,
        "size": "512*640",
        "fps": 16,
        "video_count": 1,
        "SR": 480
    },
    "request_id": "28cfedb1-cd60-9e0c-b920-xxxxxx"
}

Failed response

{
    "request_id": "8d49f522-f6a4-9eed-b322-xxxxxx",
    "output": {
        "task_id": "101ad32f-7653-4ae9-8f22-xxxxxx",
        "task_status": "FAILED",
        "submit_time": "2025-09-01 11:43:41.174",
        "scheduled_time": "2025-09-01 11:43:48.937",
        "end_time": "2025-09-01 11:43:49.802",
        "code": "InvalidURL",
        "message": "Required URL is missing or invalid, please check the request URL."
    }
}

Billing and throttling

  • For model free quotas and pricing, see Wanx-Digital Human.

  • For model throttling, see Wanxiang series.

  • Billing notes:

    • Input is not billed; output is billed. You are charged by the number of seconds in the successfully generated video.
    • Failed model calls or processing errors are not charged and do not consume Free quota for new users.

Error codes

If a model call fails and returns an error message, see Error codes to resolve the issue.