Skip to content

MiniMax H3 Video (workflow_id)

MiniMax H3 uses the OpenAI-compatible asynchronous video API: submit a task → poll its status → download the video. Each request selects a workflow with workflow_id; the workflow decides which reference media are allowed and which sizes are supported.

POST https://api.4allapi.com/v1/videos
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json (multipart/form-data when uploading local files)

Use the model name minimax-h3 (as shown in the console model marketplace). MiniMax H3 supports the OpenAI protocol only, not Gemini predictLongRunning.

workflow_idReference mediaSize
text-to-videoNo reference media; text onlyUp to 1080P
fl2v1–2 images; with two, they are the first and last frame in order; no video or audioUp to 1080P
multi-referenceOptional; up to 9 images, up to 3 videos and 3 audiosUp to 1080P
cf-fl2vSame as fl2vMust be 2K or 4K
cf-multi-referenceSame as multi-referenceMust be 2K or 4K

Quick choice: text only → text-to-video; 1–2 images as first (and last) frame → fl2v; several images, reference videos or music → multi-reference. For 2K/4K output use the matching cf- workflow.

Requests that break the workflow rules (e.g. images with text-to-video, no image for fl2v, too many items, a cf- workflow below 2K) are rejected with 400 before submission and are not charged.

ParameterTypeRequiredDescription
modelstringyesminimax-h3
promptstringyesVideo description
workflow_idstringyesSee the table above
secondsintegerno4–15 seconds, default 10
resolutionstringno480p, 768p, 1080p; 2k, 4k only with cf- workflows
aspect_ratiostringno16:9 (default), 9:16, 1:1, 2:3, 3:2, 3:4, 4:3, 21:9
imagesstring[]per workflowPublic image URLs; in fl2v the 1st is the first frame and the 2nd the last frame
reference_videosstring[]noPublic video URLs, up to 3 (multi-reference only)
reference_audiosstring[]noPublic audio URLs, up to 3 (multi-reference only)
prompt_enhancebooleannoPrompt enhancement, on by default

resolution and aspect_ratio are mapped to the upstream’s standard canvas sizes, e.g. 768P 16:9 = 1376x768, 1080P 16:9 = 1920x1088, 1080P 9:16 = 1088x1920. 2K/4K are submitted as 2K/4K plus the aspect ratio.

Media limits: images JPG/PNG/WEBP/HEIC/HEIF, ≤ 30 MB each; videos MP4/MOV, ≤ 50 MB and 2–15 s each; audio WAV/MP3, ≤ 15 MB and 2–15 s each; total video and total audio length ≤ 15 s each. JSON requests must use public http(s) URLs (no Base64 / data URLs); upload local files with multipart.

Terminal window
curl https://api.4allapi.com/v1/videos \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "minimax-h3",
"prompt": "一位身穿红色连衣裙的舞者在明亮舞台上自然起舞,镜头平稳推进,电影级光影",
"workflow_id": "text-to-video",
"seconds": 10,
"resolution": "1080p",
"aspect_ratio": "16:9"
}'
Terminal window
curl https://api.4allapi.com/v1/videos \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "minimax-h3",
"prompt": "从首帧平滑过渡到尾帧,镜头运动自然稳定",
"workflow_id": "fl2v",
"seconds": 10,
"resolution": "768p",
"aspect_ratio": "9:16",
"images": [
"https://cdn.example.com/first-frame.png",
"https://cdn.example.com/last-frame.png"
]
}'

With a single image, it is used as the first frame.

Terminal window
curl https://api.4allapi.com/v1/videos \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "minimax-h3",
"prompt": "将参考人物、动作和音乐融合成一段自然舞蹈视频",
"workflow_id": "multi-reference",
"seconds": 8,
"resolution": "1080p",
"aspect_ratio": "16:9",
"images": ["https://cdn.example.com/person.png", "https://cdn.example.com/outfit.png"],
"reference_videos": ["https://cdn.example.com/dance.mp4"],
"reference_audios": ["https://cdn.example.com/music.mp3"]
}'
Terminal window
curl https://api.4allapi.com/v1/videos \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "minimax-h3",
"prompt": "从首帧平滑过渡到尾帧,镜头运动自然稳定",
"workflow_id": "cf-fl2v",
"seconds": 10,
"resolution": "4k",
"aspect_ratio": "16:9",
"images": ["https://cdn.example.com/first-frame.png", "https://cdn.example.com/last-frame.png"]
}'

Repeat image[] for images, video[] for videos and audio[] for audio; other parameters are plain form fields. Files are stored on our media host before being sent upstream.

Terminal window
curl https://api.4allapi.com/v1/videos \
-H "Authorization: Bearer $API_KEY" \
-F "model=minimax-h3" \
-F "prompt=从首帧平滑过渡到尾帧" \
-F "workflow_id=fl2v" \
-F "seconds=10" \
-F "resolution=768p" \
-F "aspect_ratio=16:9" \
-F "image[]=@first.png;type=image/png" \
-F "image[]=@last.png;type=image/png"
import time
import requests
BASE_URL = "https://api.4allapi.com"
HEADERS = {"Authorization": "Bearer YOUR_API_KEY"}
body = {
"model": "minimax-h3",
"prompt": "从首帧平滑过渡到尾帧,镜头运动自然稳定",
"workflow_id": "fl2v",
"seconds": 10,
"resolution": "1080p",
"aspect_ratio": "16:9",
"images": [
"https://cdn.example.com/first-frame.png",
"https://cdn.example.com/last-frame.png",
],
}
task = requests.post(f"{BASE_URL}/v1/videos", headers=HEADERS, json=body).json()
task_id = task["id"]
while task.get("status") not in ("completed", "failed"):
time.sleep(5)
task = requests.get(f"{BASE_URL}/v1/videos/{task_id}", headers=HEADERS).json()
print(task.get("status"), task.get("progress"))
if task["status"] == "completed":
video = requests.get(f"{BASE_URL}/v1/videos/{task_id}/content", headers=HEADERS)
video.raise_for_status()
open("output.mp4", "wb").write(video.content)
Terminal window
# Status: queued / in_progress / completed / failed
curl https://api.4allapi.com/v1/videos/<TASK_ID> -H "Authorization: Bearer $API_KEY"
# Download the video (same API key)
curl -L https://api.4allapi.com/v1/videos/<TASK_ID>/content \
-H "Authorization: Bearer $API_KEY" -o output.mp4
MessageCause
workflow text-to-video is text-to-video only and accepts no reference mediaReference media sent with text-to-video
workflow fl2v needs 1-2 images; got 0fl2v / cf-fl2v without images or with more than 2
workflow cf-fl2v requires size 2K or 4Kcf- workflow with a resolution other than 2k/4k
2K/4K requires a cf- workflow2k/4k with a non-cf- workflow
seconds must be between 4 and 15Duration outside 4–15 seconds
unsupported video aspect ratioAspect ratio not in the supported list
workflow xxx is not configured for minimax-h3That workflow is not enabled for your group