> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbrod.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Wan 3.0 Video 视频生成

> wan3.0-video 的生成请求与响应。

## 模型选择

| 模型 ID | 请求地址 |
| - | - |
| `wan3.0-video` | `POST /v1/videos` |

## 主要参数

下表列出常用参数；媒体引用的组合限制以接口校验结果为准。

| 字段 | 取值或限制 | 说明 |
| - | - | - |
| `model` | `wan3.0-video` | 模型 ID |
| `prompt` | string | 内容描述；最多 20000 字符，使用素材时可选 |
| `duration` | 2–30；默认 `5` | 输出时长（秒）；当前网关仅接受此区间的整数，不接受 -1 |
| `size` | `adaptive`、`16:9`、`4:3`、`1:1`、`3:4`、`9:16` | 视频宽高比；部分参考素材或编辑模式有额外限制 |
| `resolution` | `480P`、`720P`、`1080P`；默认 `1080P` | 输出分辨率；大小写不敏感 |
| `image_urls` | 最多 10 项 | 参考图片；1 张可作首帧、2 张可作首尾帧；具体取决于 generation\_type |
| `image_with_roles` | 最多 10 项 | 带角色的参考图，可指定首帧、尾帧或参考图 |
| `video_urls` | 最多 5 项 | 参考视频地址；实际时长与格式还需符合模型的素材限制 |
| `audio_urls` | 最多 5 项 | 参考音频地址；实际时长与格式还需符合模型的素材限制 |
| `seed` | 0–2147483647 | 随机种子 |
| `audio` | `true` / `false` | 是否输出音轨；开关声音价格相同 |
| `watermark` | `true` / `false`；默认 `false` | 添加水印 |
| `generation_type` | `frame`、`reference` | 指定图片作为首尾帧或参考素材；两类素材不可混用 |
| `audio_url` | string | 单条参考音频地址 |
| `file_url` | string | 参考文档地址；不可与 link\_url 同时使用 |
| `link_url` | string | 参考网页地址；不可与 file\_url 同时使用 |

## 素材规则

`image_urls` 可用于首尾帧或参考图，通过 `generation_type` 指定归属；`image_with_roles` 可明确首尾帧。`file_url` 与 `link_url` 不能同时提供。
参考视频与音频的时长、格式及总时长需符合当前模型的限制。

## 返回说明

提交后返回任务 ID，不表示视频已经完成。请在 [任务查询](/videos/task) 中用同一用户的密钥查询状态和结果。


## OpenAPI

````yaml generated/wan3.0-video.json POST /v1/videos
openapi: 3.0.3
info:
  title: new-api Wan 3.0 Video API
  version: 0.1.0
servers:
  - url: https://ai.xbrod.com
    description: 本项目线上 API 网关
security:
  - bearerAuth: []
paths:
  /v1/videos:
    post:
      summary: Wan 3.0 Video 视频生成
      description: 使用当前模型发起生成请求。
      operationId: generate_wan3_0_video
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                model:
                  type: string
                  enum:
                    - wan3.0-video
                  description: 模型 ID
                prompt:
                  type: string
                  description: 内容描述；最多 20000 字符，使用素材时可选
                duration:
                  type: integer
                  minimum: 2
                  maximum: 30
                  default: 5
                  description: 输出时长（秒）；当前网关仅接受此区间的整数，不接受 -1
                size:
                  type: string
                  enum:
                    - adaptive
                    - '16:9'
                    - '4:3'
                    - '1:1'
                    - '3:4'
                    - '9:16'
                  description: 视频宽高比；部分参考素材或编辑模式有额外限制
                resolution:
                  type: string
                  enum:
                    - 480P
                    - 720P
                    - 1080P
                  default: 1080P
                  description: 输出分辨率；大小写不敏感
                image_urls:
                  type: array
                  maxItems: 10
                  items:
                    type: string
                  description: 参考图片；1 张可作首帧、2 张可作首尾帧；具体取决于 generation_type
                image_with_roles:
                  type: array
                  maxItems: 10
                  description: 带角色的参考图，可指定首帧、尾帧或参考图
                  items:
                    type: object
                    required:
                      - url
                      - role
                    properties:
                      url:
                        type: string
                      role:
                        type: string
                        enum:
                          - first_frame
                          - last_frame
                          - reference_image
                video_urls:
                  type: array
                  maxItems: 5
                  items:
                    type: string
                  description: 参考视频地址；实际时长与格式还需符合模型的素材限制
                audio_urls:
                  type: array
                  maxItems: 5
                  items:
                    type: string
                  description: 参考音频地址；实际时长与格式还需符合模型的素材限制
                seed:
                  type: integer
                  minimum: 0
                  maximum: 2147483647
                  description: 随机种子
                audio:
                  type: boolean
                  description: 是否输出音轨；开关声音价格相同
                watermark:
                  type: boolean
                  default: false
                  description: 添加水印
                generation_type:
                  type: string
                  enum:
                    - frame
                    - reference
                  description: 指定图片作为首尾帧或参考素材；两类素材不可混用
                audio_url:
                  type: string
                  description: 单条参考音频地址
                file_url:
                  type: string
                  description: 参考文档地址；不可与 link_url 同时使用
                link_url:
                  type: string
                  description: 参考网页地址；不可与 file_url 同时使用
              required:
                - model
            example:
              model: wan3.0-video
              prompt: 湖面上的纸船，日出时的柔和光线
              size: '16:9'
              duration: 5
              resolution: 720P
      responses:
        '200':
          description: 任务已提交，视频文件尚未生成
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  object:
                    type: string
                  status:
                    type: string
                  model:
                    type: string
              example:
                id: task_example
                object: video
                status: queued
                model: wan3.0-video
        '400':
          description: 模型未启用、缺少提示词或媒体引用，或参数超出模型限制
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 本项目签发的 API 密钥，不是上游密钥

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.