All Products
Search
Document Center

Alibaba Cloud Model Studio:Wan image-to-action API reference

Last Updated:Mar 15, 2026

Animate a character image by transferring actions from a reference video.

  • Feature summary: Transfer actions and expressions from a reference video to a character image to generate an animated video.

  • Scenarios: Replicate dances, complex body movements, and facial expressions from film and television performances. A low-cost alternative to motion capture.

Model effects

The wan2.2-animate-move model supports two service modes: standard mode wan-std and professional mode wan-pro, which differ in output quality and pricing. For more information, see Model invocation pricing.

Character image

Reference video

Output video (standard mode wan-std)

Output video (professional mode wan-pro)

move_input_image

Prerequisites

Get an API key and export the API key as an environment variable.

Important

The Beijing and Singapore regions have separate API keys and request endpoints. Do not use them interchangeably. Cross-region calls result in authentication failures or service errors.

HTTP

Video generation uses asynchronous calls. The process has two steps: create a task, then poll for results.

Step 1: Create a task and get the task ID

Singapore: POST https://dashscope-intl.aliyuncs.com/api/v1/services/aigc/image2video/video-synthesis

Beijing: POST https://dashscope.aliyuncs.com/api/v1/services/aigc/image2video/video-synthesis

Note
  • After the task is created, use the returned task_id to query the result. The task_id is valid for 24 hours. Do not create duplicate tasks. Instead, use polling to retrieve the result.

  • For a beginner's tutorial, see Use Postman or cURL.

Request parameters

Image to action

The base_url is for the Singapore region. If you use a model in the Beijing region, replace the base_url with the following: https://dashscope.aliyuncs.com/api/v1/services/aigc/image2video/video-synthesis

curl --location 'https://dashscope-intl.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-animate-move",
    "input": {
        "image_url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250919/adsyrp/move_input_image.jpeg",
        "video_url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250919/kaakcn/move_input_video.mp4",
        "watermark": true
    },
    "parameters": {
        "mode": "wan-std"
    }
  }'

Request headers

Content-Type string (Required)

The content type of the request. Must be application/json.

Authorization string (Required)

The authentication credentials using a Model Studio API key.

Example: Bearer sk-xxxx

X-DashScope-Async string (Required)

Enables asynchronous processing. Must be enable as HTTP requests support only asynchronous processing.

Important

Returns "current user api does not support synchronous calls" error if not included.

Request body

model string (Required)

The model name. Set this parameter to wan2.2-animate-move.

input object (Required)

The input parameters. Contains the following fields:

Properties

image_url string (Required)

A publicly accessible HTTP or HTTPS URL of the input image. URLs containing non-ASCII characters (such as Chinese characters) must be URL-encoded.

  • Format: JPG, JPEG, PNG, BMP, or WEBP.

  • Dimensions: The width and height must both be in the range of [200, 4096] pixels. The aspect ratio must be between 1:3 and 3:1.

  • File size: No more than 5 MB.

  • Content: The image must show a single front-facing person with an unobstructed face, occupying a moderate portion of the frame.

  • Example: https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250919/adsyrp/move_input_image.jpeg

video_url string (Required)

A publicly accessible HTTP or HTTPS URL of the input video. URLs containing non-ASCII characters (such as Chinese characters) must be URL-encoded.

Recommendation: For better results, use a reference video with higher resolution and frame rate.

  • Format: MP4, AVI, or MOV.

  • Duration: 2 to 30 seconds.

  • Dimensions: The width and height must both be in the range of [200, 2048] pixels. The aspect ratio must be between 1:3 and 3:1.

  • File size: No more than 200 MB.

  • Content: The video must show a single front-facing person with an unobstructed face, occupying a moderate portion of the frame.

  • Example: https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250919/kaakcn/move_input_video.mp4

watermark bool (Optional)

Specifies whether to add a "Generated by Qwen AI" watermark to the bottom-right corner of the video.

  • false (default)

  • true

