# MiniMax H3 — /videos/generations

MiniMax H3 视频生成（异步任务）：1080P 输出、固定生成原生音频；时长 duration=5–15 的任意整数秒，画幅六选一；带 image 即图生视频。提交后返回任务号（HTTP 202），轮询 GET /v1/videos/jobs/{id} 直到 status=succeeded，结果在 data[0].url。按秒计费、失败全额退。

**端点:** `POST https://nezhagate.com/v1/videos/generations`

## 认证
```
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
```

## 请求参数
| 参数 | 类型 | 必填 | 说明 |
| --- | --- | --- | --- |
| `model` | string | 是 | 模型 ID，此处为 minimax-h3。 |
| `prompt` | string | 是 | 视频内容、镜头与运动的描述。最长 2000 字节（UTF-8，中文一个字算 3 字节，约 666 字）。传多张参考图时，可用 @Image1 / @Image2 在提示词里点名第几张，例如「@Image1 的角色站在 @Image2 的场景里」；不点名则由模型自行取用。 |
| `duration` | integer | 否 | 时长秒数，5–15 的任意整数（默认 5）。也可写作 seconds。按秒计费。 |
| `resolution` | string | 否 | 分辨率：1080P（默认 1080P；每档单价不同，见模型页价格表）。 |
| `size` | string | 否 | 画幅：16:9 / 9:16 / 21:9 / 4:3 / 1:1 / 3:4（默认 16:9）。也可写作 aspect_ratio。 |
| `audio` | boolean | 否 | 该模型固定生成原生音频，此参数会被忽略（传 false 会被拒绝）。 |
| `image` | string | 否 | 图生视频：带参考图（默认作首帧）即走图生视频，可传公网 URL、data: URI 或 base64；不带则为文生视频。 |
| `images` | array | 否 | 多张参考图，最多 5 张（本模型上限）。数组元素可以是公网 URL、data: URI 或 base64。超过上限会直接报错，不会截断。也可写作 reference_images。 |
| `image_role` | string | 否 | 参考图用法：first_frame（默认，作首帧；传两张时第二张作尾帧）或 reference（作为主体/风格参考图，多张时用这个）。用 reference_images 传入时默认就是 reference。 |
| `audio_reference` | string / array | 否 | 参考音频的公网 http(s) 链接，最多 3 段。必须与参考图或参考视频一起使用，不能单独提供。也可写作 audio_references，两者不要同时给。 |

## 请求示例
```bash
# 1) submit -> 202 {"id":"img_...","status":"queued"}
curl https://nezhagate.com/v1/videos/generations -H 'Authorization: Bearer YOUR_API_KEY' -H 'Content-Type: application/json' -d '{"model": "minimax-h3", "prompt": "a cat surfing a wave at sunset", "duration": 5, "resolution": "1080P", "size": "16:9"}'
# image-to-video: also pass  "image": "https://example.com/first-frame.png"
# 2) poll every ~5s until status=succeeded, then read data[0].url
curl https://nezhagate.com/v1/videos/jobs/img_3f9a...c2 -H 'Authorization: Bearer YOUR_API_KEY'
```

## 响应示例
```json
{
  "id": "img_3f9a...c2",
  "object": "video.generation.job",
  "status": "queued",
  "model": "minimax-h3"
}
```