Wan 2.5 API
Wan 2.5 API 的模型能力、计价规格、请求参数和接入示例。使用 VezAPI 账号密钥统一接入。
Wan 2.5 API 接入文档
使用 VezAPI 密钥接入 Wan 2.5。下列操作共用同一个账号余额和鉴权方式。
https://api.vezapi.com请求头使用 Authorization: Bearer YOUR_VEZAPI_KEY。每次提交使用唯一的 Idempotency-Key,查询同一笔提交时才复用。
Wan 2.5 - 图转视频
/api/v1/jobs/createTask模型标识: wan/2-5-image-to-video
| 参数 | 类型 | 说明与限制 |
|---|---|---|
model必填 | string | 用于生成任务的模型名称。必填字段。 - 该端点必须使用 `wan/2-5-image-to-video` 模型 可选值: 默认: |
callBackUrl可选 | string | 接收任务完成通知的回调 URL。可选参数;如果提供,系统会在任务完成(成功或失败)后向该地址发送 POST 请求;如未提供,则不会发送回调通知。 |
input必填 | object | 图像转视频任务的输入参数。 |
input.prompt必填 | string | 描述期望视频运动效果的文本提示词。最大长度:800 字符。
|
input.image_url必填 | string | 作为首帧使用的图像 URL,必须可被公网访问。 - 请提供上传后文件的 URL,而非文件内容 - 支持类型:`image/jpeg`、`image/png`、`image/webp` - 最大文件大小:10.0MB |
input.duration必填 | string | 生成视频的时长,单位为秒。 - `5`: 5 秒 - `10`: 10 秒 可选值: |
input.resolution必填 | string | 必填。可选 720p、1080p。 可选值: |
input.negative_prompt可选 | string | 用于描述需要避免出现内容的负向提示词。最大长度:500 字符。
|
input.enable_prompt_expansion可选 | boolean | 是否启用基于 LLM 的提示词改写。 - 布尔值:`true` / `false` |
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-5-image-to-video",
"input": {
"prompt": "The same woman from the reference image looks directly into the camera, takes a breath, then smiles brightly and speaks with enthusiasm: \"Have you heard? Alibaba Wan 2.5 API is now available on Kie.ai!\" Ambient audio: quiet indoor atmosphere, soft natural room tone. Camera: medium close-up, steady framing, natural daylight mood, accurate lip-sync with dialogue.",
"image_url": "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
服务器错误
Wan 2.5 - 文转视频
/api/v1/jobs/createTask模型标识: wan/2-5-text-to-video
| 参数 | 类型 | 说明与限制 |
|---|---|---|
model必填 | string | 用于生成任务的模型名称。必填字段。 - 该端点必须使用 `wan/2-5-text-to-video` 模型 可选值: 默认: |
callBackUrl可选 | string | 接收任务完成通知的回调 URL。可选参数;如果提供,系统会在任务完成(成功或失败)后向该地址发送 POST 请求;如未提供,则不会发送回调通知。 |
input必填 | object | 文生视频任务的输入参数。 |
input.prompt必填 | string | 视频生成的文本提示词,支持中文和英文,最大长度:800 字符。
|
input.duration必填 | string | 生成视频的时长,单位为秒。 - `5`: 5 秒 - `10`: 10 秒 可选值: |
input.aspect_ratio可选 | string | 生成视频的宽高比。 - `16:9`: 横屏 - `9:16`: 竖屏 - `1:1`: 正方形 可选值: |
input.resolution必填 | string | 必填。可选 720p、1080p。 可选值: |
input.negative_prompt可选 | string | 用于描述需要避免出现内容的负向提示词。最大长度:500 字符。
|
input.enable_prompt_expansion可选 | boolean | 是否启用基于 LLM 的提示词改写。对于较短提示词通常可提升效果,但会增加处理时长。 - 布尔值:`true` / `false` |
input.seed可选 | integer | 用于复现结果的随机种子。如果不提供,系统会自动选择随机种子。 |
请求示例
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-5-text-to-video",
"input": {
"prompt": "A dimly lit jazz bar at night, wooden tables glowing under warm pendant lights. Patrons sip drinks and chat quietly while a three-piece band performs on stage. The saxophone player stands under a spotlight, gleaming instrument reflecting the light. No dialogue. Ambient audio: smooth live jazz music with saxophone and piano, clinking glasses, low murmur of audience conversations, occasional burst of laughter from a nearby table. Camera: slow pan across the crowd, then gentle zoom toward the saxophone player'\''s solo, focusing on expressive hand movements.",
"duration": "5",
"aspect_ratio": "16:9",
"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
服务器错误
任务状态与回调
异步任务请保存返回的 taskId。调用 GET /api/v1/jobs/recordInfo?taskId=... 查询,或在创建时设置 callBackUrl。只有任务所属账号可以查询任务或基于任务创建派生资源。
超时可能表示请求已经受理。请在控制台查看原请求,不要自动新建任务。回调可能重试并重复到达,请使用 X-VezAPI-Event-Id 去重。
文件、日志与计费
生成媒体通常随上游保留 14 天,上传文件在 24 小时后失效。请在过期前保存所需文件。VezAPI 仅流式转发已登记资源,不提供永久作品库。请求日志保留两个自然月。
调用前预留积分,最终按实际优惠扣分 1:1 结算。用量不明时暂停新付费请求。若保护其他任务预留后余额不足以结算,会保留待结算记录,补足余额后再扣费;模型用量不会将钱包扣成负数。按时长计价的输入文件由服务端读取时长,读取失败时不提交模型任务。
使用你的 VezAPI 密钥发送请求。成功生成将消耗账号积分。
/api/v1/jobs/createTask返回结果将在这里显示。
Wan 2.5 API 价格
下方费率为参考估算,最终按实际优惠扣分 1:1 结算。按标准充值包换算,1,000 积分约为 10 美元,大额充值包可降低每积分实际单价。
| 规格 | 积分 | 计价单位 | 美元参考 |
|---|---|---|---|
| wan 2.5, text-to-video, default-10.0s-720p | 120.0 | 每个视频 | $1.2 |
| wan 2.5, text-to-video, default-5.0s-1080p | 100.0 | 每个视频 | $1 |
| wan 2.5, text-to-video, default-10.0s-1080p | 200.0 | 每个视频 | $2 |
| wan 2.5, image-to-video, default-10.0s-1080p | 200.0 | 每个视频 | $2 |
| wan 2.5, text-to-video, default-5.0s-720p | 60.0 | 每个视频 | $0.6 |
| wan 2.5, image-to-video, default-10.0s-720p | 120.0 | 每个视频 | $1.2 |
| wan 2.5, image-to-video, default-5.0s-1080p | 100.0 | 每个视频 | $1 |
| wan 2.5, image-to-video, default-5.0s-720p | 60.0 | 每个视频 | $0.6 |