curl --request POST \
--url https://toapis.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "MiniMax-H3",
"prompt": "宇航員站在月球邊緣眺望藍色地球,鏡頭緩慢推進",
"duration": 5,
"resolution": "2K",
"aspect_ratio": "16:9"
}'
curl --request POST \
--url https://toapis.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "MiniMax-H3",
"prompt": "保持圖片1中的人物,參考視頻1的動作與運鏡,並使用音頻1的音色完成對白",
"duration": 5,
"resolution": "2K",
"aspect_ratio": "adaptive",
"image_with_roles": [{"url": "https://example.com/person.png", "role": "reference_image"}],
"video_with_roles": [{"url": "https://example.com/motion.mp4", "role": "reference_video"}],
"audio_with_roles": [{"url": "https://example.com/voice.mp3", "role": "reference_audio"}]
}'
{
"id": "vid_01KZ3H3EXAMPLE00000000000",
"object": "generation.task",
"model": "MiniMax-H3",
"status": "queued",
"progress": 0,
"created_at": 1785729000
}
MiniMax-H3
MiniMax Hailuo H3 視頻生成
使用 MiniMax Hailuo H3 生成 2K 或 768p 視頻,支持文生視頻、首尾幀及多模態參考生成
POST
/
v1
/
videos
/
generations
curl --request POST \
--url https://toapis.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "MiniMax-H3",
"prompt": "宇航員站在月球邊緣眺望藍色地球,鏡頭緩慢推進",
"duration": 5,
"resolution": "2K",
"aspect_ratio": "16:9"
}'
curl --request POST \
--url https://toapis.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "MiniMax-H3",
"prompt": "保持圖片1中的人物,參考視頻1的動作與運鏡,並使用音頻1的音色完成對白",
"duration": 5,
"resolution": "2K",
"aspect_ratio": "adaptive",
"image_with_roles": [{"url": "https://example.com/person.png", "role": "reference_image"}],
"video_with_roles": [{"url": "https://example.com/motion.mp4", "role": "reference_video"}],
"audio_with_roles": [{"url": "https://example.com/voice.mp3", "role": "reference_audio"}]
}'
{
"id": "vid_01KZ3H3EXAMPLE00000000000",
"object": "generation.task",
"model": "MiniMax-H3",
"status": "queued",
"progress": 0,
"created_at": 1785729000
}
中國大陸用戶請注意: 中國大陸用戶請使用
https://toapis.cn 作為接口地址(Base URL)。文檔示例中的 https://toapis.com 請替換為 https://toapis.cn。- 支援
MiniMax-H3、MiniMax-H3-Max與MiniMax-H3-Max-Turbo三個模型 MiniMax-H3和MiniMax-H3-Max支援文生視頻, 首幀/尾幀圖生視頻, 以及圖片, 視頻, 音頻聯合參考生成MiniMax-H3-Max-Turbo僅支援文生視頻和首幀/尾幀圖生視頻, 不支援參考媒體- 舊版 H3 保持
2K/768p和4-15秒。Max / Max-Turbo 支持480P/768P和5-15秒 - 異步任務接口,提交後返回統一的
generation.task
MiniMax-H3-Max-Turbo 不支援 reference_image, reference_video 或 reference_audio. 傳入參考媒體會返回 MiniMax-H3-Max-Turbo does not support reference media. 如需參考視頻, 請選擇 MiniMax-H3 或 MiniMax-H3-Max.請優先傳入公網可訪問的素材 URL。首尾幀模式與多模態參考模式互斥;參考音頻不能單獨使用,必須同時提供至少一張參考圖或一段參考視頻。
認證
string
必填
所有接口均需要使用 Bearer Token 認證:
Authorization: Bearer YOUR_API_KEY。請求參數
string
預設值:"MiniMax-H3"
必填
視頻生成模型名稱, 可選
MiniMax-H3, MiniMax-H3-Max 或 MiniMax-H3-Max-Turbo. 多模態參考僅適用於 MiniMax-H3 和 MiniMax-H3-Max; Turbo 僅支援文生視頻和首幀/尾幀圖生視頻.string
必填
視頻內容描述,最多
7000 個字符。integer
預設值:5
MiniMax-H3 支援 4-15 秒; Max / Max-Turbo 支援 5-15 秒的整數值.string
預設值:"2K"
MiniMax-H3 可選 2K, 768p; Max / Max-Turbo 可選 480P, 768P.string
預設值:"16:9"
可選值:
21:9、16:9、4:3、1:1、3:4、9:16、adaptive。- 文生視頻默認
16:9,不能使用adaptive - 首幀/尾幀模式固定按輸入圖片自適應
- 多模態參考模式 (僅
MiniMax-H3和MiniMax-H3-Max) 默認adaptive, 也可指定具體比例
string[]
兼容圖片 URL 數組。1 張按首幀處理,2 張依次按首幀和尾幀處理,3-9 張按參考圖處理。新接入請優先使用
image_with_roles。3-9 張圖片會進入參考圖模式, 僅適用於 MiniMax-H3 和 MiniMax-H3-Max, Turbo 不支援.array
array
僅適用於
MiniMax-H3 和 MiniMax-H3-Max, Turbo 不支援.參考視頻數組,最多 3 段。每項包含公網 url 和固定角色 reference_video。支持 MP4、MOV;單文件不超過 50 MB,單段 2-15 秒,總時長不超過 15 秒。ToAPIs 會讀取參考視頻的實際時長用於計費,請勿提交客戶端計算的時長字段。
array
僅適用於
MiniMax-H3 和 MiniMax-H3-Max, Turbo 不支援.參考音頻數組,最多 3 段。每項包含公網 url 和固定角色 reference_audio。支持 WAV、MP3;單文件不超過 15 MB,單段 2-15 秒,總時長不超過 15 秒。參考音頻不能單獨使用,必須同時傳入至少一項
reference_image 或 reference_video。boolean
預設值:false
是否添加 AIGC 標識水印。
string
客戶側業務 ID,可用於後續查詢任務。
輸入模式與限制
| 模式 | 適用型號 | 輸入 | 寬高比 |
|---|---|---|---|
| 文生視頻 | 三個型號均支援 | prompt | 具體比例, 默認 16:9 |
| 首幀/首尾幀 | 三個型號均支援 | prompt + first_frame / last_frame | 自動 adaptive |
| 多模態參考 | 僅 MiniMax-H3 和 MiniMax-H3-Max | prompt + 參考圖片/視頻/音頻 | 默認 adaptive |
MiniMax-H3 和 MiniMax-H3-Max):
- 參考圖最多
9張,參考視頻最多3段,參考音頻最多3段 - 圖片、視頻、音頻合計最多
12個文件 - 首尾幀角色不能與任意參考角色混用
示例
參考媒體示例使用MiniMax-H3, 不能僅將 model 替換為 MiniMax-H3-Max-Turbo. 如改用 MiniMax-H3-Max, resolution 必須使用 480P 或 768P, duration 必須為 5-15 秒.
首尾幀圖生視頻
{
"model": "MiniMax-H3",
"prompt": "女孩從童年自然成長爲青年,保持人物身份一致",
"duration": 5,
"resolution": "768p",
"image_with_roles": [
{"url": "https://example.com/start.jpg", "role": "first_frame"},
{"url": "https://example.com/end.jpg", "role": "last_frame"}
]
}
視頻與音頻聯合參考
{
"model": "MiniMax-H3",
"prompt": "參考視頻1的動作與鏡頭節奏,並使用音頻1的音色完成對白",
"duration": 5,
"resolution": "2K",
"aspect_ratio": "adaptive",
"video_with_roles": [
{"url": "https://example.com/motion.mp4", "role": "reference_video"}
],
"audio_with_roles": [
{"url": "https://example.com/voice.mp3", "role": "reference_audio"}
]
}
響應
string
ToAPIs 任務 ID。
string
固定爲
generation.task。string
固定爲
MiniMax-H3。string
queued、in_progress、completed 或 failed。integer
任務進度,範圍
0-100。integer
Unix 創建時間戳(秒)。
提交後使用 獲取視頻任務狀態 輪詢;完成時視頻 URL 位於
result.data[0].url。curl --request POST \
--url https://toapis.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "MiniMax-H3",
"prompt": "宇航員站在月球邊緣眺望藍色地球,鏡頭緩慢推進",
"duration": 5,
"resolution": "2K",
"aspect_ratio": "16:9"
}'
curl --request POST \
--url https://toapis.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "MiniMax-H3",
"prompt": "保持圖片1中的人物,參考視頻1的動作與運鏡,並使用音頻1的音色完成對白",
"duration": 5,
"resolution": "2K",
"aspect_ratio": "adaptive",
"image_with_roles": [{"url": "https://example.com/person.png", "role": "reference_image"}],
"video_with_roles": [{"url": "https://example.com/motion.mp4", "role": "reference_video"}],
"audio_with_roles": [{"url": "https://example.com/voice.mp3", "role": "reference_audio"}]
}'
{
"id": "vid_01KZ3H3EXAMPLE00000000000",
"object": "generation.task",
"model": "MiniMax-H3",
"status": "queued",
"progress": 0,
"created_at": 1785729000
}