parameters object (Required)

Properties

check_image bool (Optional)

Specifies whether to validate the input image.

  • true (default)

  • false

mode string (Required)

The service mode. Valid values:

  • wan-std: Standard mode. Faster generation at lower cost. Suitable for quick previews and basic animation.

  • wan-pro: Professional mode. Smoother animation and higher quality, with longer processing time and higher cost.

For more information, see Model effects and Billing and rate limiting.

Response parameters

Successful response

Save the task_id to query the task status and result.

{
    "output": {
        "task_status": "PENDING",
        "task_id": "0385dc79-5ff8-4d82-bcb6-xxxxxx"
    },
    "request_id": "4909100c-7b5a-9f92-bfe5-xxxxxx"
}

Error response

Task creation failed. See error codes to resolve the issue.

{
    "code": "InvalidApiKey",
    "message": "No API-key provided.",
    "request_id": "7438d53d-6eb8-4596-8835-xxxxxx"
}

output object

The task output.

Properties

task_id string

The ID of the task. Can be used to query the task for up to 24 hours.

task_status string

The status of the task.

Enumeration

  • PENDING

  • RUNNING

  • SUCCEEDED

  • FAILED

  • CANCELED

  • UNKNOWN: Task does not exist or status is unknown

request_id string

Unique identifier for the request. Use for tracing and troubleshooting issues.

message string

Detailed error message. Returned only when the request fails. See error codes for details.

code string

The error code. Returned only when the request fails. See error codes for details.

Step 2: Query the result by task ID

Singapore: GET https://dashscope-intl.aliyuncs.com/api/v1/tasks/{task_id}

Beijing: GET https://dashscope.aliyuncs.com/api/v1/tasks/{task_id}

Note
  • Polling suggestion: Video generation can take several minutes. Use a polling mechanism with a reasonable query interval, such as 15 seconds, to retrieve the result.

  • Task status transition: PENDING → RUNNING → SUCCEEDED or FAILED.

  • Result URL: After the task is successful, a video URL is returned. The URL is valid for 24 hours. After you retrieve the URL, you must immediately download and save the video to a permanent storage service, such as Object Storage Service (OSS).

  • task_id validity: 24 hours. After this period, you cannot query the result, and the API returns a task status of UNKNOWN.

Request parameters

Query task result

Replace 0385dc79-5ff8-4d82-bcb6-xxxxxx with your actual task_id.

The base_url is for the Singapore region. If you use a model in the Beijing region, replace the base_url with the following: https://dashscope.aliyuncs.com/api/v1/tasks/0385dc79-5ff8-4d82-bcb6-xxxxxx
curl -X GET https://dashscope-intl.aliyuncs.com/api/v1/tasks/0385dc79-5ff8-4d82-bcb6-xxxxxx \
--header "Authorization: Bearer $DASHSCOPE_API_KEY"
Request headers

Authorization string (Required)

The authentication credentials using a Model Studio API key.

Example: Bearer sk-xxxx

URL path parameters

task_id string (Required)

The ID of the task to query.

Response parameters

Task successful

Video URLs are retained for only 24 hours and then automatically purged. Save generated videos promptly.

{
    "request_id": "a67f8716-18ef-447c-a286-xxxxxx",
    "output": {
        "task_id": "0385dc79-5ff8-4d82-bcb6-xxxxxx",
        "task_status": "SUCCEEDED",
        "submit_time": "2025-09-18 15:32:00.105",
        "scheduled_time": "2025-09-18 15:32:15.066",
        "end_time": "2025-09-18 15:34:41.898",
        "results": {
            "video_url": "http://dashscope-result-bj.oss-cn-beijing.aliyuncs.com/xxxxx.mp4?Expires=xxxxxx"
        }
    },
    "usage": {
        "video_duration": 5.2,
        "video_ratio": "standard"
    }
}

Task failed

When a task fails, task_status is set to FAILED with an error code and message. See error codes to resolve the issue.

