Wan 2.6 API
Wan 2.6 API 的模型能力、计价规格、请求参数和接入示例。使用 VezAPI 账号密钥统一接入。
Wan 2.6 API 接入文档
使用 VezAPI 密钥接入 Wan 2.6。下列操作共用同一个账号余额和鉴权方式。
https://api.vezapi.com请求头使用 Authorization: Bearer YOUR_VEZAPI_KEY。每次提交使用唯一的 Idempotency-Key,查询同一笔提交时才复用。
Wan 2.6 - 图转视频
/api/v1/jobs/createTask模型标识: wan/2-6-image-to-video
| 参数 | 类型 | 说明与限制 |
|---|---|---|
model必填 | string | 用于生成的模型名称。必填字段。 - 此端点必须为 `wan/2-6-image-to-video` 可选值: 默认: |
callBackUrl可选 | string | 接收生成任务完成更新的 URL。生产环境可选但推荐使用。 - 系统会在生成完成时向此 URL 发送 POST 请求,包含任务状态和结果 - 回调包含生成的内容 URL 和任务信息 - 您的回调端点应接受包含 JSON 有效负载的 POST 请求 - 或者使用 Get Task Details 端点轮询任务状态 - 为确保回调安全性,请参阅 [Webhook 校验指南](/cn/common-api/webhook-verification) 了解签名验证实现方法 |
input可选 | object | 生成任务的输入参数 |
input.prompt必填 | string | 视频生成的文本提示。同时支持中文和英文,最少2个字符,最多5,000个字符。(最大长度:5000个字符)
|
input.image_urls必填 | array | 上传图像文件作为 API 输入(上传后的文件 URL,而不是文件内容;接受类型:image/jpeg, image/png, image/webp;最大大小:10.0MB),所有图像必须至少为 256x256px。
|
input.duration可选 | string | 生成视频的持续时间(秒) 可选值: 默认: |
input.resolution可选 | string | 视频分辨率等级 可选值: 默认: |
input.multi_shots可选 | boolean | 多镜头参数。用于控制AI视频生成时的镜头构图风格,决定生成的视频是单个连续镜头,还是多个带有转场的镜头。 默认: |
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-6-image-to-video",
"input": {
"prompt": "Anthopmopric fox singing a Christmas song at the rubbish dump in the rain.",
"image_urls": [
"https://example.com/input.png"
],
"duration": "5",
"resolution": "1080p"
}
}'返回值与错误
HTTP 200
请求成功
| 参数 | 类型 | 说明与限制 |
|---|---|---|
code可选 | integer | Status code of the request. The HTTP status is 200 even when the request fails, so always check this field: 200 means success; any other value means the request failed and msg describes the reason. Common values: 401 invalid or missing API key; 402 insufficient credits; 429 rate limit exceeded; 422 or 500 the request could not be processed (read msg and check your parameters before retrying). 可选值: |
msg可选 | string | Response message, error description upon failure |
data必填 | object | |
data.taskId必填 | string | The task ID can be used with the "Get Task Details" endpoint to query the task status. |
HTTP 500
响应字段与业务状态码。
| 参数 | 类型 | 说明与限制 |
|---|---|---|
code必填 | integer | 业务状态码:200 请求成功;401 鉴权凭据缺失或无效;402 积分不足;404 资源或接口不存在;408 超过 10 分钟未返回结果;422 参数校验失败;429 请求频率超限;455 系统维护;500 处理请求时发生内部错误;501 内容生成失败;505 功能当前关闭。 |
msg必填 | string | 响应消息;失败时说明错误原因。 |
data必填 | object |
Wan 2.6 - 文转视频
/api/v1/jobs/createTask模型标识: wan/2-6-text-to-video
| 参数 | 类型 | 说明与限制 |
|---|---|---|
model必填 | string | 用于生成的模型名称。必填字段。 - 此端点必须为 `wan/2-6-text-to-video` 可选值: 默认: |
callBackUrl可选 | string | 接收生成任务完成更新的 URL。生产环境可选但推荐使用。 - 系统会在生成完成时向此 URL 发送 POST 请求,包含任务状态和结果 - 回调包含生成的内容 URL 和任务信息 - 您的回调端点应接受包含 JSON 有效负载的 POST 请求 - 或者使用 Get Task Details 端点轮询任务状态 - 为确保回调安全性,请参阅 [Webhook 校验指南](/cn/common-api/webhook-verification) 了解签名验证实现方法 |
input可选 | object | 生成任务的输入参数 |
input.prompt必填 | string | 视频生成的文本提示。同时支持中文和英文,最少1个字符,最多5,000个字符。(最大长度:5000个字符)
|
input.duration可选 | string | 生成视频的持续时间(秒) 可选值: 默认: |
input.resolution可选 | string | 输出分辨率:720p 或 1080p。请显式传入。 可选值: |
input.multi_shots可选 | boolean | 多镜头参数。用于控制AI视频生成时的镜头构图风格,决定生成的视频是单个连续镜头,还是多个带有转场的镜头。 默认: |
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-6-text-to-video",
"input": {
"prompt": "In a hyperrealistic ASMR video, a hand uses a knitted knife to slowly slice a burger made entirely of knitted wool. The satisfyingly crisp cut reveals a detailed cross-section of knitted meat, lettuce, and tomato slices. Captured in a close-up with a shallow depth of field, the scene is set against a stark, matte black surface. Cinematic lighting makes the surreal yarn textures shine with clear reflections. The focus is on the deliberate, satisfying motion and the unique, tactile materials.",
"duration": "5",
"resolution": "1080p"
}
}'返回值与错误
HTTP 200
请求成功
| 参数 | 类型 | 说明与限制 |
|---|---|---|
code可选 | integer | Status code of the request. The HTTP status is 200 even when the request fails, so always check this field: 200 means success; any other value means the request failed and msg describes the reason. Common values: 401 invalid or missing API key; 402 insufficient credits; 429 rate limit exceeded; 422 or 500 the request could not be processed (read msg and check your parameters before retrying). 可选值: |
msg可选 | string | Response message, error description upon failure |
data必填 | object | |
data.taskId必填 | string | The task ID can be used with the "Get Task Details" endpoint to query the task status. |
HTTP 500
响应字段与业务状态码。
| 参数 | 类型 | 说明与限制 |
|---|---|---|
code必填 | integer | 业务状态码:200 请求成功;401 鉴权凭据缺失或无效;402 积分不足;404 资源或接口不存在;408 超过 10 分钟未返回结果;422 参数校验失败;429 请求频率超限;455 系统维护;500 处理请求时发生内部错误;501 内容生成失败;505 功能当前关闭。 |
msg必填 | string | 响应消息;失败时说明错误原因。 |
data必填 | object |
Wan 2.6 - 视频转视频
/api/v1/jobs/createTask模型标识: wan/2-6-video-to-video
| 参数 | 类型 | 说明与限制 |
|---|---|---|
model必填 | string | 用于生成的模型名称。必填字段。 - 此端点必须为 `wan/2-6-video-to-video` 可选值: 默认: |
callBackUrl可选 | string | 接收生成任务完成更新的 URL。生产环境可选但推荐使用。 - 系统会在生成完成时向此 URL 发送 POST 请求,包含任务状态和结果 - 回调包含生成的内容 URL 和任务信息 - 您的回调端点应接受包含 JSON 有效负载的 POST 请求 - 或者使用 Get Task Details 端点轮询任务状态 - 为确保回调安全性,请参阅 [Webhook 校验指南](/cn/common-api/webhook-verification) 了解签名验证实现方法 |
input可选 | object | 生成任务的输入参数 |
input.prompt必填 | string | 视频生成的文本提示。同时支持中文和英文,最少2个字符,最多5,000个字符。(最大长度:5000个字符)
|
input.video_urls必填 | array | 参考视频 URL。(上传后的文件 URL,而不是文件内容;接受类型:video/mp4, video/quicktime, video/x-matroska;最大大小:10.0MB)
|
input.duration可选 | string | 生成视频的持续时间(秒) 可选值: 默认: |
input.resolution可选 | string | 输出分辨率:720p 或 1080p。请显式传入。 可选值: |
input.multi_shots可选 | boolean | 多镜头参数。用于控制AI视频生成时的镜头构图风格,决定生成的视频是单个连续镜头,还是多个带有转场的镜头。 默认: |
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-6-video-to-video",
"input": {
"prompt": "The video drinks milk tea while doing some improvised dance moves to the music.",
"video_urls": [
"https://example.com/input.png"
],
"duration": "5",
"resolution": "1080p"
}
}'返回值与错误
HTTP 200
请求成功
| 参数 | 类型 | 说明与限制 |
|---|---|---|
code可选 | integer | Status code of the request. The HTTP status is 200 even when the request fails, so always check this field: 200 means success; any other value means the request failed and msg describes the reason. Common values: 401 invalid or missing API key; 402 insufficient credits; 429 rate limit exceeded; 422 or 500 the request could not be processed (read msg and check your parameters before retrying). 可选值: |
msg可选 | string | Response message, error description upon failure |
data必填 | object | |
data.taskId必填 | string | The task ID can be used with the "Get Task Details" endpoint to query the task status. |
HTTP 500
响应字段与业务状态码。
| 参数 | 类型 | 说明与限制 |
|---|---|---|
code必填 | integer | 业务状态码:200 请求成功;401 鉴权凭据缺失或无效;402 积分不足;404 资源或接口不存在;408 超过 10 分钟未返回结果;422 参数校验失败;429 请求频率超限;455 系统维护;500 处理请求时发生内部错误;501 内容生成失败;505 功能当前关闭。 |
msg必填 | string | 响应消息;失败时说明错误原因。 |
data必填 | object |
任务状态与回调
异步任务请保存返回的 taskId。调用 GET /api/v1/jobs/recordInfo?taskId=... 查询,或在创建时设置 callBackUrl。只有任务所属账号可以查询任务或基于任务创建派生资源。
超时可能表示请求已经受理。请在控制台查看原请求,不要自动新建任务。回调可能重试并重复到达,请使用 X-VezAPI-Event-Id 去重。
文件、日志与计费
生成媒体通常随上游保留 14 天,上传文件在 24 小时后失效。请在过期前保存所需文件。VezAPI 仅流式转发已登记资源,不提供永久作品库。请求日志保留两个自然月。
调用前预留积分,最终按实际优惠扣分 1:1 结算。用量不明时暂停新付费请求。若保护其他任务预留后余额不足以结算,会保留待结算记录,补足余额后再扣费;模型用量不会将钱包扣成负数。按时长计价的输入文件由服务端读取时长,读取失败时不提交模型任务。
使用你的 VezAPI 密钥发送请求。成功生成将消耗账号积分。
/api/v1/jobs/createTask返回结果将在这里显示。
Wan 2.6 API 价格
下方费率为参考估算,最终按实际优惠扣分 1:1 结算。按标准充值包换算,1,000 积分约为 10 美元,大额充值包可降低每积分实际单价。
| 规格 | 积分 | 计价单位 | 美元参考 |
|---|---|---|---|
| wan 2.6, video-to-video, 5.0s-1080p | 105 | 每个视频 | $1.05 |
| wan 2.6, video-to-video, 10.0s-1080p | 210 | 每个视频 | $2.1 |
| wan 2.6, video-to-video, 10.0s-720p | 140.0 | 每个视频 | $1.4 |
| wan 2.6, image-to-video, 10.0s-1080p | 210 | 每个视频 | $2.1 |
| wan 2.6, image-to-video, 15.0s-1080p | 315.0 | 每个视频 | $3.15 |
| wan 2.6, video-to-video, 5.0s-720p | 70.0 | 每个视频 | $0.7 |
| wan 2.6, image-to-video, 5.0s-1080p | 105 | 每个视频 | $1.05 |
| wan 2.6, image-to-video, 5.0s-720p | 70.0 | 每个视频 | $0.7 |
| wan 2.6, image-to-video, 10.0s-720p | 140.0 | 每个视频 | $1.4 |
| wan 2.6, image-to-video, 15.0s-720p | 210.0 | 每个视频 | $2.1 |
| wan 2.6, text to video, 5.0s-1080p | 105 | 每个视频 | $1.05 |
| wan 2.6, text to video, 10.0s-1080p | 210 | 每个视频 | $2.1 |
| wan 2.6, text to video, 15.0s-1080p | 315.0 | 每个视频 | $3.15 |
| wan 2.6, text to video, 15.0s-720p | 210.0 | 每个视频 | $2.1 |
| wan 2.6, text to video, 10.0s-720p | 140.0 | 每个视频 | $1.4 |
| wan 2.6, text to video, 5.0s-720p | 70.0 | 每个视频 | $0.7 |