Wan-AI/Wan2.7 Image API
本文介绍 wan2.7-image、wan2.7-image-pro 模型调用 API 的输入输出参数,供您使用接口时查阅字段含义。
同步接口:
/v1/images/generations异步接口:
/v1/tasks/submit+/v1/tasks/status
模型列表
能力概览
Wan2.7 当前支持:
文生图
单图编辑
多图融合 / 多图编辑
连续多图生成 / 组图生成
OpenAI 兼容接口(同步)
接口
POST https://api.modelverse.cn/v1/images/generations
认证方式
Authorization: Bearer $MODELVAULTS_API_KEY
请求参数
请求示例
1. 文生图
curl --location 'https://api.modelverse.cn/v1/images/generations' \
--header "Authorization: Bearer $MODELVAULTS_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model": "wan2.7-image",
"prompt": "A futuristic cloud data center floating above the sea at sunrise",
"size": "1K",
"seed": 123456,
"watermark": false
}'2. 单图编辑
curl --location 'https://api.modelverse.cn/v1/images/generations' \
--header "Authorization: Bearer $MODELVAULTS_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model": "wan2.7-image-pro",
"prompt": "把这只猫改成赛博朋克风格,霓虹灯光,电影感构图",
"image": "https://umodelverse-inference.cn-wlcb.ufileos.com/ucloud-maxcot.jpg",
"size": "2K",
"thinking_mode": true,
"watermark": false
}'3. 多图融合
curl --location 'https://api.modelverse.cn/v1/images/generations' \
--header "Authorization: Bearer $MODELVAULTS_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model": "wan2.7-image-pro",
"prompt": "融合两张参考图的主体特征,生成一张高级感品牌海报",
"images": [
"https://umodelverse-inference.cn-wlcb.ufileos.com/ucloud-maxcot.jpg",
"https://umodelverse-inference.cn-wlcb.ufileos.com/ucloud-maxcot.jpg"
],
"size": "2048x2048",
"thinking_mode": true,
"seed": 20260402
}'4. 连续多图生成
curl --location 'https://api.modelverse.cn/v1/images/generations' \
--header "Authorization: Bearer $MODELVAULTS_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model": "wan2.7-image-pro",
"prompt": "生成一组同一角色在春夏秋冬四季中的海报,人物形象保持一致",
"size": "2K",
"thinking_mode": true,
"enable_sequential": true,
"n": 4
}'响应参数
响应示例
{
"created": 1775558400,
"data": [
{
"url": "https://example.com/generated-image-1.png"
},
{
"url": "https://example.com/generated-image-2.png"
}
]
}异步任务接口
提交任务
接口
POST https://api.modelverse.cn/v1/tasks/submit
认证方式
Authorization: Bearer $MODELVAULTS_API_KEY
请求体
{
"model": "wan2.7-image-pro",
"input": {
"prompt": "一只坐在咖啡馆窗边的布偶猫",
"images": [
"https://umodelverse-inference.cn-wlcb.ufileos.com/ucloud-maxcot.jpg"
]
},
"parameters": {
"size": "2K",
"prompt_extend": true,
"enable_sequential": true,
"n": 4,
"seed": 123456,
"watermark": false
}
}请求参数
请求示例
1. 文生图
curl --location 'https://api.modelverse.cn/v1/tasks/submit' \
--header "Authorization: Bearer $MODELVAULTS_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model": "wan2.7-image",
"input": {
"prompt": "A futuristic cloud data center floating above the sea at sunrise"
},
"parameters": {
"size": "1K",
"seed": 123456
}
}'2. 单图编辑
curl --location 'https://api.modelverse.cn/v1/tasks/submit' \
--header "Authorization: Bearer $MODELVAULTS_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model": "wan2.7-image-pro",
"input": {
"prompt": "把这只猫改成赛博朋克风格,霓虹灯光,电影感构图",
"img_url": "https://umodelverse-inference.cn-wlcb.ufileos.com/ucloud-maxcot.jpg"
},
"parameters": {
"size": "2K",
"prompt_extend": true,
"watermark": false
}
}'3. 多图融合
curl --location 'https://api.modelverse.cn/v1/tasks/submit' \
--header "Authorization: Bearer $MODELVAULTS_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model": "wan2.7-image-pro",
"input": {
"prompt": "融合两张参考图的主体特征,生成一张高级感品牌海报",
"images": [
"https://umodelverse-inference.cn-wlcb.ufileos.com/ucloud-maxcot.jpg",
"https://umodelverse-inference.cn-wlcb.ufileos.com/ucloud-maxcot.jpg"
]
},
"parameters": {
"size": "2048x2048",
"prompt_extend": true,
"seed": 20260402
}
}'4. 连续多图生成
curl --location 'https://api.modelverse.cn/v1/tasks/submit' \
--header "Authorization: Bearer $MODELVAULTS_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model": "wan2.7-image-pro",
"input": {
"prompt": "生成一组同一角色在春夏秋冬四季中的海报,人物形象保持一致"
},
"parameters": {
"size": "2K",
"prompt_extend": true,
"enable_sequential": true,
"n": 4
}
}'提交响应参数
提交响应示例
{
"output": {
"task_id": "3c7d6b6c-7cdb-4f37-bf41-7f2b0f1a9f0d"
},
"request_id": "req_202604021530000001"
}查询任务状态
接口
GET https://api.modelverse.cn/v1/tasks/status?task_id=<task_id>
请求示例
curl --location 'https://api.modelverse.cn/v1/tasks/status?task_id=<task_id>' \
--header "Authorization: Bearer $MODELVAULTS_API_KEY"响应参数
响应示例(成功)
{
"output": {
"task_id": "3c7d6b6c-7cdb-4f37-bf41-7f2b0f1a9f0d",
"task_status": "Success",
"urls": [
"https://example.com/generated-image-1.png",
"https://example.com/generated-image-2.png",
"https://example.com/generated-image-3.png",
"https://example.com/generated-image-4.png"
],
"submit_time": 1775115000,
"finish_time": 1775115038
},
"usage": {
"completion_tokens": 4,
"total_tokens": 4
},
"request_id": ""
}响应示例(失败)
{
"output": {
"task_id": "3c7d6b6c-7cdb-4f37-bf41-7f2b0f1a9f0d",
"task_status": "Failure",
"submit_time": 1775115000,
"finish_time": 1775115012,
"error_message": "code=InvalidParameter, message=invalid image url"
},
"request_id": ""
}








