万相图像编辑模型系列支持多图输入与多图输出,通过文本指令实现图像编辑、多图融合、主体特征保持、目标检测与分割等能力。
快速开始
本示例将演示如何使用wan2.7-image-pro模型,基于2张输入图片和提示词生成编辑后的图像。
提示词:把图2的涂鸦喷绘在图1的汽车上
输入图像1 | 输入图像2 | 输出图像(wan2.7-image-pro) |
|
|
|
在调用前,先获取API Key,再配置API Key到环境变量。如需通过SDK进行调用,请安装DashScope SDK。
同步调用
请确保 DashScope Python SDK 版本不低于 1.25.15, DashScope Java SDK 版本不低于 2.22.13。
Python
请求示例
import os
import dashscope
from dashscope.aigc.image_generation import ImageGeneration
from dashscope.api_entities.dashscope_response import Message
# 以下为北京地域base_url,各地域的base_url不同
dashscope.base_http_api_url = 'https://dashscope.aliyuncs.com/api/v1'
# 若没有配置环境变量,请用百炼API Key将下行替换为:api_key="sk-xxx"
# 各地域的API Key不同。获取API Key:https://help.aliyun.com/zh/model-studio/get-api-key
api_key = os.getenv("DASHSCOPE_API_KEY")
message = Message(
role="user",
# 支持本地文件 如 "image": "file://car.png"
content=[
{
"text": "把图2的涂鸦喷绘在图1的汽车上"
},
{
"image": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20251229/pjeqdf/car.webp"
},
{
"image": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20251229/xsunlm/paint.webp"
}
]
)
print("----sync call, please wait a moment----")
rsp = ImageGeneration.call(
model='wan2.7-image-pro',
api_key=api_key,
messages=[message],
watermark=False,
n=1,
size="2K"
)
print(rsp)响应示例
url 有效期24小时,请及时下载图像。
{
"status_code": 200,
"request_id": "81d868c6-6ce1-92d8-a90d-d2ee71xxxxxx",
"code": "",
"message": "",
"output": {
"text": null,
"finish_reason": null,
"choices": [
{
"finish_reason": "stop",
"message": {
"role": "assistant",
"content": [
{
"image": "https://dashscope-result-bj.oss-cn-beijing.aliyuncs.com/xxxxxx.png?Expires=xxxxxx",
"type": "image"
}
]
}
}
],
"audio": null,
"finished": true
},
"usage": {
"input_tokens": 18790,
"output_tokens": 2,
"characters": 0,
"image_count": 1,
"size": "2985*1405",
"total_tokens": 18792
}
}Java
请求示例
import com.alibaba.dashscope.aigc.imagegeneration.*;
import com.alibaba.dashscope.exception.ApiException;
import com.alibaba.dashscope.exception.NoApiKeyException;
import com.alibaba.dashscope.exception.UploadFileException;
import com.alibaba.dashscope.utils.Constants;
import com.alibaba.dashscope.utils.JsonUtils;
import java.util.Arrays;
import java.util.Collections;
/**
* wan2.7-image-pro 图像编辑 - 同步调用示例
*/
public class Main {
static {
// 以下为北京地域url,各地域的base_url不同
Constants.baseHttpApiUrl = "https://dashscope.aliyuncs.com/api/v1";
}
// 若没有配置环境变量,请用百炼API Key将下行替换为:apiKey="sk-xxx"
// 各地域的API Key不同。获取API Key:https://help.aliyun.com/zh/model-studio/get-api-key
static String apiKey = System.getenv("DASHSCOPE_API_KEY");
public static void basicCall() throws ApiException, NoApiKeyException, UploadFileException {
// 构建多图输入消息
ImageGenerationMessage message = ImageGenerationMessage.builder()
.role("user")
.content(Arrays.asList(
// 支持多图输入,可以提供多张参考图片
Collections.singletonMap("text", "把图2的涂鸦喷绘在图1的汽车上"),
Collections.singletonMap("image", "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20251229/pjeqdf/car.webp"),
Collections.singletonMap("image", "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20251229/xsunlm/paint.webp")
)).build();
ImageGenerationParam param = ImageGenerationParam.builder()
.apiKey(apiKey)
.model("wan2.7-image-pro")
.messages(Collections.singletonList(message))
.n(1)
.size("2K")
.build();
ImageGeneration imageGeneration = new ImageGeneration();
ImageGenerationResult result = null;
try {
System.out.println("---sync call for image editing, please wait a moment----");
result = imageGeneration.call(param);
} catch (ApiException | NoApiKeyException | UploadFileException e) {
throw new RuntimeException(e.getMessage());
}
System.out.println(JsonUtils.toJson(result));
}
public static void main(String[] args) {
try {
basicCall();
} catch (ApiException | NoApiKeyException | UploadFileException e) {
System.out.println(e.getMessage());
}
}
}
响应示例
url 有效期24小时,请及时保存。
{
"requestId": "1bf6173a-e8de-9f75-94d3-5e618f875xxx",
"usage": {
"input_tokens": 18790,
"output_tokens": 2,
"total_tokens": 18792,
"image_count": 1,
"size": "2985*1405"
},
"output": {
"choices": [
{
"finish_reason": "stop",
"message": {
"role": "assistant",
"content": [
{
"image": "https://dashscope-result-bj.oss-cn-beijing.aliyuncs.com/xxxxxx.png?Expires=xxxxxx",
"type": "image"
}
]
}
}
],
"finished": true
},
"status_code": 200,
"code": "",
"message": ""
}curl
请求示例
curl --location 'https://dashscope.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation' \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--data '{
"model": "wan2.7-image-pro",
"input": {
"messages": [
{
"role": "user",
"content": [
{"image": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20251229/pjeqdf/car.webp"},
{"image": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20251229/xsunlm/paint.webp"},
{"text": "把图2的涂鸦喷绘在图1的汽车上"}
]
}
]
},
"parameters": {
"size": "2K",
"n": 1,
"watermark": false,
"thinking_mode": true
}
}'
响应示例
{
"output": {
"choices": [
{
"finish_reason": "stop",
"message": {
"content": [
{
"image": "https://dashscope-xxx.oss-xxx.aliyuncs.com/xxx.png?Expires=xxx",
"type": "image"
}
],
"role": "assistant"
}
}
],
"finished": true
},
"usage": {
"image_count": 1,
"input_tokens": 10867,
"output_tokens": 2,
"size": "1488*704",
"total_tokens": 10869
},
"request_id": "71dfc3c6-f796-9972-97e4-bc4efc4faxxx"
}异步调用
请确保 DashScope Python SDK 版本不低于 1.25.15, DashScope Java SDK 版本不低于 2.22.13。
Python
请求示例
import os
import dashscope
from dashscope.aigc.image_generation import ImageGeneration
from dashscope.api_entities.dashscope_response import Message
from http import HTTPStatus
# 以下为北京地域base_url,各地域的base_url不同
dashscope.base_http_api_url = 'https://dashscope.aliyuncs.com/api/v1'
# 若没有配置环境变量,请用百炼API Key将下行替换为:api_key="sk-xxx"
# 各地域的API Key不同。获取API Key:https://help.aliyun.com/zh/model-studio/get-api-key
api_key = os.getenv("DASHSCOPE_API_KEY")
# 创建异步任务
def create_async_task():
print("Creating async task...")
message = Message(
role="user",
content=[
{'text': '把图2的涂鸦喷绘在图1的汽车上'},
{'image': 'https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20251229/pjeqdf/car.webp'},
{'image': 'https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20251229/xsunlm/paint.webp'}
]
)
response = ImageGeneration.async_call(
model="wan2.7-image-pro",
api_key=api_key,
messages=[message],
watermark=False,
n=1,
size="2K"
)
if response.status_code == 200:
print("Task created successfully:", response)
return response # 返回任务ID
else:
raise Exception(f"Failed to create task: {response.code} - {response.message}")
# 等待任务完成
def wait_for_completion(task_response):
print("Waiting for task completion...")
status = ImageGeneration.wait(task=task_response, api_key=api_key)
if status.output.task_status == "SUCCEEDED":
print("Task succeeded!")
print("Response:", status)
else:
raise Exception(f"Task failed with status: {status.output.task_status}")
# 获取异步任务信息
def fetch_task_status(task):
print("Fetching task status...")
status = ImageGeneration.fetch(task=task, api_key=api_key)
if status.status_code == HTTPStatus.OK:
print("Task status:", status.output.task_status)
print("Response details:", status)
else:
print(f"Failed to fetch status: {status.code} - {status.message}")
# 取消异步任务
def cancel_task(task):
print("Canceling task...")
response = ImageGeneration.cancel(task=task, api_key=api_key)
if response.status_code == HTTPStatus.OK:
print("Task canceled successfully:", response.output.task_status)
else:
print(f"Failed to cancel task: {response.code} - {response.message}")
# 主执行流程
if __name__ == "__main__":
task = create_async_task()
wait_for_completion(task)
响应示例
1、创建任务的响应示例
{
"status_code": 200,
"request_id": "4fb3050f-de57-4a24-84ff-e37ee5xxxxxx",
"code": "",
"message": "",
"output": {
"text": null,
"finish_reason": null,
"choices": null,
"audio": null,
"task_id": "127ec645-118f-4884-955d-0eba8dxxxxxx",
"task_status": "PENDING"
},
"usage": {
"input_tokens": 0,
"output_tokens": 0,
"characters": 0
}
}2、查询任务结果的响应示例
url 有效期24小时,请及时下载图像。
{
"status_code": 200,
"request_id": "3b99aae5-d26f-9059-8dd0-ee9ca4804xxx",
"code": null,
"message": "",
"output": {
"text": null,
"finish_reason": null,
"choices": [
{
"finish_reason": "stop",
"message": {
"role": "assistant",
"content": [
{
"image": "https://dashscope-result-bj.oss-cn-beijing.aliyuncs.com/xxxxxx.png?Expires=xxxxxx",
"type": "image"
}
]
}
}
],
"audio": null,
"task_id": "127ec645-118f-4884-955d-0eba8dxxxxxx",
"task_status": "SUCCEEDED",
"submit_time": "2026-03-31 22:58:47.646",
"scheduled_time": "2026-03-31 22:58:47.683",
"end_time": "2026-03-31 22:58:59.642",
"finished": true
},
"usage": {
"input_tokens": 18711,
"output_tokens": 2,
"characters": 0,
"size": "2985*1405",
"total_tokens": 18713,
"image_count": 1
}
}Java
请求示例
import com.alibaba.dashscope.aigc.imagegeneration.*;
import com.alibaba.dashscope.exception.ApiException;
import com.alibaba.dashscope.exception.NoApiKeyException;
import com.alibaba.dashscope.exception.UploadFileException;
import com.alibaba.dashscope.utils.Constants;
import com.alibaba.dashscope.utils.JsonUtils;
import java.util.Arrays;
import java.util.Collections;
/**
* wan2.7-image-pro 图像编辑 - 异步调用示例
*/
public class Main {
static {
// 以下为北京地域url,各地域的base_url不同
Constants.baseHttpApiUrl = "https://dashscope.aliyuncs.com/api/v1";
}
// 若没有配置环境变量,请用百炼API Key将下行替换为:apiKey="sk-xxx"
// 各地域的API Key不同。获取API Key:https://help.aliyun.com/zh/model-studio/get-api-key
static String apiKey = System.getenv("DASHSCOPE_API_KEY");
public static void asyncCall() throws ApiException, NoApiKeyException, UploadFileException {
// 构建多图输入消息
ImageGenerationMessage message = ImageGenerationMessage.builder()
.role("user")
.content(Arrays.asList(
// 支持多图输入,可以提供多张参考图片
Collections.singletonMap("text", "把图2的涂鸦喷绘在图1的汽车上"),
Collections.singletonMap("image", "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20251229/pjeqdf/car.webp"),
Collections.singletonMap("image", "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20251229/xsunlm/paint.webp")
)).build();
ImageGenerationParam param = ImageGenerationParam.builder()
.apiKey(apiKey)
.model("wan2.7-image-pro")
.n(1)
.size("2K")
.messages(Arrays.asList(message))
.build();
ImageGeneration imageGeneration = new ImageGeneration();
ImageGenerationResult result = null;
try {
System.out.println("---async call for image editing, creating task----");
result = imageGeneration.asyncCall(param);
} catch (ApiException | NoApiKeyException | UploadFileException e) {
throw new RuntimeException(e.getMessage());
}
System.out.println("任务创建结果:");
System.out.println(JsonUtils.toJson(result));
String taskId = result.getOutput().getTaskId();
// 等待任务完成
waitTask(taskId);
}
public static void waitTask(String taskId) throws ApiException, NoApiKeyException {
ImageGeneration imageGeneration = new ImageGeneration();
System.out.println("\n---waiting for task completion----");
ImageGenerationResult result = imageGeneration.wait(taskId, apiKey);
System.out.println("任务完成结果:");
System.out.println(JsonUtils.toJson(result));
}
public static void main(String[] args) {
try {
asyncCall();
} catch (ApiException | NoApiKeyException | UploadFileException e) {
System.out.println(e.getMessage());
}
}
}
响应示例
1、创建任务的响应示例
{
"requestId": "ccf4b2f4-bf30-9e13-9461-3a28c6a7bxxx",
"output": {
"task_id": "8811b4a4-00ac-4aa2-a2fd-017d3b90cxxx",
"task_status": "PENDING"
},
"status_code": 200,
"code": "",
"message": ""
}2、查询任务结果的响应示例
url 有效期24小时,请及时保存。
{
"requestId": "60a08540-f1c1-9e76-8cd3-d5949db8cxxx",
"usage": {
"input_tokens": 18711,
"output_tokens": 2,
"total_tokens": 18713,
"image_count": 1,
"size": "2985*1405"
},
"output": {
"choices": [
{
"finish_reason": "stop",
"message": {
"role": "assistant",
"content": [
{
"image": "https://dashscope-result-bj.oss-cn-beijing.aliyuncs.com/xxxxxx.png?Expires=xxxxxx",
"type": "image"
}
]
}
}
],
"task_id": "8811b4a4-00ac-4aa2-a2fd-017d3b90cxxx",
"task_status": "SUCCEEDED",
"finished": true,
"submit_time": "2026-03-31 19:57:58.840",
"scheduled_time": "2026-03-31 19:57:58.877",
"end_time": "2026-03-31 19:58:11.563"
},
"status_code": 200,
"code": "",
"message": ""
}curl
步骤1:创建任务获取任务ID
curl --location 'https://dashscope.aliyuncs.com/api/v1/services/aigc/image-generation/generation' \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header "X-DashScope-Async: enable" \
--data '{
"model": "wan2.7-image-pro",
"input": {
"messages": [
{
"role": "user",
"content": [
{"image": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20251229/pjeqdf/car.webp"},
{"image": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20251229/xsunlm/paint.webp"},
{"text": "把图2的涂鸦喷绘在图1的汽车上"}
]
}
]
},
"parameters": {
"size": "2K",
"n": 1,
"watermark": false,
"thinking_mode": true
}
}'
响应示例
{
"output": {
"task_status": "PENDING",
"task_id": "0385dc79-5ff8-4d82-bcb6-xxxxxx"
},
"request_id": "4909100c-7b5a-9f92-bfe5-xxxxxx"
}步骤2:根据任务ID查询结果
使用上一步获取的 task_id,通过接口轮询任务状态,直到 task_status 变为 SUCCEEDED 或 FAILED。
将{task_id}完整替换为上一步接口返回的task_id的值。task_id查询有效期为24小时。
curl -X GET https://dashscope.aliyuncs.com/api/v1/tasks/{task_id} \
--header "Authorization: Bearer $DASHSCOPE_API_KEY"响应示例
图像URL有效期为24小时,请及时下载图像。
{
"request_id": "810fa5f5-334c-91f3-aaa4-ed89cf0caxxx",
"output": {
"task_id": "a81ee7cb-014c-473d-b842-76e98311cxxx",
"task_status": "SUCCEEDED",
"submit_time": "2026-03-26 17:16:01.663",
"scheduled_time": "2026-03-26 17:16:01.716",
"end_time": "2026-03-26 17:16:22.961",
"finished": true,
"choices": [
{
"finish_reason": "stop",
"message": {
"role": "assistant",
"content": [
{
"image": "https://dashscope-xxx.oss-xxx.aliyuncs.com/xxx.png?Expires=xxx",
"type": "image"
}
]
}
}
]
},
"usage": {
"size": "2976*1408",
"total_tokens": 11017,
"image_count": 1,
"output_tokens": 2,
"input_tokens": 11015
}
}wan2.5-i2i-preview使用不同的API端点和参数传入方式,其调用示例如下:
模型选型
wan2.7-image-pro、wan2.7-image(推荐):适合对编辑精度要求高、或需要生成多张内容连贯图像的场景。
精准局部编辑:框选图中指定区域,对该区域的对象进行移动、替换或添加新元素,适用于电商修图、设计稿调整
多格连续图生成:一次输出多张风格统一的图像,适用于漫画分镜、产品系列图、故事连环图
wan2.6-image:适合图文混排或带多张参考图的风格化编辑场景,支持在生成图像时生成对应文字内容,最多支持 4 张参考图输入。
wan2.5-i2i-preview:适合简单的图像编辑和多图融合。
效果展示
图生组图
输入图像 | 输出图像 |
|
|
|
|
交互式编辑
输入图像 | 输出图像 |
|
在图1基础上编辑,将图1框选的冰块替换成图2框选的水果,保持其他细节不变 |
|
将图1中框选的图案放置到图二中框选处 |
多图融合
输入图像 | 输出图像 |
|
给图1的男生和图2的狗拍一张写真,男生搂着这只狗,人和狗都很开心,摄影棚柔和灯光,蓝色纹理背景 |
|
给图1的裙子按照图2鸟的颜色进行配色,充满艺术感,衣服款式不变,模特不变 |
主体特征保持
输入图像 | 输出图像 |
|
保持人物脸部特征和发型不变,人物穿米白色吊带,透明鱼缸占据全屏,金鱼游动,水里有泡泡,透过透明鱼缸和水露出后方人物脸。昏黄色光影从右下角打向人物面部,鱼游动,随机遮挡人物,光影明暗交错。 |
|
请生成一套4宫格“季节变迁”主题的拍立得套图,共四张。每一张照片都是在同一个地点,公园里的一棵树下拍摄的,但分别展现了春夏秋冬四个季节的景象。人物的着装也需与季节相匹配,春天的薄外套、夏天的短袖、秋天的风衣、冬天的围巾和厚大衣。并将这组照片放在餐桌上。 |
检测和分割
输入图像 | 输出图像 |
|
检测图片中的笔记本电脑和闹钟,画框并标注“laptop”和“clock” |
|
分割图片中的玻璃杯 |
提取元素
输入图像 | 输出图像 |
|
从上传照片中提取穿搭单品,将它们以平铺展示的方式排列在纯白背景上,保持真实细节与材质质感,时尚电商风格,适合服装展示。 |
文本编辑
输入图像 | 输出图像 |
|
去除全图水印 |
|
用手在沙滩上随意的写上“Time for Holiday?” |
|
把18改成29,把JUNE改成SEPTEMBER |
镜头与视角编辑
输入图像 | 输出图像 |
|
保持人物的特征不变,生成正视图、侧视图和背视图 |
|
用鱼眼镜头重新拍摄这张照片 |
输入说明
输入图像规格
规格 | wan2.7-image-pro、wan2.7-image | wan2.6-image | wan2.5-i2i-preview |
输入图像数量 | 0~9 张(0张对应文生图模式) | 图像编辑 1~4 张 / 图文混排 0~1 张 | 1~3 张 |
图片格式 | JPEG、JPG、PNG(不支持透明通道)、BMP、WEBP | JPEG、JPG、PNG(不支持透明通道)、BMP、WEBP | JPEG、JPG、PNG(不支持透明通道)、BMP、WEBP |
图片宽高范围 | [240, 8000] 像素 | [240, 8000] 像素 | [384, 5000] 像素 |
文件大小 | ≤ 20MB | ≤ 10MB | ≤ 10MB |
宽高比 | [1:8, 8:1] | 不限 | [1:4, 4:1] |
图像输入顺序
多图输入时,按照数组中的顺序定义图像顺序。因此,提示词引用的图像编号需要与图像数组中的顺序一一对应,例如:数组中的第一张图片为"图1",第二张为"图2",或者使用标记形式如"[图1]"、"[图2]"。
{
"content": [
{"text": "编辑指令,如:将图1中的闹钟放置到图2的餐桌的花瓶旁边位置"},
{"image": "https://example.com/image1.png"},
{"image": "https://example.com/image2.png"}
]
}输入图像 | 输出图像 | ||
图1 |
图2 |
提示词:把图1移动到图2上 |
提示词:把图2移动到图1上 |
图像传入方式
支持通过以下方式传入图像:
关键能力
1. 指令遵循(提示词)
参数:messages.content.text或input.prompt(必选)、negative_prompt(可选)。
text \ prompt(正向提示词):描述希望在画面中看到的内容、主体、场景、风格、光照和构图。
negative_prompt(反向提示词):描述不希望在画面中出现的内容,如“模糊”、“多余的手指”等。仅用于辅助优化生成质量。
参数 | wan2.7-image-pro、wan2.7-image | wan2.6-image | wan2.5-i2i-preview |
text | 必选,最多5000字符 | 必选,最多2000字符 | 不支持 |
prompt | 不支持 | 不支持 | 必选,最多2000字符 |
negative_prompt | 不支持 | 支持,最多500字符 | 支持,最多500字符 |
2. 开启prompt智能改写
参数: parameters.prompt_extend (bool, 默认为 true)。
此功能可自动扩展和优化较短的Prompt,提升输出图像效果。开启此功能会增加额外耗时。
实践建议:
建议开启:当输入 Prompt 较简洁或宽泛时,此功能可提升图像效果。
建议关闭:若需控制画面细节、或已提供详细描述,或对响应延迟敏感。请将参数
prompt_extend显式设为false。
参数 | wan2.7-image-pro、wan2.7-image | wan2.6-image | wan2.5-i2i-preview |
prompt_extend | 不支持 | 支持(仅图像编辑模式) | 支持 |
3. 设置输出图像分辨率
参数: parameters.size (string),格式为 "宽*高"。
参数 | wan2.7-image-pro、wan2.7-image | wan2.6-image | wan2.5-i2i-preview |
size | 方式一:指定输出图片的分辨率(推荐) 编辑模式(传入至少一张图片),可选的输出分辨率档位:
方式二:指定生成图像的宽高像素值
仅文生图场景的wan2.7-image-pro支持4K分辨率 | 方式一:参考输入图比例(推荐) 编辑模式(
方式二:指定生成图像的宽高像素值
实际输出图像的像素值为接近指定值的16的倍数。 | 仅支持指定生成图像的宽高像素值
|
4. 交互式精准编辑
参数parameters.bbox_list,指定交互式编辑框选区域,格式为List[List[List[int]]],可以框选图中需要进行编辑的物品或位置,实现更准确的编辑效果,仅wan2.7-image-pro、wan2.7-image支持。
对应关系:列表长度必须与输入图片数量一致。若某张图片无需编辑,需要在对应位置传入空列表
[]。坐标格式:
[x1, y1, x2, y2](左上角 x, 左上角 y, 右下角 x, 右下角 y),使用原图绝对像素坐标,左上角对应(0,0)。
示例:输入 3 张图片,其中第 2 张无框选,第 1 张有两个框选:
[
[[0, 0, 12, 12], [25, 25, 100, 100]], # 图 1 (2个框)
[], # 图 2 (无框)
[[10, 10, 50, 50]] # 图 3 (1个框)
]计费与限流
API参考
各模型使用不同的端点和请求结构:
模型 | 端点(以北京地域为例) |
| 同步接口: 异步接口: |
| 异步接口: |
wan2.7/wan2.6:messages格式,在messages[].content数组中,通过image传入图像,通过text传入提示词。wan2.5:通过input.images数组 传入图像,通过input.prompt传入提示词
wan2.7-image-pro、wan2.7-image、wan2.6-image | wan2.5-i2i-preview |
| |
输入和输出参数请参见万相-图像生成与编辑2.6(wan2.7-image、wan2.6-image)、万相-通用图像编辑2.5 API参考。






































