Hailuo 2.3
This guide shows how to generate videos using Hailuo 2.3 models via the Leonardo.AI REST API.
Generate videos using the Hailuo 2.3 models via the Leonardo.AI REST API.
Sample Request
The following examples demonstrate how to generate videos using Hailuo 2.3 via the V2 generations endpoint.
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-2_3",
"public": false,
"parameters": {
"prompt": "A cinematic shot of rain falling on a quiet city street at night",
"mode": "RESOLUTION_1080",
"duration": 6,
"width": 1920,
"height": 1080
}
}
'Recipe
API Request Endpoint, Headers, Parameters
This section defines the required endpoint, headers, and request structure used for all Hailuo 2.3 video generation requests.
Endpoint
All video generation requests are sent to the following endpoint.
https://cloud.leonardo.ai/api/rest/v2/generationsHeaders
Include the following headers in all requests to authenticate and define the request format.
--header "accept: application/json" \
--header "authorization: Bearer <YOUR_API_KEY>" \
--header "content-type: application/json"Body Parameters
The request body defines the configuration of your video generation, including model selection, prompt, duration, resolution, and optional parameters.
| Parameter | Type | Definition |
|---|---|---|
| duration | number | Length of the generated video in seconds. Set to 6 or 10 seconds |
| height | number | Output height |
| mode | string | RESOLUTION_768 or RESOLUTION_1080 |
| model | string | hailuo-2_3 or hailuo-2_3-fast |
| prompt | string | Text description of the video content to generate. |
| prompt_enhance | string | Optional. Controls whether prompt enhancement is applied. Set to ON or OFF when using hailuo-2_3 model |
| public | boolean | Controls whether the generated video is public (true) or private (false) |
| start_frame.id | string | Optional when using hailuo-2_3. Required when using hailuo-2_3-fast. |
| start_frame.type | string | Optional. Set toUPLOADED or GENERATED. |
| style_ids | array | Optional. List of style IDs to apply to the video. |
| width | number | Output width |
Duration and Resolution
Duration and resolution are interdependent. Certain combinations are restricted based on model capabilities.
| Resolution | Allowed Durations |
|---|---|
| 768p | 6s, 10s |
| 1080p | 6s only |
Aspect Ratio and Dimension
Aspect ratio behavior depends on whether you are using text-to-video or image-to-video.
Text-to-Video
Text-to-video outputs are fixed to a 16:9 aspect ratio.
Example: 1920 ร 1080
Image-to-Video
The output video follows the aspect ratio of the input image used as the start frame.
No separate aspect ratio parameter is required
Dimension Reference
The following are commonly used width and height combinations based on supported aspect ratios.
| Aspect Ratio | 768p Resolution | 1080p Resolution |
|---|---|---|
| 16:9 | 1376 ร 768 | 1920 ร 1080 |
| 9:16 | 768 ร 1376 | 1080 ร 1920 |
| 1:1 | 768 ร 768 | 1080 ร 1080 |
| AUTO | 0 ร 0 | 0 ร 0 |
Note: AUTO uses the dimensions of the input image (start_frame)
Styles
Use style_ids to apply predefined visual styles to your generated video.
Vibe
| Vibe Option | Style ID |
|---|---|
| Clay | 964d8a8f-865b-48c5-b79e-e75ae8727648 |
| Color Sketch | 9cdfea2a-b4ab-4e97-a558-ec9fcb78f30a |
| Logo | 12b0d8c9-5cf8-4094-a3e5-6809bc269e21 |
| Papercraft | c4ac9781-8624-4b7d-bbed-dedaaf7b9da6 |
| Pro Photo | 28a53b2e-eb80-41d7-8360-208068fecf49 |
| Sci-Fi | d28c8f2b-22bb-4c0c-893d-d3835e28f2f7 |
| Sketch | 6078b232-d1be-4a01-9c10-95c05132a8e4 |
| Stock Footage | d760b628-4a1d-41cb-bccb-053a13973b94 |
Lighting
| Lighting Option | Style ID |
|---|---|
| Backlight | c39fe4f8-76d6-4aad-899b-e7ca5a4148f3 |
| Candle Lit | 7d36972e-b9d5-46c7-813d-2c9934f9321b |
| Chiaroscuro | ff9bfd01-a7ac-4556-889a-25dd5fc0956f |
| Film Haze | be32c760-2bb3-49ae-83dc-6f9b2d62a97f |
| Foggy | 1d6e92d2-6e83-4ea2-bd4c-34ddfedfa163 |
| Golden Hour | 3f705252-1197-4f59-b6ed-21625dce6a65 |
| Hardlight | 64b84d56-8b76-4367-95a6-df345a909af0 |
| Lens Flare | 4b60b356-a4ab-4983-9e9a-30e0d5b27bc6 |
| Light Art | 771bc1bd-0f88-4ff9-af63-f646847ed075 |
| Low Key | 1974bd47-75bb-499a-9c7a-354913904fcf |
| Luminous | 994e33e6-4862-495d-9efb-d9a09ecdd769 |
| Mystical | acb9deb3-31e3-495e-ab31-b138fde26bd6 |
| Rainy | fa347beb-6d70-482d-94a8-a70736e9e7f1 |
| Soft Light | 746e70e5-ab4d-4f39-9057-75698cb64bc2 |
| Volumetric | 92c2d8d4-9757-4cbf-88f3-d7ea54c425af |
Color Theme
| Color Theme Option | Style ID |
|---|---|
| Autumn | 21b0a3e9-304a-4ff2-9603-15ddbc5a6b82 |
| Complimentary | dcfb60ca-f165-407f-b01c-2b34d22432c2 |
| Cool | 913efd9b-1da8-4876-91d3-b6de0aa5582c |
| Dark | 9581d460-7023-4d85-b440-9fea8bbfe194 |
| Earthy | 9517dd8e-9588-4fe5-aede-6711438dd420 |
| Electric | d26aded5-e191-45d5-9662-db36b7085a76 |
| Iridescent | 2380bd07-caf1-4ae6-a348-3bcf4b12f90a |
| Pastel | 6c27f994-2e03-4d07-95b8-4a5db5bd3a27 |
| Split | 1bffb3f3-4110-4185-85f9-f7254ae6f81d |
| Terracotta Teal | 46af026e-d21a-4cf4-a0c0-b482e6800331 |
| Ultraviolet | 9243b709-ed08-49d9-9198-440f2127d3b5 |
| Vibrant | f84bbf31-1d72-415d-ae4c-deb4b18fccba |
| Warm | d838fb14-9719-44f3-877e-da70d072b79c |
Sample Request Using Style
You can combine styles by passing multiple style_ids, typically selecting one per category (Vibe, Lighting, Color Theme).
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-2_3",
"public": false,
"parameters": {
"prompt": "A cat",
"mode": "RESOLUTION_768",
"duration": 6,
"style_ids": [
"28a53b2e-eb80-41d7-8360-208068fecf49",
"3f705252-1197-4f59-b6ed-21625dce6a65",
"f84bbf31-1d72-415d-ae4c-deb4b18fccba"
],
"width": 1376,
"height": 768
}
}'Updated about 3 hours ago
