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

# WAN 3.0 视频：线路与请求参数

> WAN 3.0 视频生成：渠道 YH、AS、Z、CC、MG 的模型名、能力对照和统一请求写法

> [!NOTE]
>
> **给 AI 助手的要点**
>
> * 接口：`POST https://1788.love/v1/videos`，请求头 `Authorization: Bearer YOUR_1788_API_KEY`、`Content-Type: application/json`。创建 → 查询 → 下载见[任务式接口](https://docs.1788.love/guides/async-tasks.md)。
> * 支持文生视频、图生视频、多模态参考（图 + 视频 + 音频，视频参考各渠道不同）。素材写成 `image_with_roles` / `video_with_roles` / `audio_with_roles`，和 [Seedance](https://docs.1788.love/video/seedance/request.md) 一致；也接受 `image_urls` / `video_urls` / `audio_urls`。
> * 比例写 `aspect_ratio`（也接受 `ratio`）。`duration` 是 JSON 数字。
> * **清晰度有两种写法**：渠道 YH、AS、CC 用 `resolution` 填；渠道 Z（`wan3.0-video` 固定 720p）和 MG（`wan-mg-480` / `-720`）的清晰度写在**模型名里**，`resolution` 不填，或填得和模型名一致，否则报错。
> * 带参考视频时要写 `reference_video_duration`（所有参考视频的总秒数，整数）。AS 渠道会校验它；MG 不支持参考视频。
> * 不支持的素材、尾帧、超量会直接报错，不会悄悄忽略。价格见[价目表](https://1788.love/pricing)。

## 线路表

| 模型名 | 渠道 | 计费 | 清晰度 | 时长（秒） | 比例 | 图 / 视频 / 音频上限 | 首帧 / 尾帧 |
| - | - | - | - | - | - | - | - |
| `wan3.0-yh` | YH | 按秒 | `480p` `720p`（`resolution`） | 4–30 | `16:9` `9:16` `1:1` `4:3` `3:4` `21:9` | 10 / 5 / 5 | 首帧 ✓；尾帧须同时有首帧 |
| `wan3.0-arts` | AS 快速版 | 按秒 | `480p` `720p` `1080p` | 2–30 | `16:9` `9:16` `1:1` `adaptive` | 10 / 5 / 5 | 首帧 ✓；尾帧须同时有首帧 |
| `wan3.0-arts-prime` | AS 极速版 | 按秒 | `480p` `720p` `1080p` | 2–30 | 同上 | 10 / 5 / 5 | 同上 |
| `wan3.0-video` | Z | 按秒 | 720p（模型名决定） | 6–30 | `16:9` `9:16` `1:1` `adaptive` | 9 / 3 / 3 | 首帧 ✓（作为参考图）/ 尾帧 ✗ |
| `w-3-p` | CC 快速 | 按条 | 仅 `1080p` | 2–30 | `16:9` `9:16` `adaptive` | 10 / 5 / 5 | 首帧 ✓ / 尾帧 ✓ |
| `w-3` | CC 慢速 | 按条（更便宜） | 仅 `1080p` | 2–30 | `16:9` `9:16` `adaptive` | 10 / 5 / 5 | 首帧 ✓ / 尾帧 ✓ |
| `wan-mg-480` | MG | 按条 | 480p（模型名决定） | 只能 20 | `16:9` `9:16` `1:1` `4:3` `3:4` `21:9` | 10 / **0** / 5 | 首帧 ✓（作为参考图）/ 尾帧 ✗ |
| `wan-mg-720` | MG | 按条 | 720p（模型名决定） | 同上 | 同上 | 10 / **0** / 5 | 同上 |

计费细节：

* 按秒的渠道（YH、AS、Z）按成片秒数计费，单价随清晰度分档；渠道 AS 带参考视频时，参考视频的秒数也一起计费（参考秒 + 成片秒）。
* 按条的渠道（CC、MG）一次任务一个固定价，和时长无关；MG 的价格随清晰度（模型名）不同。

## 统一请求写法

| 字段 | 类型 | 必填 | 说明 |
| - | - | - | - |
| `model` | string | 是 | 线路表里的模型名 |
| `prompt` | string | 是 | 画面描述；用"图1、视频1、音频1"指代素材，编号按数组顺序 |
| `duration` | integer | 建议 | 秒数，JSON 数字（不要写字符串）。MG 只能 20 |
| `resolution` | string | 渠道 YH、AS、CC 建议 | 见线路表。渠道 Z、MG 不用填（模型名已决定） |
| `aspect_ratio` | string | 建议 | 见线路表 |
| `image_with_roles` | object\[] | 否 | `role` 取 `first_frame`、`last_frame`、`reference_image`（默认）；各线路支持的角色见线路表 |
| `video_with_roles` | object\[] | 否 | 参考视频，`role` 固定 `reference_video`；渠道 MG 不支持 |
| `audio_with_roles` | object\[] | 否 | 参考音频，`role` 固定 `reference_audio` |
| `reference_video_duration` | integer | 带参考视频时必填（AS） | 所有参考视频的总秒数，整数 |

素材 URL 必须是公网 HTTP(S) 地址，不支持 base64。本地文件先用[上传素材](https://docs.1788.love/api-reference/upload-image.md)换成 URL。首帧、尾帧只能单独使用，不能再混用参考素材。

## 各线路差异和会报的错

错误在**创建任务时**立即返回，任务不会创建，也不扣费。

| 线路 | 差异 |
| - | - |
| 渠道 YH | 支持最多 10 图 / 5 参考视频 / 5 参考音频，按成片秒数计费（参考视频不另收费）；仅支持 `480p` / `720p` |
| 渠道 AS | 参考视频合计不超过 15 秒，且"参考视频秒数 + 成片秒数"不超过 30 秒 |
| 渠道 Z | 清晰度写在模型名里；不支持尾帧；`reference_video_duration` 不需要 |
| 渠道 CC | 两条：`w-3-p` 快速、`w-3` 慢速（价格更低，结果地址只保留约 2 小时，请尽快下载）；**仅支持 `1080p`**（不填默认 `1080p`）、时长 `2–30` 秒；支持首尾帧；比例仅支持 `16:9` / `9:16` / `adaptive`（不支持 `1:1`） |
| 渠道 MG | 时长只有 20 秒；不支持参考视频（带了报错）；参考音频最多 5 个；只有 480p、720p 两档 |

| 错误信息（节选） | 原因 | 处理 |
| - | - | - |
| `duration must be an integer between ...` / `duration must be between 2 and 30 seconds` | 时长超出该线路范围 | 按线路表取值，用 JSON 数字 |
| `... duration must be 20 seconds` | MG 的时长不是 20 | 改成 20 |
| `... supports only 720p, 1080p resolution` / `resolution must be 1080p` | 清晰度不在该线路范围 | 按线路表取值（CC 仅支持 `1080p`） |
| `w-3-p supports only 16:9, 9:16, adaptive aspect_ratio` | 比例不在 CC 线路支持范围（如传了 `1:1`） | 改用 `16:9`、`9:16` 或 `adaptive` |
| `... resolution is fixed at 720p by the model name` | 渠道 Z / MG 的 `resolution` 和模型名不一致 | 去掉 `resolution`，或换成对应清晰度的模型名 |
| `reference media count exceeds the ... limit` / `supports at most 10 images, 5 videos and 5 audios` | 素材数量超出上限 | 按线路表删减 |
| `does not support reference videos` | 渠道 MG 带了参考视频 | 去掉参考视频，或换支持参考视频的渠道（如 YH / AS / Z / CC） |
| `last frame requires a first frame` | 只写了尾帧 | 同时写首帧 |
| `does not support last_frame; use first_frame or reference_image` | 渠道 Z、MG 带了尾帧 | 改用参考图 |
| `first/last frame mode cannot be combined with reference media` | 首尾帧和参考素材混用 | 二选一 |
| `reference_video_duration is required ...` / `requires reference_video_duration ...` | 带了参考视频但没填总秒数 | 填整数秒数 |
| `reference videos must total at most 15 seconds` / `... plus output must total at most 30 seconds` | 参考视频总秒数过长 | 缩短参考视频或成片时长 |

## 示例

### 多模态参考（渠道 AS 快速版）

```bash theme={null}
curl https://1788.love/v1/videos \
  -H "Authorization: Bearer YOUR_1788_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "wan3.0-arts",
    "prompt": "图1的模特按视频1的动作走秀，背景音乐用音频1",
    "duration": 10,
    "resolution": "720p",
    "aspect_ratio": "9:16",
    "image_with_roles": [
      { "url": "https://ruyi6.cn/r/EXAMPLE_A.png", "role": "reference_image" }
    ],
    "video_with_roles": [
      { "url": "https://ruyi6.cn/r/EXAMPLE_C.mp4", "role": "reference_video" }
    ],
    "audio_with_roles": [
      { "url": "https://ruyi6.cn/r/EXAMPLE_D.mp3", "role": "reference_audio" }
    ],
    "reference_video_duration": 6
  }'
```

### 清晰度写在模型名里（渠道 Z，720p）

```json theme={null}
{
  "model": "wan3.0-video",
  "prompt": "雨后的街道，镜头缓慢拉远",
  "duration": 10,
  "aspect_ratio": "16:9"
}
```

### 渠道 MG（480p，按条）

```json theme={null}
{
  "model": "wan-mg-480",
  "prompt": "图1的杯子在木桌上缓慢旋转，柔光",
  "duration": 20,
  "aspect_ratio": "1:1",
  "image_with_roles": [
    { "url": "https://ruyi6.cn/r/EXAMPLE_A.png", "role": "reference_image" }
  ]
}
```

### 首尾帧（渠道 CC）

```json theme={null}
{
  "model": "w-3-p",
  "prompt": "镜头从花苞缓缓推进，花朵逐渐绽放",
  "duration": 5,
  "resolution": "1080p",
  "aspect_ratio": "16:9",
  "image_with_roles": [
    { "url": "https://ruyi6.cn/r/EXAMPLE_X.png", "role": "first_frame" },
    { "url": "https://ruyi6.cn/r/EXAMPLE_Y.png", "role": "last_frame" }
  ]
}
```

创建成功后保存返回的 `id`，查询、下载见[任务式接口](https://docs.1788.love/guides/async-tasks.md)。


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