The Wan reference-to-video model supports multimodal input (images, videos, and audio) and generates videos that maintain consistent character appearance and voice, making it suitable for single-character performance or multi-character interaction scenarios.
Related documents: User Guide
Scope
To ensure successful calls, make sure that the model, Endpoint URL, and API Key all belong to the same region. Cross-region calls will fail.
- Select Model: Confirm the region that the model belongs to.
- Select URL: Select the Endpoint URL of the corresponding region. HTTP URLs are supported.
- Configure the API Key: Select the region and obtain and configure an API Key, then configure the API Key as an environment variable.
NoteThe sample code in this topic applies to the Singapore region.
ImportantAlibaba Cloud Model Studio provides dedicated workspace domains for the China (Beijing) and Singapore regions, which deliver superior performance and higher stability for inference requests. We recommend that you migrate to the new domains:
- China (Beijing) region: migrate from
https://dashscope.aliyuncs.comtohttps://{WorkspaceId}.cn-beijing.maas.aliyuncs.com - Singapore region: migrate from
https://dashscope-intl.aliyuncs.comtohttps://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com
Among them, {WorkspaceId} is your workspace ID, which you can view on the Workspace Details page in the Alibaba Cloud Model Studio console. The existing domains remain available.
HTTP call
ImportantThis API uses the new protocol and supports the wan2.7 models.
Since video generation tasks take a long time (usually 1 to 5 minutes), the API uses asynchronous calls. The entire process involves two core steps: "create a task -> poll for the result", as follows:
Step 1: Create a task to obtain the task ID
Singapore
POST https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis
Beijing
POST https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis
When you call the API, replace {WorkspaceId} with your actual workspace ID.
Note
- After the task is created successfully, use the
task_idreturned by the API to query the result. The task_id is valid for 24 hours. Do not create the task repeatedly; just poll for the result. - For a quick start guide, see Postman.
Request parametersRequest headersContent-Type Request content type. This parameter must be set to Authorization Request authentication. The API uses the Alibaba Cloud Model Studio API Key for authentication. Example value: Bearer sk-xxxx. X-DashScope-Async Asynchronous processing configuration parameter. HTTP requests support asynchronous mode only and must be set to ImportantIf this request header is missing, an error is reported: "current user api does not support synchronous calls". Request Bodymodel The model name. For the model list and prices, see Model Price. Example values: wan2.7-r2v, wan2.7-r2v-2026-06-12. input Basic input information, such as the prompt. parameters Video processing parameters, such as setting the video resolution. | Multi-subject reference (image + video + voice)Provide multiple reference assets (images + videos) and specify a voice to generate a video. Single-image reference (multi-grid image)Provide a nine-grid reference image to control the story direction, camera composition, and character settings to generate a video. |
Response parametersoutput The task output information. request_id The unique request identifier. It can be used to trace request details and troubleshoot issues. code The error code returned when the request fails. This parameter is not returned when the request succeeds. For details, see Error codes. message The detailed error information returned when the request fails. This parameter is not returned when the request succeeds. For details, see Error codes. | Success responseSave the task_id, which is used to query the task status and results. Error responseFailed to create the task. See Error codes for troubleshooting. |
Step 2: Query results by task ID
Singapore
GET https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v1/tasks/{task_id}
Beijing
GET https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/tasks/{task_id}
When you call the API, replace {WorkspaceId} with your actual workspace ID.
Note
- Polling recommendation: Video generation takes several minutes. We recommend using a polling mechanism and setting a reasonable query interval (such as 15 seconds) to obtain results.
- Task status transitions: PENDING (queuing) → RUNNING (processing) → SUCCEEDED (success) / FAILED (failed).
- Result link: A video link is returned after the task succeeds, with a validity period of 24 hours. We recommend downloading the video immediately after obtaining the link and transferring it to permanent storage (such as Alibaba Cloud OSS).
- task_id validity period: 24 hours. After it expires, results can no longer be queried, and the API returns the task status
UNKNOWN.
Request parametersRequest headers (Headers)Authorization Request authentication. The API uses the Alibaba Cloud Model Studio API Key for authentication. Example value: Bearer sk-xxxx. URL path parameters (Path parameters)task_id The task ID. | Query task resultsReplace |
Response parametersoutput The task output information. usage Output information statistics. Only successful results are counted. request_id The unique request identifier. It can be used to trace request details and troubleshoot issues. | Task executed successfullyThe video URL is retained for only 24 hours and will be automatically deleted after it expires. Save the generated video in a timely manner. Task execution failedIf the task fails, task_status will be set to FAILED, with an error code and message provided. See Error codes for troubleshooting. Task query expiredThe task_id can be queried within 24 hours. After that, the query will no longer be available and the following error message will be returned. |
Calling the DashScope SDK
The SDK parameter naming is basically the same as that of the HTTP API, and the parameter structure is encapsulated based on language-specific features.
A reference-to-video task usually takes 1–5 minutes. The SDK encapsulates the HTTP asynchronous call process and supports both synchronous and asynchronous call methods.
The actual time required depends on the number of queued tasks and the service running status.
Calling the Python SDK
ImportantBefore running the following code, make sure the DashScope Python SDK version is ≥2.0.1.
A version that is too old may trigger errors such as "url error, please check url!". See Install the SDK to update it.
Set region based on the region where the model is located (pass it in when constructing the Client; the region value varies by region):
Singapore
region="ap-southeast-1"
Beijing
region="cn-beijing"
When you call the API, replace {WorkspaceId} with your actual workspace ID.
Synchronous call
A synchronous call blocks until video generation is complete and directly returns the result.
Request example
import dashscope
import os
from dashscope import DashScopeError
# The following is the configuration for the Singapore (ap-southeast-1) region. Replace {WorkspaceId} with your actual workspace ID when calling. The region value varies by region.
client = dashscope.Client(
# If you have not configured the environment variable, replace the following line with your Model Studio API key: api_key="sk-xxx"
# The API keys differ by region. To get an API key, see https://www.alibabacloud.com/help/model-studio/get-api-key
api_key=os.getenv("DASHSCOPE_API_KEY"),
workspace="{WorkspaceId}",
region="ap-southeast-1",
)
def sample_sync_call_r2v():
# Synchronous call that returns the result directly.
# generate is a one-step call (submits the task and waits for completion) that returns a completed Job.
print('please wait...')
try:
job = client.videos.generate(
model='wan2.7-r2v-2026-06-12',
prompt='视频1抱着图3,在图4的椅子上弹奏一支舒缓的乡村民谣,并说道:“今天的阳光真好。”图1手中拿着图2,路过视频1,把手中的图2放到视频1旁边的桌子上,并说道:“真好听,能不能再唱一遍”。 ',
media=[
{
"type": "reference_image",
"url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260408/sjuytr/wan-r2v-object-girl.jpg",
"reference_voice": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260408/gbqewz/wan-r2v-girl-voice.mp3"
},
{
"type": "reference_video",
"url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/qigswt/wan-r2v-role2.mp4",
"reference_voice": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260408/isllrq/wan-r2v-boy-voice.mp3"
},
{
"type": "reference_image",
"url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/rtjeqf/wan-r2v-object3.png"
},
{
"type": "reference_image",
"url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/qpzxps/wan-r2v-object4.png"
},
{
"type": "reference_image",
"url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/wfjikw/wan-r2v-backgroud5.png"
}
],
resolution='720P',
ratio='16:9',
duration=10,
prompt_extend=False,
watermark=True)
print(job)
print(job.video_url)
except DashScopeError as e:
print(f"HTTP status code: {e.status_code}")
print(f"Error code: {e.code}")
print(f"Error message: {e.message}")
print("See the documentation: https://www.alibabacloud.com/help/model-studio/developer-reference/error-code")
if __name__ == '__main__':
sample_sync_call_r2v()
Response example
The video_url is valid for 24 hours. Download the video in a timely manner.
{
"request_id": "b040d446-f9b6-977f-b9ad-xxxxxx",
"task_id": "5dab3291-393e-424d-929b-xxxxxx",
"status": "SUCCEEDED",
"video_url": "https://dashscope-a717.oss-accelerate.aliyuncs.com/xxx.mp4?Expires=xxx",
"task_metrics": {
"TOTAL": 1,
"SUCCEEDED": 1,
"FAILED": 0
},
"usage": {
"video_count": 1,
"duration": 15,
"input_video_duration": 5,
"output_video_duration": 10,
"SR": 720,
"ratio": "16:9"
}
}
Asynchronous call
An asynchronous call immediately returns a task ID. You can use fetch to query the task status or call wait to wait for completion (with automatic internal polling).
Request example
import dashscope
import os
from dashscope import DashScopeError
# The following is the configuration for the Singapore (ap-southeast-1) region. Replace {WorkspaceId} with your actual workspace ID when calling. The region value varies by region.
client = dashscope.Client(
# If you have not configured the environment variable, replace the following line with your Model Studio API key: api_key="sk-xxx"
# The API keys differ by region. To get an API key, see https://www.alibabacloud.com/help/model-studio/get-api-key
api_key=os.getenv("DASHSCOPE_API_KEY"),
workspace="{WorkspaceId}",
region="ap-southeast-1",
)
def sample_async_call_r2v():
# Make an asynchronous call, which returns a task_id.
try:
job = client.videos.jobs.create(
model='wan2.7-r2v-2026-06-12',
prompt='视频1抱着图3,在图4的椅子上弹奏一支舒缓的乡村民谣,并说道:“今天的阳光真好。”图1手中拿着图2,路过视频1,把手中的图2放到视频1旁边的桌子上,并说道:“真好听,能不能再唱一遍”。 ',
media=[
{
"type": "reference_image",
"url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260408/sjuytr/wan-r2v-object-girl.jpg",
"reference_voice": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260408/gbqewz/wan-r2v-girl-voice.mp3"
},
{
"type": "reference_video",
"url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/qigswt/wan-r2v-role2.mp4",
"reference_voice": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260408/isllrq/wan-r2v-boy-voice.mp3"
},
{
"type": "reference_image",
"url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/rtjeqf/wan-r2v-object3.png"
},
{
"type": "reference_image",
"url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/qpzxps/wan-r2v-object4.png"
},
{
"type": "reference_image",
"url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/wfjikw/wan-r2v-backgroud5.png"
}
],
resolution='720P',
ratio='16:9',
duration=10,
prompt_extend=False,
watermark=True)
print(job)
print("task_id: %s" % job.task_id)
except DashScopeError as e:
print(f"HTTP status code: {e.status_code}")
print(f"Error code: {e.code}")
print(f"Error message: {e.message}")
print("See the documentation: https://www.alibabacloud.com/help/model-studio/developer-reference/error-code")
return
# Get the asynchronous task information.
try:
snapshot = client.videos.jobs.fetch(job.task_id)
print(snapshot.status)
except DashScopeError as e:
print(f"HTTP status code: {e.status_code}")
print(f"Error code: {e.code}")
print(f"Error message: {e.message}")
print("See the documentation: https://www.alibabacloud.com/help/model-studio/developer-reference/error-code")
# Wait for the asynchronous task to complete.
# (2.0 jobs.wait uses exponential backoff polling, with a default total budget of 24 hours.)
try:
done = client.videos.jobs.wait(job)
print(done)
print(done.video_url)
except DashScopeError as e:
print(f"HTTP status code: {e.status_code}")
print(f"Error code: {e.code}")
print(f"Error message: {e.message}")
print("See the documentation: https://www.alibabacloud.com/help/model-studio/developer-reference/error-code")
if __name__ == '__main__':
sample_async_call_r2v()
Response example
- Response example of creating a task
{
"request_id": "6dc3bf6c-be18-9268-9c27-xxxxxx",
"task_id": "686391d9-7ecf-4290-a8e9-xxxxxx",
"status": "PENDING"
}
- Response example of querying the task result
The video_url is valid for 24 hours. Download the video in a timely manner.
{
"request_id": "b040d446-f9b6-977f-b9ad-xxxxxx",
"task_id": "5dab3291-393e-424d-929b-xxxxxx",
"status": "SUCCEEDED",
"video_url": "https://dashscope-a717.oss-accelerate.aliyuncs.com/xxx.mp4?Expires=xxx",
"task_metrics": {
"TOTAL": 1,
"SUCCEEDED": 1,
"FAILED": 0
},
"usage": {
"video_count": 1,
"duration": 15,
"input_video_duration": 5,
"output_video_duration": 10,
"SR": 720,
"ratio": "16:9"
}
}
Calling the Java SDK
ImportantBefore running the following code, make sure the DashScope Java SDK version is ≥2.22.14.
A version that is too old may trigger errors such as "url error, please check url!". See Install the SDK to update it.
Set baseHttpApiUrl based on the region where the model is located:
Singapore
Constants.baseHttpApiUrl = "https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v1";
Beijing
Constants.baseHttpApiUrl = "https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1";
When you call the API, replace {WorkspaceId} with your actual workspace ID.
Synchronous call
A synchronous call blocks until video generation is complete and directly returns the result.
Request example
// Copyright (c) Alibaba, Inc. and its affiliates.
import com.alibaba.dashscope.aigc.videosynthesis.VideoSynthesis;
import com.alibaba.dashscope.aigc.videosynthesis.VideoSynthesisParam;
import com.alibaba.dashscope.aigc.videosynthesis.VideoSynthesisResult;
import com.alibaba.dashscope.exception.ApiException;
import com.alibaba.dashscope.exception.InputRequiredException;
import com.alibaba.dashscope.exception.NoApiKeyException;
import com.alibaba.dashscope.utils.JsonUtils;
import com.alibaba.dashscope.utils.Constants;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class Ref2Video {
static {
// The following URL is for the Singapore region. When calling, replace {WorkspaceId} with your actual workspace ID. URLs vary by region.
Constants.baseHttpApiUrl = "https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v1";
}
// If you have not configured the environment variable, replace the following line with your Model Studio API key: apiKey="sk-xxx"
// API keys differ by region. Get an API key: https://www.alibabacloud.com/help/model-studio/get-api-key
public static String apiKey = System.getenv("DASHSCOPE_API_KEY");
public static void ref2video() throws ApiException, NoApiKeyException, InputRequiredException {
VideoSynthesis vs = new VideoSynthesis();
List<VideoSynthesisParam.Media> media = new ArrayList<VideoSynthesisParam.Media>(){{
add(VideoSynthesisParam.Media.builder()
.url("https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260408/sjuytr/wan-r2v-object-girl.jpg")
.type("reference_image")
.referenceVoice("https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260408/gbqewz/wan-r2v-girl-voice.mp3")
.build());
add(VideoSynthesisParam.Media.builder()
.url("https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/qigswt/wan-r2v-role2.mp4")
.type("reference_video")
.referenceVoice("https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260408/isllrq/wan-r2v-boy-voice.mp3")
.build());
add(VideoSynthesisParam.Media.builder()
.url("https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/rtjeqf/wan-r2v-object3.png")
.type("reference_image")
.build());
add(VideoSynthesisParam.Media.builder()
.url("https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/qpzxps/wan-r2v-object4.png")
.type("reference_image")
.build());
add(VideoSynthesisParam.Media.builder()
.url("https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/wfjikw/wan-r2v-backgroud5.png")
.type("reference_image")
.build());
}};
Map<String, Object> parameters = new HashMap<>();
parameters.put("resolution", "720P");
parameters.put("ratio", "16:9");
parameters.put("prompt_extend", false);
parameters.put("watermark", true);
VideoSynthesisParam param =
VideoSynthesisParam.builder()
.apiKey(apiKey)
.model("wan2.7-r2v-2026-06-12")
.prompt("视频1抱着图3,在图4的椅子上弹奏一支舒缓的乡村民谣,并说道:“今天的阳光真好。”图1手中拿着图2,路过视频1,把手中的图2放到视频1旁边的桌子上,并说道:“真好听,能不能再唱一遍”。 ")
.media(media)
.duration(10)
.parameters(parameters)
.build();
System.out.println("please wait...");
VideoSynthesisResult result = vs.call(param);
System.out.println(JsonUtils.toJson(result));
}
public static void main(String[] args) {
try {
ref2video();
} catch (ApiException | NoApiKeyException | InputRequiredException e) {
System.out.println(e.getMessage());
}
System.exit(0);
}
}
Response example
The video_url is valid for 24 hours. Download the video in a timely manner.
{
"request_id": "f6365287-336f-9f2b-ab59-xxxxxx",
"output": {
"task_id": "cb7f1da5-a987-41de-b0a4-xxxxxx",
"task_status": "SUCCEEDED",
"video_url": "https://dashscope-a717.oss-accelerate.aliyuncs.com/xxx.mp4?Expires=xxxx",
"orig_prompt": "视频1抱着图3,在图4的椅子上弹奏一支舒缓的乡村民谣,并说道:“今天的阳光真好。”图1手中拿着图2,路过视频1,把手中的图2放到视频1旁边的桌子上,并说道:“真好听,能不能再唱一遍”。 ",
"submit_time": "2026-04-17 17:15:11.536",
"scheduled_time": "2026-04-17 17:15:20.316",
"end_time": "2026-04-17 17:29:44.277"
},
"usage": {
"video_count": 1,
"duration": 15.0,
"input_video_duration": 5.0,
"output_video_duration": 10.0,
"SR": "720"
},
"status_code": 200,
"code": "",
"message": ""
}
Asynchronous call
An asynchronous call immediately returns a task ID. You can use fetch to query the task status or call wait to wait for completion (with automatic internal polling).
Request example
// Copyright (c) Alibaba, Inc. and its affiliates.
import com.alibaba.dashscope.aigc.videosynthesis.VideoSynthesis;
import com.alibaba.dashscope.aigc.videosynthesis.VideoSynthesisListResult;
import com.alibaba.dashscope.aigc.videosynthesis.VideoSynthesisParam;
import com.alibaba.dashscope.aigc.videosynthesis.VideoSynthesisResult;
import com.alibaba.dashscope.exception.ApiException;
import com.alibaba.dashscope.exception.InputRequiredException;
import com.alibaba.dashscope.exception.NoApiKeyException;
import com.alibaba.dashscope.task.AsyncTaskListParam;
import com.alibaba.dashscope.utils.JsonUtils;
import com.alibaba.dashscope.utils.Constants;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class Ref2VideoAsync {
static {
// The following URL is for the Singapore region. When calling, replace {WorkspaceId} with your actual workspace ID. URLs vary by region.
Constants.baseHttpApiUrl = "https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v1";
}
// If you have not configured the environment variable, replace the following line with your Model Studio API key: apiKey="sk-xxx"
// API keys differ by region. Get an API key: https://www.alibabacloud.com/help/model-studio/get-api-key
public static String apiKey = System.getenv("DASHSCOPE_API_KEY");
public static void asyncRef2video() throws ApiException, NoApiKeyException, InputRequiredException, InterruptedException {
VideoSynthesis vs = new VideoSynthesis();
List<VideoSynthesisParam.Media> media = new ArrayList<VideoSynthesisParam.Media>(){{
add(VideoSynthesisParam.Media.builder()
.url("https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260408/sjuytr/wan-r2v-object-girl.jpg")
.type("reference_image")
.referenceVoice("https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260408/gbqewz/wan-r2v-girl-voice.mp3")
.build());
add(VideoSynthesisParam.Media.builder()
.url("https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/qigswt/wan-r2v-role2.mp4")
.type("reference_video")
.referenceVoice("https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260408/isllrq/wan-r2v-boy-voice.mp3")
.build());
add(VideoSynthesisParam.Media.builder()
.url("https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/rtjeqf/wan-r2v-object3.png")
.type("reference_image")
.build());
add(VideoSynthesisParam.Media.builder()
.url("https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/qpzxps/wan-r2v-object4.png")
.type("reference_image")
.build());
add(VideoSynthesisParam.Media.builder()
.url("https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/wfjikw/wan-r2v-backgroud5.png")
.type("reference_image")
.build());
}};
Map<String, Object> parameters = new HashMap<>();
parameters.put("resolution", "720P");
parameters.put("ratio", "16:9");
parameters.put("prompt_extend", false);
parameters.put("watermark", true);
VideoSynthesisParam param =
VideoSynthesisParam.builder()
.apiKey(apiKey)
.model("wan2.7-r2v-2026-06-12")
.prompt("视频1抱着图3,在图4的椅子上弹奏一支舒缓的乡村民谣,并说道:“今天的阳光真好。”图1手中拿着图2,路过视频1,把手中的图2放到视频1旁边的桌子上,并说道:“真好听,能不能再唱一遍”。 ")
.media(media)
.duration(10)
.parameters(parameters)
.build();
// Submit an asynchronous task
VideoSynthesisResult result = vs.asyncCall(param);
System.out.println("task_id: " + result.getOutput().getTaskId());
System.out.println(JsonUtils.toJson(result));
// Wait for the task to complete
result = vs.wait(result, null);
System.out.println(JsonUtils.toJson(result));
}
public static void main(String[] args) {
try {
asyncRef2video();
} catch (ApiException | NoApiKeyException | InputRequiredException | InterruptedException e) {
System.out.println(e.getMessage());
}
System.exit(0);
}
}
Response example
- Response example of creating a task
{
"request_id": "5dbf9dc5-4f4c-9605-85ea-xxxxxxxx",
"output": {
"task_id": "7277e20e-aa01-4709-xxxxxxxx",
"task_status": "PENDING"
}
}
- Response example of querying the task result
The video_url is valid for 24 hours. Download the video in a timely manner.
{
"request_id": "f6365287-336f-9f2b-ab59-xxxxxx",
"output": {
"task_id": "cb7f1da5-a987-41de-b0a4-xxxxxx",
"task_status": "SUCCEEDED",
"video_url": "https://dashscope-a717.oss-accelerate.aliyuncs.com/xxx.mp4?Expires=xxxx",
"orig_prompt": "视频1抱着图3,在图4的椅子上弹奏一支舒缓的乡村民谣,并说道:“今天的阳光真好。”图1手中拿着图2,路过视频1,把手中的图2放到视频1旁边的桌子上,并说道:“真好听,能不能再唱一遍”。 ",
"submit_time": "2026-04-17 17:15:11.536",
"scheduled_time": "2026-04-17 17:15:20.316",
"end_time": "2026-04-17 17:29:44.277"
},
"usage": {
"video_count": 1,
"duration": 15.0,
"input_video_duration": 5.0,
"output_video_duration": 10.0,
"SR": "720"
},
"status_code": 200,
"code": "",
"message": ""
}
Error codes
If a model call fails and returns an error message, see Error codes to resolve the issue.
FAQ
What code changes are required when upgrading from wan2.6 to wan2.7?
The main differences are as follows:
-
Different reference notation in prompts
wan2.7 no longer uses identifiers such as character1 and character2. Instead, references are made by type: images are referenced as "Image 1", "Image 2", and videos as "Video 1", "Video 2". For details about prompts, see prompt parameter.
-
Different multi-shot control method
- wan2.7: The shot_type parameter is not supported. Multi-shot effects are achieved by describing the storyboard in the prompt.
- wan2.6: Multi-shot videos are generated by setting shot_type to multi.
-
Different request parameter structure
- How reference assets are passed in: wan2.7 uses
media(an array of objects, each containingtypeandurl), replacing wan2.6'sreference_urls(an array of strings). - Resolution parameter: wan2.7 uses
resolution(for example,720P), replacing wan2.6'ssize(for example,1280*720). - audio parameter: wan2.7 generates videos with audio by default, so no setting is required. wan2.6 requires explicitly setting
audiototrueorfalse.
- How reference assets are passed in: wan2.7 uses
How do I add a voiceover for a subject (voice reference)?
Only wan2.7 supports this. Pass an audio URL via reference_voice in media to specify a reference voice for a reference image or reference video.
{
"media": [
{
"type": "reference_image",
"url": "<参考图像URL>",
"reference_voice": "<音频URL>"
},
{
"type": "reference_video",
"url": "<参考视频URL>",
"reference_voice": "<音频URL>"
}
]
}