> ## 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.

# MiniMax H3 视频：线路与请求参数

> MiniMax H3 多模态视频生成：渠道 Y、M、HQ 的模型名、能力对照和统一请求写法

> [!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 数字。
> * 清晰度：渠道 Y、M 用 `resolution` 填（`768P`、`1080P`、`2K` 等，大小写均可）；**渠道 HQ 的清晰度固定 768p，时长写在模型名里**（`-10s` / `-15s`），不用填 `resolution`。
> * 首帧 / 尾帧不能和参考素材混用（渠道 HQ 不支持尾帧）。不支持的素材、超量会直接报错，不会悄悄忽略。
> * 价格见[价目表](https://1788.love/pricing)，本页只说计费方式。

## 线路表

| 模型名 | 渠道 | 计费 | 清晰度（`resolution`） | 时长（秒） | 比例 | 图 / 视频 / 音频上限 | 首帧 / 尾帧 |
| - | - | - | - | - | - | - | - |
| `MiniMax-H3-Y` | Y | 按秒 | `768P` `1080P` `2K` | 4–15 | `16:9` `9:16` `1:1` `4:3` `3:4` `21:9` | 5 / 3 / 3 | 首帧 ✓ / 尾帧 ✓ |
| `MiniMax-H3-M` | M | 按秒 | `768P` `1080P` `2K` | 4–15 | 同上，另支持 `adaptive` | 5 / 3 / 3 | 首帧 ✓ / 尾帧 ✓ |
| `Minimax-H3-768p-933-10s` | HQ | 按条 | 固定 768p | 固定 10 | 同渠道 Y | 9 / 3 / 3 | 首帧 ✓（作为参考图）/ 尾帧 ✗ |
| `Minimax-H3-768p-933-15s` | HQ | 按条 | 固定 768p | 固定 15 | 同渠道 Y | 9 / 3 / 3 | 同上 |
| `MiniMax-H3-GW` | GW（按秒） | 按秒 | 固定 `768p` | 4–30 | `16:9` `9:16` `1:1` | 9 / 3 / 3（音视频合计≤15s） | 首帧 ✓ / 尾帧 ✓ |

计费细节：

* 渠道 Y：按成片秒数计费，参考视频本身不计费；2K、1080P 单价高于 768P。
* 渠道 M：带参考视频时，**参考视频的秒数也一起计费**（参考秒 + 成片秒），所以必须填 `reference_video_duration`。
* 渠道 HQ：一次任务一个固定价，10 秒和 15 秒是两个模型名，价格不同。
* 渠道 GW：`MiniMax-H3-GW` 固定 768p 按输出秒数计费（参考视频时长不计秒）。

## 统一请求写法

| 字段 | 类型 | 必填 | 说明 |
| - | - | - | - |
| `model` | string | 是 | 线路表里的模型名 |
| `prompt` | string | 是 | 画面描述；用"图1、视频1、音频1"指代素材，编号按数组顺序 |
| `duration` | integer | 建议 | 秒数，JSON 数字。HQ 不用填；填了必须等于模型名里的 10 或 15 |
| `resolution` | string | 渠道 Y、M 建议 | 见线路表。HQ 固定 768p（填 `768p` 可以，填别的会报错） |
| `aspect_ratio` | string | 建议 | 见线路表 |
| `image_with_roles` | object\[] | 否 | `role` 取 `first_frame`、`last_frame`、`reference_image`（默认） |
| `video_with_roles` | object\[] | 否 | 参考视频，`role` 固定 `reference_video` |
| `audio_with_roles` | object\[] | 否 | 参考音频，`role` 固定 `reference_audio` |
| `reference_video_duration` | integer | 渠道 M 带参考视频时必填 | 所有参考视频的总秒数，1–15。其他渠道可不填 |

素材 URL 必须是公网 HTTP(S) 地址，不支持 base64。本地文件先用[上传素材](https://docs.1788.love/api-reference/upload-image.md)换成 URL。

首帧、尾帧只能单独使用：写了 `first_frame` 或 `last_frame` 就不能再带参考图、参考视频、参考音频。

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

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

| 线路 | 差异 |
| - | - |
| 渠道 Y | 尾帧可用；参考视频不计费 |
| 渠道 M | 参考图最多 5 张；带参考视频必须填 `reference_video_duration`（1–15 秒） |
| 渠道 HQ | 不支持尾帧；清晰度和时长不能改；按条计费 |

| 错误信息（节选） | 原因 | 处理 |
| - | - | - |
| `duration must be an integer between 4 and 15 seconds` | 时长超出范围 | 按线路表取值，用 JSON 数字 |
| `resolution must be 768P, 1080P, or 2K` | 清晰度不在该线路范围 | 按线路表取值 |
| `... duration is fixed at 10 seconds by the model name` | HQ 的 `duration` 和模型名不一致 | 去掉 `duration`，或换成对应的 `-15s` 模型 |
| `... resolution is fixed at 768p by the model name` | HQ 填了 768p 以外的清晰度 | 去掉或改成 `768p` |
| `supports at most 5 images, 3 reference videos and 3 reference audios` | 素材数量超出上限 | 按线路表删减 |
| `first/last-frame images cannot be combined with reference media` | 首帧 / 尾帧和参考素材混用 | 二选一 |
| `only one first_frame image is allowed` / `only one last_frame image is allowed` | 首帧或尾帧不止一张 | 各只留一张 |
| `does not support last_frame` | 渠道 HQ 带了尾帧 | 改用参考图，或换渠道 Y、M |
| `reference_video_duration is required ...` | 渠道 M 带了参考视频但没填总秒数 | 填 1–15 的整数 |
| `Metaso H3 supports at most 5 reference images` | 渠道 M 参考图超过 5 张 | 删减 |
| `do not combine content with image_with_roles ...` | 同时写了官方 `content` 数组和统一素材字段 | 只用一种写法 |

## 示例

### 多模态参考（渠道 Y）

```bash theme={null}
curl https://1788.love/v1/videos \
  -H "Authorization: Bearer YOUR_1788_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "MiniMax-H3-Y",
    "prompt": "图1的模特穿着图2的衣服，按视频1的节奏走秀，背景音乐用音频1",
    "duration": 8,
    "resolution": "1080P",
    "aspect_ratio": "9:16",
    "image_with_roles": [
      { "url": "https://ruyi6.cn/r/EXAMPLE_A.png", "role": "reference_image" },
      { "url": "https://ruyi6.cn/r/EXAMPLE_B.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" }
    ]
  }'
```

### 首尾帧（渠道 M）

```json theme={null}
{
  "model": "MiniMax-H3-M",
  "prompt": "镜头从花苞缓缓推进，花朵逐渐绽放",
  "duration": 5,
  "resolution": "768P",
  "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" }
  ]
}
```

### 渠道 M 带参考视频

```json theme={null}
{
  "model": "MiniMax-H3-M",
  "prompt": "按视频1的运镜，让图1的人物走进画面",
  "duration": 8,
  "resolution": "1080P",
  "aspect_ratio": "16:9",
  "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" }
  ],
  "reference_video_duration": 6
}
```

### 渠道 HQ（10 秒，按条）

```json theme={null}
{
  "model": "Minimax-H3-768p-933-10s",
  "prompt": "商品旋转展示，柔和的棚拍光",
  "aspect_ratio": "1:1",
  "image_with_roles": [
    { "url": "https://ruyi6.cn/r/EXAMPLE_A.png", "role": "reference_image" }
  ]
}
```

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


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