{
    "request_id": "daad9007-6acd-9fb3-a6bc-xxxxxx",
    "output": {
        "task_id": "fe8aa114-d9f1-4f76-b598-xxxxxx",
        "task_status": "FAILED",
        "code": "InternalError",
        "message": "xxxxxx"
    }
}

output object

The task output.

Properties

task_id string

The ID of the task. Can be used to query the task for up to 24 hours.

task_status string

The status of the task.

Enumeration

  • PENDING

  • RUNNING

  • SUCCEEDED

  • FAILED

  • CANCELED

  • UNKNOWN: Task does not exist or status is unknown

submit_time string

The time when the task was submitted. Time is in UTC+8. Format: YYYY-MM-DD HH:mm:ss.SSS.

scheduled_time string

The time when the task started running. Time is in UTC+8. Format: YYYY-MM-DD HH:mm:ss.SSS.

end_time string

The time when the task was completed. Time is in UTC+8. Format: YYYY-MM-DD HH:mm:ss.SSS.

results object

Properties

video_url string

The URL of the generated video. Returned only when task_status is SUCCEEDED.

URL is valid for 24 hours. Use to download the video in MP4 format with H.264 encoding.

code string

The error code. Returned only when the request fails. See error codes for details.

message string

Detailed error message. Returned only when the request fails. See error codes for details.

usage object

Output statistics. Only successful results are counted.

Properties

video_duration float

The duration of the video generated for this request, in seconds.

video_ratio string

The service mode selected for this video request. Enumeration values: standard and pro.

If you select the standard mode (wan-std), the value is standard. If you select the professional mode (wan-pro), the value is pro.

request_id string

Unique identifier for the request. Use for tracing and troubleshooting issues.

Limitations

Data validity: Task IDs and video URLs expire after 24 hours and are inaccessible afterward. Download videos promptly.

Content moderation: All inputs and outputs are automatically moderated. Non-compliant content returns an "IPInfringementSuspect" or "DataInspectionFailed" error. For more information, see Error messages.

Billing and rate limiting

Error codes

If a model call fails and returns an error message, see Error messages for resolution.

FAQ

Q: How can I optimize the quality of the generated video?

A:

  1. Ensure the character occupies a similar portion of the frame in both the input image and reference video.

  2. Keep body proportions consistent between image and video.

  3. Use high-definition source materials. Avoid blurry images or low-frame-rate videos.

Q: How can I convert a temporary video link to a permanent one?

A: The link cannot be converted directly. Have your backend download the video and upload it to permanent object storage (like OSS) to generate a permanent URL.

Example code: Download the video to a local device

import requests

def download_and_save_video(video_url, save_path):
    try:
        response = requests.get(video_url, stream=True, timeout=300) # Set timeout
        response.raise_for_status() # If the HTTP status code is not 200, raise an exception
        with open(save_path, 'wb') as f:
            for chunk in response.iter_content(chunk_size=8192):
                f.write(chunk)
        print(f"Video downloaded successfully to: {save_path}")
        # You can add the logic to upload to permanent storage here
    except requests.exceptions.RequestException as e:
        print(f"Failed to download video: {e}")

if __name__ == '__main__':
    video_url = "http://dashscope-result-sh.oss-cn-shanghai.aliyuncs.com/xxxx"
    save_path = "video.mp4"
    download_and_save_video(video_url, save_path)

Q: Can the returned video link be played directly in a browser?

A: Not recommended. The link expires after 24 hours. Have your backend download and save the video, then use a permanent link for playback.

Q: How do I get the domain name whitelist for video storage?

A: Videos generated by models are stored in OSS. The API returns a temporary public URL. To configure a firewall whitelist for this download URL, note the following: The underlying storage may change dynamically. This topic does not provide a fixed OSS domain name whitelist to prevent access issues caused by outdated information. If you have security control requirements, contact your account manager to obtain the latest OSS domain name list.