MiniMax-H3 影片生成 API
透過 APIMaster 建立非同步 MiniMax-H3 影片任務、查詢狀態並下載 MP4。
MiniMax-H3 影片生成
透過 APIMaster 的 OpenAI 相容影片 API 使用 MiniMax-H3。生成工作採非同步處理。
Base URL:
https://apimaster.ai/v1是https://apimaster.ai/v1。使用POST https://apimaster.ai/v1/video/generations建立任務。
介面相容與參數驗證
POST https://apimaster.ai/v1/video/generations 和 POST https://apimaster.ai/v1/videos/generations 均可使用;同一模型的參數與計費規則一致,建立回應沿用各入口原有格式。現有客戶端無需修改路徑。
MiniMax-H3 保留本頁單數入口範例,size 與 resolution 等價,ratio 與 aspect_ratio 等價。不支援的規格或互相衝突的別名回傳 HTTP 400,不會默默切換至更高解析度。建議明確填寫解析度、比例和時長。
建立影片任務
| 欄位 | 類型 | 必填 | 說明 |
|---|---|---|---|
model |
string | 是 | MiniMax-H3 |
prompt |
string | 依格式 | 影片內容描述 |
duration |
integer | 否 | 4–15 秒,預設 4 |
size |
string | 否 | 768P 或 2K,預設 768P |
ratio |
string | 否 | 畫面比例,預設 16:9 |
curl -s "https://apimaster.ai/v1/video/generations" \
-H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"model":"MiniMax-H3","prompt":"A calm ocean at sunrise, cinematic wide shot","duration":4,"size":"768P","ratio":"16:9"}'
回應會立即回傳 queued 狀態的 id 與 task_id。
查詢任務狀態
GET https://apimaster.ai/v1/videos/{task_id} 會回傳 queued、in_progress、completed 或 failed。
curl -s "https://apimaster.ai/v1/videos/task_xxxxxxxx" -H "Authorization: Bearer YOUR_API_KEY"
提交後等待 10–20 秒,再每 3–5 秒輪詢一次。
下載影片
curl -L "https://apimaster.ai/v1/videos/task_xxxxxxxx/content" \
-H "Authorization: Bearer YOUR_API_KEY" -o output.mp4
狀態為 completed 後下載 MP4。duration 支援 4–15 秒,size 支援 768P 與 2K。
參考圖生成影片(r2v)
向上述 APIMaster 入口提交官方 V2 的 content 陣列。陣列必須包含非空 text 項;提供 content 後不需頂層 prompt。reference_image 用於參考主體或風格,不鎖定首幀。舊格式 images 的前兩張圖分別對應首幀、尾幀,請勿與參考素材角色混用。
{
"model": "MiniMax-H3",
"content": [
{"type": "text", "text": "Use the character in Image 1 as the subject, walking through a garden."},
{"type": "image_url", "image_url": {"url": "https://YOUR_PUBLIC_IMAGE_URL/reference.jpg"}, "role": "reference_image"}
],
"resolution": "768P",
"duration": 4,
"ratio": "16:9"
}
