Wan2.7 Image API
Wan2.7 Image API 的模型能力、计价规格、请求参数和接入示例。使用 VezAPI 账号密钥统一接入。
Wan2.7 Image API 接入文档
使用 VezAPI 密钥接入 Wan2.7 Image。下列操作共用同一个账号余额和鉴权方式。
https://api.vezapi.com请求头使用 Authorization: Bearer YOUR_VEZAPI_KEY。每次提交使用唯一的 Idempotency-Key,查询同一笔提交时才复用。
Wan 2.7 Image Pro
/api/v1/jobs/createTask模型标识: wan/2-7-image-pro
| 参数 | 类型 | 说明与限制 |
|---|---|---|
model必填 | string | 用于生成任务的模型名称。当前端点固定使用 `wan/2-7-image-pro`。 可选值: 默认: |
callBackUrl可选 | string | 接收生成任务完成通知的回调 URL。可选配置,建议在生产环境中使用。 - 任务生成完成后,系统会向该 URL POST 任务状态与结果 - 回调内容包含生成的资源 URL 与任务相关信息 - 您的回调端点需要支持接收带 JSON 负载的 POST 请求 - 也可以选择调用任务详情端点,主动轮询任务状态 - 为确保回调安全性,请参阅 [Webhook 校验指南](/cn/common-api/webhook-verification) 了解签名验证实现方法 |
input必填 | object | 生成任务的输入参数 |
input.prompt必填 | string | 图像生成或编辑提示词。该字段支持中英文,最大长度 5000 字符。
|
input.input_urls可选 | array | (可选)输入图片 URL 数组。
|
input.aspect_ratio可选 | string | (可选)无图片输入时的输出宽高比。 可选值: |
input.enable_sequential可选 | boolean | 是否开启组图模式。默认值为 false。 默认: |
input.n可选 | integer | 生成图片数量。`enable_sequential=false` 时范围为 1-4,默认 4;`enable_sequential=true` 时范围为 1-12,默认 12。 |
input.resolution可选 | string | 输出分辨率:1K、2K 或 4K(默认 2K)。4K 仅在无图片输入且非组图生成时有效。 可选值: 默认: |
input.thinking_mode可选 | boolean | 是否开启思考模式。仅在 `enable_sequential=false` 且 `input_urls` 为空时可用;其他情况下不生效。 默认: |
input.color_palette可选 | array | (可选)自定义颜色主题。仅在 `enable_sequential=false` 时可用,需要 3-10 种颜色,推荐 8 种。
|
input.color_palette[].hex必填 | string | HEX 颜色值。 |
input.color_palette[].ratio必填 | string | 颜色占比,格式必须为 xx.xx%。 |
input.bbox_list可选 | array | (可选)交互式编辑框选区域。外层列表长度应与 `input_urls` 一致;每张图片最多 2 个框;单个框格式为 `[x1, y1, x2, y2]`。 |
input.watermark可选 | boolean | 是否添加水印。 默认: |
input.seed可选 | integer | 可选,不传则随机。
|
input.nsfw_checker可选 | boolean | 默认值为 false。您可以根据需要将其设置为 false。如果设置为 false,我们的内容过滤功能将被禁用,所有结果将由模型直接返回。 默认: |
请求示例
curl -X POST 'https://api.vezapi.com/api/v1/jobs/createTask' \
-H 'Authorization: Bearer YOUR_VEZAPI_KEY' \
-H 'Idempotency-Key: your-unique-request-id' \
-H 'Content-Type: application/json' \
-d '{
"model": "wan/2-7-image-pro",
"input": {
"prompt": "Transform the food photo by replacing the marked ingredients with sliced red chili pieces in the corresponding positions, while keeping the same bowl, composition, steam, lighting, camera angle, background, texture, and overall realism.",
"input_urls": [
"https://example.com/input.png"
],
"n": 4,
"enable_sequential": false,
"resolution": "2K",
"thinking_mode": false,
"watermark": false,
"seed": 0,
"bbox_list": [
[]
]
}
}'返回值与错误
HTTP 200
| 参数 | 类型 | 说明与限制 |
|---|---|---|
code必填 | integer | 请求状态码。请求失败时 HTTP 状态仍为 200,请始终以本字段判断:200 表示成功,其他值均表示失败,原因见 msg。常见值:401 API key 无效或缺失;402 积分不足;429 超出频率限制;422 或 500 请求未能处理(请先查看 msg、检查参数,再决定是否重试)。 |
msg必填 | string | 响应消息,失败时的错误描述 |
data必填 | object | |
data.taskId必填 | string | 任务 ID 可与“获取任务详细信息”端点一起使用,以查询任务状态 |
data.recordId必填 | string |
HTTP 500
Server error.
| 参数 | 类型 | 说明与限制 |
|---|---|---|
code必填 | integer | Response status code - **200**: Success - Request has been processed successfully - **401**: Unauthorized - Authentication credentials are missing or invalid - **402**: Insufficient Credits - Account does not have enough credits to perform the operation - **404**: Not Found - The requested resource or endpoint does not exist - **408**: Timeout - No result has been returned for over 10 minutes. - **422**: Validation Error - The request parameters failed validation checks - **429**: Rate Limited - Request limit has been exceeded for this resource - **455**: Service Unavailable - System is currently undergoing maintenance - **500**: Server Error - An unexpected error occurred while processing the request - **501**: Generation Failed - Content generation task failed - **505**: Feature Disabled - The requested feature is currently disabled |
msg必填 | string | Response message, error description when failed |
data必填 | object |
Wan 2.7 Image
/api/v1/jobs/createTask模型标识: wan/2-7-image
| 参数 | 类型 | 说明与限制 |
|---|---|---|
model必填 | string | 用于生成任务的模型名称。当前端点固定使用 `wan/2-7-image`。 可选值: 默认: |
callBackUrl可选 | string | 接收生成任务完成通知的回调 URL。可选配置,建议在生产环境中使用。 - 任务生成完成后,系统会向该 URL POST 任务状态与结果 - 回调内容包含生成的资源 URL 与任务相关信息 - 您的回调端点需要支持接收带 JSON 负载的 POST 请求 - 也可以选择调用任务详情端点,主动轮询任务状态 - 为确保回调安全性,请参阅 [Webhook 校验指南](/cn/common-api/webhook-verification) 了解签名验证实现方法 |
input必填 | object | 生成任务的输入参数 |
input.prompt必填 | string | 图像生成或编辑提示词。该字段支持中英文,最大长度 5000 字符。
|
input.input_urls可选 | array | (可选)输入图片 URL 数组。
|
input.aspect_ratio可选 | string | (可选)无图片输入时的输出宽高比。 可选值: |
input.enable_sequential可选 | boolean | 是否开启组图模式。默认值为 false。 默认: |
input.n可选 | integer | 生成图片数量。`enable_sequential=false` 时范围为 1-4,默认 4;`enable_sequential=true` 时范围为 1-12,默认 12。 |
input.resolution可选 | string | 输出分辨率:1K 或 2K(默认 2K)。4K 请使用 wan/2-7-image-pro。 可选值: 默认: |
input.thinking_mode可选 | boolean | 是否开启思考模式。仅在 `enable_sequential=false` 且 `input_urls` 为空时可用;其他情况下不生效。 默认: |
input.color_palette可选 | array | (可选)自定义颜色主题。仅在 `enable_sequential=false` 时可用,需要 3-10 种颜色,推荐 8 种。
|
input.color_palette[].hex必填 | string | HEX 颜色值。 |
input.color_palette[].ratio必填 | string | 颜色占比,格式必须为 xx.xx%。 |
input.bbox_list可选 | array | (可选)交互式编辑框选区域。外层列表长度应与 `input_urls` 一致;每张图片最多 2 个框;单个框格式为 `[x1, y1, x2, y2]`。 |
input.watermark可选 | boolean | 是否添加水印。 默认: |
input.seed可选 | integer | 可选,不传则随机。
|
input.nsfw_checker可选 | boolean | 默认 false。为 false 时不额外进行内容过滤,结果由模型直接返回。 |
请求示例
curl -X POST 'https://api.vezapi.com/api/v1/jobs/createTask' \
-H 'Authorization: Bearer YOUR_VEZAPI_KEY' \
-H 'Idempotency-Key: your-unique-request-id' \
-H 'Content-Type: application/json' \
-d '{
"model": "wan/2-7-image",
"input": {
"prompt": "Transform the food photo by replacing the marked ingredients with sliced red chili pieces in the corresponding positions, while keeping the same bowl, composition, steam, lighting, camera angle, background, texture, and overall realism.",
"input_urls": [
"https://example.com/input.png"
],
"n": 4,
"enable_sequential": false,
"resolution": "2K",
"thinking_mode": false,
"watermark": false,
"seed": 0,
"bbox_list": [
[]
]
}
}'返回值与错误
HTTP 200
| 参数 | 类型 | 说明与限制 |
|---|---|---|
code必填 | integer | 请求状态码。请求失败时 HTTP 状态仍为 200,请始终以本字段判断:200 表示成功,其他值均表示失败,原因见 msg。常见值:401 API key 无效或缺失;402 积分不足;429 超出频率限制;422 或 500 请求未能处理(请先查看 msg、检查参数,再决定是否重试)。 |
msg必填 | string | 响应消息,失败时的错误描述 |
data必填 | object | |
data.taskId必填 | string | 任务 ID 可与“获取任务详细信息”端点一起使用,以查询任务状态 |
data.recordId必填 | string |
HTTP 500
Server error.
| 参数 | 类型 | 说明与限制 |
|---|---|---|
code必填 | integer | Response status code - **200**: Success - Request has been processed successfully - **401**: Unauthorized - Authentication credentials are missing or invalid - **402**: Insufficient Credits - Account does not have enough credits to perform the operation - **404**: Not Found - The requested resource or endpoint does not exist - **408**: Timeout - No result has been returned for over 10 minutes. - **422**: Validation Error - The request parameters failed validation checks - **429**: Rate Limited - Request limit has been exceeded for this resource - **455**: Service Unavailable - System is currently undergoing maintenance - **500**: Server Error - An unexpected error occurred while processing the request - **501**: Generation Failed - Content generation task failed - **505**: Feature Disabled - The requested feature is currently disabled |
msg必填 | string | Response message, error description when failed |
data必填 | object |
任务状态与回调
异步任务请保存返回的 taskId。调用 GET /api/v1/jobs/recordInfo?taskId=... 查询,或在创建时设置 callBackUrl。只有任务所属账号可以查询任务或基于任务创建派生资源。
超时可能表示请求已经受理。请在控制台查看原请求,不要自动新建任务。回调可能重试并重复到达,请使用 X-VezAPI-Event-Id 去重。
文件、日志与计费
生成媒体通常随上游保留 14 天,上传文件在 24 小时后失效。请在过期前保存所需文件。VezAPI 仅流式转发已登记资源,不提供永久作品库。请求日志保留两个自然月。
调用前预留积分,最终按实际优惠扣分 1:1 结算。用量不明时暂停新付费请求。若保护其他任务预留后余额不足以结算,会保留待结算记录,补足余额后再扣费;模型用量不会将钱包扣成负数。按时长计价的输入文件由服务端读取时长,读取失败时不提交模型任务。
使用你的 VezAPI 密钥发送请求。成功生成将消耗账号积分。
/api/v1/jobs/createTask返回结果将在这里显示。
Wan2.7 Image API 价格
下方费率为参考估算,最终按实际优惠扣分 1:1 结算。按标准充值包换算,1,000 积分约为 10 美元,大额充值包可降低每积分实际单价。
| 规格 | 积分 | 计价单位 | 美元参考 |
|---|---|---|---|
| wan 2.7 image pro | 12 | 每张图片 | $0.12 |
| wan 2.7 image | 4.8 | 每张图片 | $0.048 |