Video
MiniMax Video Generation
Generate videos from text or images using MiniMax's Hailuo models. Supports text-to-video, image-to-video, and subject-driven generation.
Supported Models
| Model | Provider |
|---|---|
T2V-01 | MiniMax |
I2V-01 | MiniMax |
S2V-01 | MiniMax |
MiniMax-Hailuo-2.3 | MiniMax |
MiniMax-Hailuo-2.3-Fast | MiniMax |
MiniMax-Hailuo-02 | MiniMax |
Model Constraints
Text-to-Video
/v1/videos/minimax/generationsBody Parameters
modelstringrequiredModel ID (T2V-01, S2V-01, MiniMax-Hailuo-2.3, MiniMax-Hailuo-2.3-Fast, or MiniMax-Hailuo-02)
promptstringrequiredText description of the desired video (max 2000 chars)
first_frame_imagestringURL or base64 of the first frame image (for I2V models)
durationintegerVideo duration in seconds (Hailuo models only)
Options: 6, 10
resolutionstringOutput resolution (Hailuo models only)
Options: 512P, 720P, 768P, 1080P
prompt_optimizerbooleanAuto-optimize the prompt before generation (Hailuo only)
Default: true
fast_pretreatmentbooleanEnable fast pretreatment mode (Hailuo-2.3/02 only)
curl -X POST https://api.metriqual.com/v1/videos/minimax/generations \
-H "Authorization: Bearer mql_your_key" \
-H "Content-Type: application/json" \
-d '{
"model": "MiniMax-Hailuo-2.3",
"prompt": "Ocean waves crashing on a sandy beach at sunset",
"duration": 6,
"resolution": "1080P"
}'const video = await mql.video.create({
model: 'MiniMax-Hailuo-2.3',
prompt: 'Ocean waves crashing on a sandy beach at sunset',
duration: 6,
resolution: '1080P'
});
console.log(video.task_id);video = mql.video.create(
model="MiniMax-Hailuo-2.3",
prompt="Ocean waves crashing on a sandy beach at sunset",
duration=6,
resolution="1080P",
)
print(video["task_id"])
# Or wait for completion automatically
result = mql.video.query_and_wait(video["task_id"])
download = mql.video.download_video(result["file_id"])Image-to-Video
Convert a static image into a dynamic video. Provide the image URL as first_frame_image along with a motion prompt.
curl -X POST https://api.metriqual.com/v1/videos/minimax/generations \
-H "Authorization: Bearer mql_your_key" \
-H "Content-Type: application/json" \
-d '{
"model": "I2V-01",
"prompt": "The camera slowly pans right",
"first_frame_image": "https://example.com/photo.jpg"
}'const video = await mql.video.createFromImage({
model: 'I2V-01',
prompt: 'The camera slowly pans right',
first_frame_image: 'https://example.com/photo.jpg'
});video = mql.video.create(
model="I2V-01",
prompt="The camera slowly pans right",
first_frame_image="https://example.com/photo.jpg",
)Query Status & Download
/v1/videos/query/:task_id/v1/videos/download/:file_idMiniMax video generation is asynchronous. After submitting a request, poll the query endpoint with the returned task_id to check progress. Once complete, download using the file_id.
// Poll until complete
const status = await mql.video.queryVideoStatus(video.task_id);
if (status.status === 'Success') {
const result = await mql.video.downloadVideo(status.file_id);
console.log('Download URL:', result.download_url);
}# Poll until complete
status = mql.video.query_video_status(video["task_id"])
if status["status"] == "Success":
result = mql.video.download_video(status["file_id"])
# Or poll + wait in one call
result = mql.video.query_and_wait(video["task_id"])
download = mql.video.query_and_download(video["task_id"])Response
{
"task_id": "task_video_abc123",
"base_resp": {
"status_code": 0,
"status_msg": "success"
}
}