MiniMax Hailuo 03
This guide shows how to generate videos using the MiniMax Hailuo 03 model via the Leonardo.AI REST API.
Sample Request
curl --request POST \
--url https://cloud.leonardo.ai/api/rest/v2/generations \
--header 'accept: application/json' \
--header 'authorization: Bearer <YOUR_API_KEY>' \
--header 'content-type: application/json' \
--data '
{
"model": "hailuo-03",
"public": false,
"parameters": {
"prompt": "A koala and a cat playing together in a sunlit meadow",
"quantity": 1,
"width": 2560,
"height": 1440,
"duration": 5,
"motion_has_audio": true
}
}
'API Request Endpoint, Headers, Parameters
Endpoint
https://cloud.leonardo.ai/api/rest/v2/generationsHeaders
--header "accept: application/json" \
--header "authorization: Bearer <YOUR_API_KEY>" \
--header "content-type: application/json"Body Parameters
| Parameter | Type | Definition |
|---|---|---|
| duration | integer | Optional. Duration of the video in seconds. Accepts 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15. Defaults to 5. |
| guidances | object | Optional. Object defining guidance inputs (e.g. reference images, start/end frames, audio) that influence the result. |
| guidances.audio_reference | array | Optional. Specifies a list of audio references for guidance. Maximum 3 items. Each item includes audio.id and audio.type (UPLOADED, GENERATED). |
| guidances.end_frame | array | Optional. Creative reinterpretation of vibe or structure from a reference image. Maximum 1 item. Each item includes image.id and image.type (INIT, GENERATION, UPLOADED, GENERATED, VARIATION). |
| guidances.image_reference | array | Optional. References images to guide your video generation. Maximum 5 items. Each item includes image.id and image.type (INIT, GENERATION, UPLOADED, GENERATED, VARIATION), strength (LOW, MID, HIGH). |
| guidances.start_frame | array | Optional. Creative reinterpretation of vibe or structure from a reference image. Maximum 1 item. Each item includes image.id and image.type (INIT, GENERATION, UPLOADED, GENERATED, VARIATION). |
| height | integer | Optional. Height of the output in pixels. Accepts 1440, 1920, 2560, 0. Defaults to 1440. |
| model | string | Required. Specifies the model used for generation. Set to hailuo-03. |
| motion_has_audio | boolean | Optional. MiniMax Hailuo 03 always generates native audio; this cannot be disabled. Defaults to True. |
| prompt | string | Required. The prompt to use for the generation. Maximum 2000 characters. |
| public | boolean | Optional. Controls whether the generation is public (true) or private (false). |
| quantity | integer | Required. The number of outputs to generate. Defaults to 1. Range 1-1. |
| width | integer | Optional. Width of the output in pixels. Accepts 1440, 1920, 2560, 3360, 0. Defaults to 2560. |
Dimensions
The API accepts width and height parameters in the following combinations:
| Aspect Ratio | Pixel Values (Width x Height) |
|---|---|
| 21:9 (Landscape) | 3360 x 1440 |
| 16:9 (Landscape) | 2560 x 1440 |
| 4:3 (Landscape) | 1920 x 1440 |
| 1:1 (Square) | 1440 x 1440 |
| 3:4 (Portrait) | 1440 x 1920 |
| 9:16 (Portrait) | 1440 x 2560 |
| Auto | 0 x 0 |
Defaults to 2560 x 1440. Setting both width and height to 0 selects Auto, which matches the dimensions of a supplied reference image.
Updated about 12 hours ago
Did this page help you?
