Wan 2.7 Video API
Wan 2.7 Video API 的模型能力、计价规格、请求参数和接入示例。使用 VezAPI 账号密钥统一接入。
Wan 2.7 Video API 接入文档
使用 VezAPI 密钥接入 Wan 2.7 Video。下列操作共用同一个账号余额和鉴权方式。
https://api.vezapi.com请求头使用 Authorization: Bearer YOUR_VEZAPI_KEY。每次提交使用唯一的 Idempotency-Key,查询同一笔提交时才复用。
Wan 2.7 - 图转视频
/api/v1/jobs/createTask模型标识: wan/2-7-image-to-video
| 参数 | 类型 | 说明与限制 |
|---|---|---|
model必填 | string | 用于生成任务的模型名称。必填字段。 - 该端点必须使用 `wan/2-7-image-to-video` 模型 可选值: 默认: |
callBackUrl可选 | string | 接收任务完成通知的回调 URL。可选参数;如果提供,系统会在任务完成(成功或失败)后向该地址发送 POST 请求;如未提供,则不会发送回调通知。 |
input必填 | object | 图像转视频任务的输入参数。 |
input.prompt必填 | string | 正向提示词。最多 5000 个字符。
|
input.negative_prompt可选 | string | 反向提示词。最多 500 个字符。
|
input.first_frame_url可选 | string | 首帧图片 URL。 |
input.last_frame_url可选 | string | 尾帧图片 URL。 |
input.first_clip_url可选 | string | 首段视频 URL,用于视频续写。 |
input.driving_audio_url可选 | string | 驱动音频 URL。 |
input.resolution可选 | string | 视频分辨率。 - `720p`: 720p - `1080p`: 1080p 可选值: 默认: |
input.duration可选 | integer | 最终输出视频总时长,单位秒。 - 最小值:`2` - 最大值:`15` - 默认值:`5` 默认:
|
input.prompt_extend可选 | boolean | 是否开启提示词智能改写。默认值:`true`。 默认: |
input.watermark可选 | boolean | 是否添加 AI 生成水印。默认值:`false`。 默认: |
input.seed可选 | integer | 随机种子。 - 最小值:`0` - 最大值:`2147483647`
|
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-to-video",
"input": {
"prompt": "Your prompt",
"resolution": "1080p",
"duration": 5
}
}'返回值与错误
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. |
Wan 2.7 - 参考生视频
/api/v1/jobs/createTask模型标识: wan/2-7-r2v
| 参数 | 类型 | 说明与限制 |
|---|---|---|
model必填 | string | 用于生成任务的模型名称。该字段为必填项。此接口必须使用 `wan/2-7-r2v` 模型。 可选值: 默认: |
callBackUrl可选 | string | 任务完成通知的回调 URL。该参数为可选项。如果提供,当任务完成时,无论成功或失败,系统都会向该 URL 发送 POST 请求。如果未提供,则不会发送回调通知。 |
input必填 | object | 参考驱动视频生成任务的输入参数。 |
input.prompt必填 | string | 文本提示词。必填,用来描述生成视频中期望包含的元素和视觉特点。支持中英文,最大长度 5000 字符。
|
input.negative_prompt可选 | string | 反向提示词,用来描述不希望在视频画面中出现的内容。支持中英文,最大长度 500 字符。
|
input.reference_image可选 | array | 参考图像 URL 数组。参考图像与参考视频至少传入一种;图像数 + 视频数总和不能超过 5。
|
input.reference_video可选 | array | 参考视频 URL 数组。参考图像与参考视频至少传入一种;图像数 + 视频数总和不能超过 5。
|
input.first_frame可选 | string | 首帧图像 URL,最多传入 1 张。传入后会自动忽略 `aspect_ratio`,以首帧图像宽高比生成近似比例视频。 |
input.reference_voice可选 | string | 音频 URL。用于指定参考素材主体角色的音色。 规则: - 若 `reference_video` 本身有音频但未传 `reference_voice`,默认使用视频原声 - 若同时传入 `reference_video` 和 `reference_voice`,则优先使用 `reference_voice` 音频限制: - 格式:`wav`、`mp3` - 时长:`1` 到 `10` 秒 - 文件大小:不超过 `30MB` |
input.resolution可选 | string | 输出视频分辨率档位。可选值:`720p`、`1080p`。默认值为 `1080p`。 可选值: 默认: |
input.aspect_ratio可选 | string | 输出视频宽高比。 生效逻辑: - 未传入 `first_frame`:按指定的 `aspect_ratio` 生成视频 - 已传入 `first_frame`:自动忽略 `aspect_ratio`,以首帧图像宽高比生成近似比例视频 可选值: 默认: |
input.duration可选 | integer | 输出视频时长,单位秒。取值范围为 `2-10` 的整数,默认值为 `5`。 默认:
|
input.prompt_extend可选 | boolean | 是否开启 prompt 智能改写。开启后使用大模型对输入 prompt 进行扩写,短 prompt 场景下效果更好,但会增加耗时。 默认: |
input.watermark可选 | boolean | 是否添加水印。水印位于视频右下角,文案固定为“AI生成”。 默认: |
input.seed可选 | integer | 随机种子,范围 `0-2147483647`。未传时系统自动生成。
|
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-r2v",
"input": {
"prompt": "Image 1 is eating, while video 1 and image 2 are singing beside it.",
"resolution": "1080p",
"aspect_ratio": "16:9",
"duration": 5
}
}'返回值与错误
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. |
Wan 2.7 - 文转视频
/api/v1/jobs/createTask模型标识: wan/2-7-text-to-video
| 参数 | 类型 | 说明与限制 |
|---|---|---|
model必填 | string | 用于生成任务的模型名称。必填字段。 - 该端点必须使用 `wan/2-7-text-to-video` 模型 可选值: 默认: |
input必填 | object | 文生视频任务的输入参数。 |
input.prompt必填 | string | 正向提示词。最少 1 个字符,最多 5000 个字符。
|
input.negative_prompt可选 | string | 反向提示词。最多 500 个字符。
|
input.audio_url可选 | string | 可选的自定义音频 URL。 |
input.resolution可选 | string | 视频分辨率。 - `720p`: 720p - `1080p`: 1080p 可选值: 默认: |
input.ratio可选 | string | 视频宽高比。 - `16:9`: 横屏 - `9:16`: 竖屏 - `1:1`: 正方形 - `4:3`: 横向 4:3 - `3:4`: 纵向 3:4 可选值: 默认: |
input.duration可选 | integer | 视频时长,单位秒。 - 最小值:`2` - 最大值:`15` - 默认值:`5` 默认:
|
input.prompt_extend可选 | boolean | 是否开启提示词智能改写。默认值:`true`。 默认: |
input.watermark可选 | boolean | 是否添加 AI 生成水印。默认值:`false`。 默认: |
input.seed可选 | integer | 随机种子。 - 最小值:`0` - 最大值:`2147483647`
|
input.nsfw_checker可选 | boolean | 默认 false。为 false 时不额外进行内容过滤,结果由模型直接返回。 |
callBackUrl可选 | string | 接收任务完成通知的回调 URL。可选参数;如果提供,系统会在任务完成(成功或失败)后向该地址发送 POST 请求;如未提供,则不会发送回调通知。 |
请求示例
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-text-to-video",
"input": {
"prompt": "Your prompt",
"resolution": "1080p",
"duration": 5
}
}'返回值与错误
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. |
Wan 2.7 - 视频编辑
/api/v1/jobs/createTask模型标识: wan/2-7-videoedit
| 参数 | 类型 | 说明与限制 |
|---|---|---|
model必填 | string | 用于生成任务的模型名称。必填字段。 - 该端点必须使用 `wan/2-7-videoedit` 模型 可选值: 默认: |
callBackUrl可选 | string | 接收任务完成通知的回调 URL。可选参数;如果提供,系统会在任务完成(成功或失败)后向该地址发送 POST 请求;如未提供,则不会发送回调通知。 |
input必填 | object | 视频编辑任务的输入参数。 |
input.prompt可选 | string | 文本提示词,用来描述生成视频中期望包含的元素和视觉特点。支持中英文,最大长度 5000 字符。
|
input.negative_prompt可选 | string | 反向提示词,用来描述不希望出现在视频画面中的内容。支持中英文,最大长度 500 字符。
|
input.video_url必填 | string | 待编辑视频的 URL。必填,仅支持 1 个视频。 - 格式:`mp4`、`mov` - 时长:`2` 到 `10` 秒 - 分辨率:宽高范围 `[240,4096]` 像素 - 宽高比:`1:8` 到 `8:1` - 文件大小:不超过 `100MB` - 支持 `http/https` 公网 URL 或 `oss` 临时 URL |
input.reference_image可选 | string | 参考图像 URL,用于人物、服饰、风格等参考。 - 格式:`JPEG`、`JPG`、`PNG`(不支持透明通道)、`WEBP` - 分辨率:宽高范围 `[240,8000]` 像素 - 宽高比:`1:8` 到 `8:1` - 支持 `http/https` 公网 URL 或 `oss` 临时 URL |
input.resolution可选 | string | 输出视频分辨率档位。`1080p` 费用高于 `720p`。默认值为 `1080p`。 - `720p`: 720p - `1080p`: 1080p 可选值: 默认: |
input.aspect_ratio可选 | string | 输出视频宽高比。 - 不传时:默认按输入视频宽高比生成近似比例视频 - 传入时:按指定宽高比生成 - 可选值:`16:9`、`9:16`、`1:1`、`4:3`、`3:4` 可选值: |
input.duration可选 | integer | 输出视频时长,单位秒。 - 默认值为 `0`,表示直接使用输入视频时长,不截断 - 传入指定值时,从原视频 `0` 秒开始截取至该长度 - 合法取值为 `0` 或 `[2,10]` 之间的整数 默认:
|
input.audio_setting可选 | string | 视频声音设置。 - `auto`:默认,模型根据 `prompt` 智能判断是否重生成音频 - `origin`:强制保留输入视频原声 可选值: 默认: |
input.prompt_extend可选 | boolean | 是否开启 prompt 智能改写。开启后使用大模型对输入 prompt 进行扩写,短 prompt 场景下效果更好,但会增加耗时。 默认: |
input.watermark可选 | boolean | 是否添加水印。水印位于视频右下角,文案固定为“AI生成”。 默认: |
input.seed可选 | integer | 随机种子,范围 `0-2147483647`。未传时系统自动生成。
|
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-videoedit",
"input": {
"prompt": "Change the character'\''s outfit and add the hat shown in the reference image.",
"video_url": "https://example.com/input.png",
"resolution": "1080p",
"aspect_ratio": "16:9",
"duration": 0
}
}'返回值与错误
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. |
任务状态与回调
异步任务请保存返回的 taskId。调用 GET /api/v1/jobs/recordInfo?taskId=... 查询,或在创建时设置 callBackUrl。只有任务所属账号可以查询任务或基于任务创建派生资源。
超时可能表示请求已经受理。请在控制台查看原请求,不要自动新建任务。回调可能重试并重复到达,请使用 X-VezAPI-Event-Id 去重。
文件、日志与计费
生成媒体通常随上游保留 14 天,上传文件在 24 小时后失效。请在过期前保存所需文件。VezAPI 仅流式转发已登记资源,不提供永久作品库。请求日志保留两个自然月。
调用前预留积分,最终按实际优惠扣分 1:1 结算。用量不明时暂停新付费请求。若保护其他任务预留后余额不足以结算,会保留待结算记录,补足余额后再扣费;模型用量不会将钱包扣成负数。按时长计价的输入文件由服务端读取时长,读取失败时不提交模型任务。
使用你的 VezAPI 密钥发送请求。成功生成将消耗账号积分。
/api/v1/jobs/createTask返回结果将在这里显示。
Wan 2.7 Video API 价格
下方费率为参考估算,最终按实际优惠扣分 1:1 结算。按标准充值包换算,1,000 积分约为 10 美元,大额充值包可降低每积分实际单价。
| 规格 | 积分 | 计价单位 | 美元参考 |
|---|---|---|---|
| wan 2.7 video, videoedit, 1080p | 24 | 每秒 | $0.24 |
| wan 2.7 video, videoedit, 720p | 16 | 每秒 | $0.16 |
| wan 2.7 video, r2v, 1080p | 24 | 每秒 | $0.24 |
| wan 2.7 video, r2v, 720p | 16 | 每秒 | $0.16 |
| wan 2.7 video, image-to-video, 1080p | 24 | 每秒 | $0.24 |
| wan 2.7 video, image-to-video, 720p | 16 | 每秒 | $0.16 |
| wan 2.7 video, text-to-video, 1080p | 24 | 每秒 | $0.24 |
| wan 2.7 video, text-to-video, 720p | 16 | 每秒 | $0.16 |