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

# MiniMax H3

> 通过 MixRoute 调用 MiniMax H3 多模态视频生成模型，包含文生视频与异步任务示例。

MiniMax H3 是 MixRoute 当前提供的 MiniMax 通用多模态视频生成模型。

请在视频生成端点中使用完整模型 ID `MiniMax-H3`。

<Tip>
  完整字段参见 [MiniMax H3 API](/zh-hans/api-reference/endpoint/minimax-h3)。在 MixRoute 中，H3 控制项使用 `metadata.content`、`metadata.resolution`、`metadata.duration` 和 `metadata.ratio`。
</Tip>

<Info>
  顶层保留 `model`、`prompt`。H3 输入内容与输出设置放入 `metadata`，包括 `content`、`resolution`、`duration` 和 `ratio`；提示词与内容中的文本保持一致。
</Info>

## 调用示例

将 `MIXROUTE_API_KEY` 设置为你的 MixRoute Key；将参考素材 URL 或 Base64 占位值替换为可访问的素材。请求被接受后会创建计费生成任务。

<Tabs>
  <Tab title="文生视频">
    ```bash theme={null}
    curl --location "https://api.mixroute.ai/v1/video/generations" \
      --header "Authorization: Bearer $MIXROUTE_API_KEY" \
      --header "Content-Type: application/json" \
      --data '{
      "model": "MiniMax-H3",
      "prompt": "A professor is teaching a class in a classroom.",
      "metadata": {
        "content": [
          {
            "type": "text",
            "text": "A professor is teaching a class in a classroom."
          }
        ],
        "resolution": "768P",
        "duration": 4,
        "ratio": "9:16"
      }
    }'
    ```
  </Tab>
</Tabs>

### Python

```python theme={null}
import json
import os
import requests

payload = json.loads(r'''
{
  "model": "MiniMax-H3",
  "prompt": "A professor is teaching a class in a classroom.",
  "metadata": {
    "content": [
      {
        "type": "text",
        "text": "A professor is teaching a class in a classroom."
      }
    ],
    "resolution": "768P",
    "duration": 4,
    "ratio": "9:16"
  }
}
''')
response = requests.post(
    "https://api.mixroute.ai/v1/video/generations",
    headers={"Authorization": "Bearer " + os.environ["MIXROUTE_API_KEY"]},
    json=payload,
    timeout=60,
)
response.raise_for_status()
print(response.json())
```

## 任务结果

使用返回的 MixRoute 任务 ID 调用 [查询视频任务](/zh-hans/api-reference/endpoint/query-video-task)。网关返回体不一定与厂商原生响应封装相同。


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