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/generations

Headers

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.

ParameterTypeDefinition
durationnumberLength of the generated video in seconds. Set to 6 or 10 seconds
heightnumberOutput height
modestringRESOLUTION_768 or RESOLUTION_1080
modelstringhailuo-2_3 or hailuo-2_3-fast
promptstringText description of the video content to generate.
prompt_enhancestringOptional. Controls whether prompt enhancement is applied. Set to ON or OFF when using hailuo-2_3 model
publicbooleanControls whether the generated video is public (true) or private (false)
start_frame.idstringOptional when using hailuo-2_3. Required when using hailuo-2_3-fast.
start_frame.typestringOptional. Set toUPLOADED or GENERATED.
style_idsarrayOptional. List of style IDs to apply to the video.
widthnumberOutput width

Duration and Resolution

Duration and resolution are interdependent. Certain combinations are restricted based on model capabilities.

ResolutionAllowed Durations
768p6s, 10s
1080p6s 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 Ratio768p Resolution1080p Resolution
16:91376 ร— 7681920 ร— 1080
9:16768 ร— 13761080 ร— 1920
1:1768 ร— 7681080 ร— 1080
AUTO0 ร— 00 ร— 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 OptionStyle ID
Clay964d8a8f-865b-48c5-b79e-e75ae8727648
Color Sketch9cdfea2a-b4ab-4e97-a558-ec9fcb78f30a
Logo12b0d8c9-5cf8-4094-a3e5-6809bc269e21
Papercraftc4ac9781-8624-4b7d-bbed-dedaaf7b9da6
Pro Photo28a53b2e-eb80-41d7-8360-208068fecf49
Sci-Fid28c8f2b-22bb-4c0c-893d-d3835e28f2f7
Sketch6078b232-d1be-4a01-9c10-95c05132a8e4
Stock Footaged760b628-4a1d-41cb-bccb-053a13973b94

Lighting

Lighting OptionStyle ID
Backlightc39fe4f8-76d6-4aad-899b-e7ca5a4148f3
Candle Lit7d36972e-b9d5-46c7-813d-2c9934f9321b
Chiaroscuroff9bfd01-a7ac-4556-889a-25dd5fc0956f
Film Hazebe32c760-2bb3-49ae-83dc-6f9b2d62a97f
Foggy1d6e92d2-6e83-4ea2-bd4c-34ddfedfa163
Golden Hour3f705252-1197-4f59-b6ed-21625dce6a65
Hardlight64b84d56-8b76-4367-95a6-df345a909af0
Lens Flare4b60b356-a4ab-4983-9e9a-30e0d5b27bc6
Light Art771bc1bd-0f88-4ff9-af63-f646847ed075
Low Key1974bd47-75bb-499a-9c7a-354913904fcf
Luminous994e33e6-4862-495d-9efb-d9a09ecdd769
Mysticalacb9deb3-31e3-495e-ab31-b138fde26bd6
Rainyfa347beb-6d70-482d-94a8-a70736e9e7f1
Soft Light746e70e5-ab4d-4f39-9057-75698cb64bc2
Volumetric92c2d8d4-9757-4cbf-88f3-d7ea54c425af

Color Theme

Color Theme OptionStyle ID
Autumn21b0a3e9-304a-4ff2-9603-15ddbc5a6b82
Complimentarydcfb60ca-f165-407f-b01c-2b34d22432c2
Cool913efd9b-1da8-4876-91d3-b6de0aa5582c
Dark9581d460-7023-4d85-b440-9fea8bbfe194
Earthy9517dd8e-9588-4fe5-aede-6711438dd420
Electricd26aded5-e191-45d5-9662-db36b7085a76
Iridescent2380bd07-caf1-4ae6-a348-3bcf4b12f90a
Pastel6c27f994-2e03-4d07-95b8-4a5db5bd3a27
Split1bffb3f3-4110-4185-85f9-f7254ae6f81d
Terracotta Teal46af026e-d21a-4cf4-a0c0-b482e6800331
Ultraviolet9243b709-ed08-49d9-9198-440f2127d3b5
Vibrantf84bbf31-1d72-415d-ae4c-deb4b18fccba
Warmd838fb14-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
  }
}'