Wan 3.0 Video API 接入文档
使用 VezAPI 密钥接入 Wan 3.0 Video。下列操作共用同一个账号余额和鉴权方式。
https://api.vezapi.com请求头使用 Authorization: Bearer YOUR_VEZAPI_KEY。每次提交使用唯一的 Idempotency-Key,查询同一笔提交时才复用。
Wan 3.0 - 生成视频
/api/v1/jobs/createTask模型标识: wan/3-0-video
| 参数 | 类型 | 说明与限制 |
|---|---|---|
model必填 | string | wan/3-0-video 是标准模型。用于生成视频的模型名称。必填字段。 - 此端点必须为 `wan/3-0-video` 可选值: |
callBackUrl可选 | string | 任务完成通知的回调 URL。该参数为可选项。如果提供,当任务完成时,无论成功或失败,系统都会向该 URL 发送 POST 请求。如果未提供,则不会发送回调通知。 |
input必填 | object | Wan 3.0 生成视频参数。 |
input.prompt可选 | string | 文本提示词,支持中英文。最多 20000 字符。文生视频必填;其他模式建议与媒体一起传。参考模式用 Image1/Video1/Audio1 引用素材。
|
input.first_frame_url可选 | string | 首帧图 URL,最多 1 张,严格作为视频第一帧。用于首帧生视频 / 首尾帧生视频。不可与 `reference_*_urls` 同传。 格式:JPEG/JPG、PNG(不支持透明通道)、BMP、WEBP;单边 [240, 8000] px;长宽比 ≤ 8:1;≤ 20MB。 |
input.last_frame_url可选 | string | 尾帧图 URL,需与 first_frame_url 一起使用,格式限制同 first_frame_url。 |
input.reference_image_urls可选 | array | 全能参考模式的参考图,最多 10 张。按数组顺序对应 prompt 中的 Image1、Image2…。规格同 `first_frame_url`。不可与首帧/尾帧同传。
|
input.reference_video_urls可选 | array | 全能参考模式的参考视频,最多 5 段。单段 1–15s,合计 ≤ 15s。按数组顺序对应 Video1、Video2…。 格式:mp4、mov;单边 [240, 4096] px;长宽比 ≤ 8:1;单文件 ≤ 100MB。 输出侧还有一层:输入视频时长 + duration 合计不能超过 30 秒。
|
input.reference_audio_urls可选 | array | 全能参考模式的参考音频,最多 5 段。单段 1–15s,合计 ≤ 15s。按数组顺序对应 Audio1、Audio2…。格式:wav、mp3;≤ 15MB。参考音频可以作为唯一的媒体输入,搭配参考图或参考视频效果通常更好。
|
input.reference_file_urls可选 | array | 文件生视频。最多 1 个,不能与 `reference_link_urls` 同传,也不能与首帧/尾帧同传。 格式:docx/doc/xlsx/xls/pptx/ppt/pdf/txt/key/pages/numbers/md;≤ 100MB;pdf/docx/ppt/key/pages 等 ≤ 50 页。
|
input.reference_link_urls可选 | array | 链接生视频。最多 1 个公开免登录网页。不能与 `reference_file_urls` 同传,也不能与首帧/尾帧同传。
|
input.resolution可选 | string | 输出分辨率档位。默认 **1080P**。 可选值: 默认: |
input.aspect_ratio可选 | string | 输出宽高比。`adaptive`(默认)根据输入素材和意图自动选择。 可选值: 默认: |
input.duration可选 | integer | 输出视频时长(秒)。默认 5。无视频输入时取 [2, 30];有参考视频时:输入视频时长 + 输出时长合计 ≤ 30。传 `-1` 为智能时长,由模型决定。 默认: |
input.audio可选 | boolean | 输出视频是否带音轨。默认 true。 默认: |
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/3-0-video",
"input": {
"prompt": "A kitten running across a rooftop under the moonlight, neon lights flickering in the distance, cinematic quality, with smooth camera movement.",
"resolution": "1080P",
"aspect_ratio": "adaptive",
"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. |
任务状态与回调
异步任务请保存返回的 taskId。调用 GET /api/v1/jobs/recordInfo?taskId=... 查询,或在创建时设置 callBackUrl。只有任务所属账号可以查询任务或基于任务创建派生资源。
超时可能表示请求已经受理。请在控制台查看原请求,不要自动新建任务。回调可能重试并重复到达,请使用 X-VezAPI-Event-Id 去重。
文件、日志与计费
生成媒体通常随上游保留 14 天,上传文件在 24 小时后失效。请在过期前保存所需文件。VezAPI 仅流式转发已登记资源,不提供永久作品库。请求日志保留两个自然月。
调用前预留积分,最终按实际优惠扣分 1:1 结算。用量不明时暂停新付费请求。若保护其他任务预留后余额不足以结算,会保留待结算记录,补足余额后再扣费;模型用量不会将钱包扣成负数。按时长计价的输入文件由服务端读取时长,读取失败时不提交模型任务。