# MiniMax H3 768p 与 2K

用 POST /v1/videos 调用 MiniMax H3 768p 和 2K。图生视频传 image_url，首尾帧传 start_image_url 和 end_image_url。

`minimax-h3-768p` 和 `minimax-h3-2k` 使用同一个视频任务接口。创建请求返回任务对象，不直接返回视频文件。

```http
POST /v1/videos
```

查询和下载：

```http
GET /v1/videos/{task_id}
GET /v1/videos/{task_id}/content
```

请求体是 JSON。字段放在顶层，不要包进 `metadata`。图片必须是公网可直接访问的 URL，任务完成前不能过期。

这两个模型不是 1440p 的 `minimax-h3`。不要把 `start_frame`、`end_frame` 或 `reference_images` 用在这里。

## 模型与价格

按生成秒数计费，预扣 `duration × 单价`。失败全额退回。

| 模型 ID | 分辨率 | 特价版 | 稳定版 | 时长 |
| --- | --- | ---: | ---: | --- |
| `minimax-h3-768p` | 768p | ¥0.35/秒 | ¥0.50/秒 | 4–15 秒 |
| `minimax-h3-2k` | 2K | ¥0.56/秒 | ¥0.80/秒 | 4–15 秒 |

8 秒示例：768p 特价版 ¥2.80、稳定版 ¥4.00；2K 特价版 ¥4.48、稳定版 ¥6.40。

官方渠道（最快30秒一个视频），933（完全过人脸），4-15s，音频参考免费，参考视频额外计费 ¥0.18/秒，图片参考（>5张）¥0.10/张，H3 Context IR（增强多模态上下文理解）按 0.1 元/次计费。

## 请求参数

| 参数 | 必填 | 说明 |
| --- | --- | --- |
| `model` | 是 | `minimax-h3-768p` 或 `minimax-h3-2k` |
| `prompt` | 是 | 主体、动作和镜头 |
| `duration` | 否 | 整数秒，4–15。建议显式传入 |
| `aspect_ratio` | 否 | `16:9`、`9:16`、`1:1`、`4:3`、`3:4`、`21:9`、`3:2`、`2:3`。默认 `16:9`。也接受 `ratio` |
| `image_url` | 否 | 图生视频的参考图。字符串 URL，或 `{"url":"..."}` |
| `start_image_url` | 否 | 首帧。只和 `end_image_url` 一起用 |
| `end_image_url` | 否 | 尾帧 |

## 图生视频

只传 `image_url`。不要同时传首尾帧字段。

```bash
curl https://kaienapi.com/v1/videos \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "minimax-h3-768p",
    "prompt": "让画面中的人物缓缓转头微笑",
    "duration": 4,
    "aspect_ratio": "9:16",
    "image_url": "https://example.com/portrait.jpg"
  }'
```

2K 把 `model` 改成 `minimax-h3-2k`。

## 首尾帧

只传 `start_image_url` 和 `end_image_url`。不要传 `image_url`。不要把尾帧放进 `extra_images`，也不要靠 `@Image2` 锁定尾帧。提示词写明从首帧画面过渡到尾帧画面。时长建议 8 秒，画幅和参考图一致。

```bash
curl https://kaienapi.com/v1/videos \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "minimax-h3-768p",
    "prompt": "从首帧画面平滑过渡到尾帧画面，镜头稳定",
    "duration": 8,
    "aspect_ratio": "16:9",
    "start_image_url": "https://example.com/first.jpg",
    "end_image_url": "https://example.com/last.jpg"
  }'
```

两张图差异很大时，完成状态不保证两端都被严格锁定。接入前抽查成片开头和结尾。

## 查询结果

每 3 到 5 秒查询一次。`status` 为 `completed` 后停止。

```bash
curl "https://kaienapi.com/v1/videos/$TASK_ID" \
  -H "Authorization: Bearer <YOUR_API_KEY>"
```

读取响应里的 `url`。该地址可直接下载视频文件。`status` 为 `failed` 时读取 `error`，不要用同一组参数无限重复创建。
