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

# MiniMax H3

> 透過 MixRoute 呼叫 MiniMax H3 多模態影片生成模型，包含文字生成影片與非同步任務範例。

<link rel="alternate" hrefLang="en" href="https://mixroute.ai/docs/model-api/minimax/minimax-h3" />

<link rel="alternate" hrefLang="zh-Hans" href="https://mixroute.ai/docs/zh-hans/model-api/minimax/minimax-h3" />

<link rel="alternate" hrefLang="zh-Hant" href="https://mixroute.ai/docs/zh-hant/model-api/minimax/minimax-h3" />

<link rel="alternate" hrefLang="ja" href="https://mixroute.ai/docs/ja/model-api/minimax/minimax-h3" />

<link rel="alternate" hrefLang="x-default" href="https://mixroute.ai/docs/model-api/minimax/minimax-h3" />

MiniMax H3 是 MixRoute 目前提供的 MiniMax 通用多模態影片生成模型。

請在影片生成端點中使用完整模型 ID `MiniMax-H3`。

<Tip>
  完整欄位參見 [MiniMax H3 API](/docs/zh-hant/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 呼叫 [查詢影片任務](/docs/zh-hant/api-reference/endpoint/query-video-task)。閘道器返回體不一定與廠商原生響應封裝相同。


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