Skip to navigation

Hailuo Video Models

View as Markdown

Use POST /videos to create a Hailuo video generation task. The examples include optional route and route_mode fields; remove them to use the default available route.

Text-to-video example:

curl -s https://api.getopenmodels.com/v1/videos \
-H "Authorization: Bearer $OM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "MiniMax/MiniMax-Hailuo-2.3",
"route": { "provider": "<provider-for-this-model>" },
"route_mode": "balanced",
"prompt": "Generate a video of a carp leaping over the Dragon Gate.",
"prompt_optimizer": true,
"fast_pretreatment": false,
"duration": 6,
"resolution": "1080P",
"aigc_watermark": false
}'

Image-to-video example:

curl -s https://api.getopenmodels.com/v1/videos \
-H "Authorization: Bearer $OM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "MiniMax/MiniMax-Hailuo-2.3",
"route": { "provider": "<provider-for-this-model>" },
"route_mode": "balanced",
"first_frame_image": "https://cdn.hailuoai.com/prod/2024-09-18-16/user/multi_chat_file/9c0b5c14-ee88-4a5b-b503-4f626f018639.jpeg",
"prompt": "Generate a video of a carp leaping over the Dragon Gate.",
"prompt_optimizer": true,
"fast_pretreatment": false,
"duration": 6,
"resolution": "1080P",
"aigc_watermark": false
}'

Use the returned ID to retrieve the task status and generated video result.

curl "https://api.getopenmodels.com/v1/videos/{id}" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OM_API_KEY"

For the MiniMax Hailuo model, set generation options in the request body.

FieldTypeNotes
modelstringModel name. Use MiniMax/MiniMax-Hailuo-2.3.
first_frame_imagestringRequired for image-to-video. Use a public image URL or a base64 Data URL such as data:image/jpeg;base64,.... Supported formats: JPG, JPEG, PNG, WebP. File size must be under 20 MB, the short side must be over 300 px, and the aspect ratio must be between 2:5 and 5:2.
promptstringText description of the video. Required for text-to-video. Maximum length: 2000 characters. Supports camera-control instructions in square brackets.
prompt_optimizerbooleanWhether to optimize the prompt automatically. Default: true. Set false for more direct prompt control.
fast_pretreatmentbooleanWhether to reduce prompt optimizer preprocessing time. Default: false.
durationintegerVideo duration in seconds. Default: 6. 768P supports 6 or 10; 1080P supports 6.
resolutionstringVideo resolution. A 6-second video supports 768P or 1080P; a 10-second video supports 768P. Default: 768P.
callback_urlstringOptional URL for task status callbacks. If omitted, poll GET https://api.getopenmodels.com/v1/videos/{id}.
aigc_watermarkbooleanWhether to add an AI-generated-content watermark. Default: false.