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

# MiniMax-Hailuo-02

Hailuo 02 是 MiniMax 推出的全新视频生成模型，支持文生视频、图生视频、首尾帧视频等功能，适用于多种场景的视频生成需求。

### 模型参数

* 模型ID：`MiniMax-Hailuo-02`
* 模型价格：你可以在[模型广场](https://geekai.co/models?platform=minimax\&type=video)查看最新价格信息
* 调用入口：`https://geekai.co/api/v1/videos/generations`
* 模型参数：参考[视频 API 手册](https://docs.geekai.co/cn/api/video/generations)
* API认证：[获取 API KEY](https://docs.geekai.co/cn/docs/quick_start)

<Note>
  不支持视频 API 中的以下参数：

  * `negative_prompt`
  * `with_audio`
  * `size`
  * `quality`
  * `aspect_ratio`
  * `fps`

  附：[Hailuo 02 官方 API 文档](https://platform.minimaxi.com/document/text_to_video)
</Note>

传递首尾帧时参数设置和官方有差异，极客智坊视频 API 使用 `image` 传递首帧（对应海螺视频 API `first_frame_image` 字段），使用 `image_tail` 传递尾帧（对应海螺视频 API `last_frame_image` 字段），二者均支持传入图片 URL 或者 Base64 编码的图片数据。

Hailuo 02 支持的 `resolution` 分辨率为 `512P`、`768P` 和 `1080P`，默认值是 `768P`。

Hailuo 02 支持的 `duration` 视频时长为 6s、10s，默认 6s，其中 `1080P` 分辨率仅支持 6s。

### 模型价格

Hailuo 02 生成视频按时长和分辨率计费，以下是 Hailuo 02 的价格表：

| 时长（duration） | 分辨率（resolution） | 价格（单位：元/个） |
| ------------ | --------------- | ---------- |
| 6            | 512P            | 0.6        |
| 10           | 512P            | 1          |
| 6            | 768P            | 2          |
| 10           | 768P            | 4          |
| 6            | 1080P           | 3.5        |

使用极客智坊提供的[低价代理渠道](https://docs.geekai.co/cn/docs/model_price)调用时，不同参数对应价格按照价格表x对应的折扣值即可：以高可用速度优先通道为例，折扣值是 `0.8`，那么生成一张分辨率为 `768P`、时长为 `6` 秒的视频价格是 `2 x 0.8 = 1.6` 元，如果生成同样时长但分辨率为 `1080P` 的视频价格是 `3.5 x 0.8 = 2.8` 元。其他参数依次类推。

### 文生视频

通过文字描述来生成对应视频：

```bash theme={null}
curl --location --request POST 'https://geekai.co/api/v1/videos/generations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--data '{
    "model":"MiniMax-Hailuo-02",
    "prompt":"男子拿起一本书[上升]，然后阅读[固定]"
}'
```

`[上升]` 和 `[固定]` 是官方提供的控制指令，可以在 `prompt` 中通过 \[指令] 格式添加运镜指令，以实现精确的镜头控制。更多控制指令请参考[官方文档](https://platform.minimaxi.com/document/text_to_video)。

响应是一个包含生成图片 URL 的 JSON 对象：

```json theme={null}
{
    "model": "MiniMax-Hailuo-02",
    "task_id": "10489e94-a6d6-4019-a48a-9d2054852a53",
    "task_status": "succeed",
    "video_result": [
        {
            "url": "https://static.geekai.co/video/2025/10/14/e140da85afc31d33462b45fe96e575ad.mp4",
            "duration": 5.875
        }
    ]
}
```

图生视频响应结构和文生视频一样，不再列举。

### 图生视频

**首帧**

通过 `image` 传入单图即可实现基于首帧生成视频：

```bash theme={null}
curl --location --request POST 'https://geekai.co/api/v1/videos/generations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--data '{
    "model":"MiniMax-Hailuo-02",
    "prompt":"老鼠跑向镜头前，微笑着眨了眨眼睛",
    "image":"https://cdn.hailuoai.com/prod/2024-09-18-16/user/multi_chat_file/9c0b5c14-ee88-4a5b-b503-4f626f018639.jpeg",
    "duration": 6,
    "resolution": "1080P"
}'
```

**首尾帧**

通过 `image` + `image_tail` 传入首尾两张图即可实现基于首尾帧生成视频：

```bash theme={null}
curl --location --request POST 'https://geekai.co/api/v1/videos/generations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--data '{
    "model":"MiniMax-Hailuo-02",
    "prompt":"一个小女孩从小成长到大的变化",
    "image":"https://filecdn.minimax.chat/public/fe9d04da-f60e-444d-a2e0-18ae743add33.jpeg",
    "image_tail":"https://filecdn.minimax.chat/public/97b7cd08-764e-4b8b-a7bf-87a0bd898575.jpeg",
    "duration": 6,
    "resolution": "1080P"
}'
```

### 异步任务

由于视频生成通常比较耗时，建议通过极客智坊提供的通用异步方式生成视频。

[视频 API](https://docs.geekai.co/cn/api/video/generations) 中的 `async` 参数用于控制是否异步生成视频，默认为 `false`，表示创建视频接口会同步等待视频生成完毕并返回。如果设置为 `true`，则会异步生成视频并返回任务ID，你可以使用该任务ID轮询视频生成状态。

具体操作请参考[Sora-2示例](https://docs.geekai.co/cn/docs/video/openai/sora-2#异步任务)，流程完全一样。
