---
title: Wan 3.0 视频生成
description: Wan 3.0 与 Prime 的文生视频、参考图、首尾帧参数和多语言示例。
api: "POST /v1/videos"
---

支持模型 `wan3.0-video` 和 `wan3.0-video-prime`。两者使用相同请求结构，但模型权限和价格独立。

<RequestExample>
```bash 文生视频
curl https://sub.vcnovb.cn/v1/videos \
  -H "Authorization: Bearer $VC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "wan3.0-video",
    "prompt": "小猫在月光下的屋顶奔跑，平滑跟拍，细腻光影",
    "seconds": "5",
    "size": "720P",
    "aspect_ratio": "16:9"
  }'
```
```bash 首帧参考
curl https://sub.vcnovb.cn/v1/videos \
  -H "Authorization: Bearer $VC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "wan3.0-video",
    "prompt": "人物缓缓转头，镜头平滑推进",
    "image": "https://example.com/first.png",
    "seconds": "5",
    "size": "720P",
    "aspect_ratio": "9:16"
  }'
```
```bash 首尾帧
curl https://sub.vcnovb.cn/v1/videos \
  -H "Authorization: Bearer $VC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "wan3.0-video",
    "prompt": "从白天平滑过渡到夜晚，保持镜头构图",
    "mode": "first-last-frame",
    "metadata": {
      "first_frame_url": "https://example.com/day.png",
      "last_frame_url": "https://example.com/night.png"
    },
    "seconds": "5",
    "size": "1080P",
    "aspect_ratio": "16:9"
  }'
```
```python Python
import os
import requests

response = requests.post(
    "https://sub.vcnovb.cn/v1/videos",
    headers={"Authorization": f"Bearer {os.environ['VC_API_KEY']}"},
    json={
        "model": "wan3.0-video",
        "prompt": "小猫在月光下的屋顶奔跑，平滑跟拍，细腻光影",
        "seconds": "5", "size": "720P", "aspect_ratio": "16:9",
    },
    timeout=120,
)
response.raise_for_status()
print(response.json())
```
```javascript JavaScript
const response = await fetch("https://sub.vcnovb.cn/v1/videos", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.VC_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    model: "wan3.0-video",
    prompt: "小猫在月光下的屋顶奔跑，平滑跟拍，细腻光影",
    seconds: "5", size: "720P", aspect_ratio: "16:9",
  }),
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.json());
```
</RequestExample>

<ResponseExample>
```json 创建成功
{"id":"task_example_wan","object":"video","model":"wan3.0-video","status":"queued"}
```
```json 400 · 时长错误
{"error":{"type":"invalid_request_error","message":"Wan3 seconds must be an integer between 2 and 30"}}
```
```json 400 · 分辨率错误
{"error":{"type":"invalid_request_error","message":"Wan3 size must be 480P, 720P or 1080P"}}
```
</ResponseExample>

## 请求参数

<ParamField body="model" type="string" required>`wan3.0-video` 或 `wan3.0-video-prime`。模型必须在当前 Key 的目录中。</ParamField>
<ParamField body="prompt" type="string" required>描述主体、动作、构图、镜头和光影。也兼容 `input.prompt`，顶层 prompt 优先。</ParamField>
<ParamField body="seconds" type="integer | string" default="5">视频时长，取值为 2–30 秒，支持整数或整数字符串。</ParamField>
<ParamField body="size" type="string" default="1080P">视频分辨率，取值为 `480P`、`720P` 或 `1080P`。</ParamField>
<ParamField body="aspect_ratio" type="string">画面宽高比，例如 `16:9`、`9:16`、`1:1`、`4:3`、`3:4`。可用比例见所选模型的分组说明。</ParamField>
<ParamField body="image" type="string">首帧或参考图的公开 URL。参考图模式需在所选分组中开通。</ParamField>
<ParamField body="images" type="array<string>">参考图 URL 数组，用于已开通多图参考能力的分组。</ParamField>
<ParamField body="mode" type="string">生成模式：`first-last-frame` 为首尾帧，`all-reference` 为参考素材；选择分组已开通的模式。</ParamField>
<ParamField body="metadata" type="object">扩展素材参数，例如 `first_frame_url`、`last_frame_url`、`reference_image_urls`、`reference_video_urls`、`reference_audio_urls`。</ParamField>

## 参数优先级

| 参数 | 从高到低 |
| --- | --- |
| 时长 | `seconds` → `duration` → `metadata.parameters.duration` → `parameters.duration` → 5 |
| 分辨率 | `size` → `resolution` → `metadata.parameters.resolution` → `parameters.resolution` → 1080P |

建议统一使用 `seconds` 和 `size`。同时提交别名字段时，按上表优先级读取。

普通版与 Prime 的价格分别列在[模型广场](https://sub.vcnovb.cn/model-plaza)。

## 使用参考素材

参考图示例中的 URL 需要替换为实际素材地址，并确保链接可被服务端访问。首帧、首尾帧和多素材模式需使用支持对应功能的分组。

## 查询生成结果

保存创建响应中的任务 ID，通过[Wan 3.0 查询与下载](/models/wan3/query)查看进度，完成后下载视频。
