Happy Horse 1.1

This guide shows how to generate videos using the Happy Horse 1.1 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": "happy-horse-1.1",
    "public": false,
    "parameters": {
      "prompt": "YOUR_PROMPT",
      "guidances": {
        "start_frame": [
          {
            "image": {
              "id": "<YOUR_START_IMAGE_ID>",
              "type": "UPLOADED"
            }
          }
        ]
      },
      "duration": 5,
      "quantity": 1,
      "prompt_enhance": "OFF",
      "motion_has_audio": true,
      "width": 1920,
      "height": 1080
    }
}
'

API Request Endpoint, Headers, Parameters

Endpoint

https://cloud.leonardo.ai/api/rest/v2/generations

Headers

--header "accept: application/json" \
--header "authorization: Bearer <YOUR_API_KEY>" \
--header "content-type: application/json"

Body Parameters

ParameterTypeDefinition
durationnumberLength of the generated video in seconds. Set to any integer from 3 to 15. Defaults to 5.
guidances.image_referencearrayMaximum 9 items. References images to guide your video generation. Each item includes image.id, image.type (INIT, GENERATION, UPLOADED, GENERATED, VARIATION), a required strength (LOW, MID, HIGH; defaults to MID), and an optional order.
guidances.start_framearrayMaximum 1 item. Each item includes image.id and image.type (INIT, GENERATION, UPLOADED, GENERATED, VARIATION).
heightnumberSets the height of the output video in pixels. Defaults to 1080.
modelstringSpecifies the model used for generation. Set to happy-horse-1.1.
motion_has_audiobooleanWhether the generated video includes audio. Defaults to true.
promptstringRequired. Text description of the video content to generate. Maximum of 2500 characters.
prompt_enhancestringEnables or disables prompt enhancement. Valid values are AUTO, ON and OFF. Defaults to AUTO.
publicbooleanControls whether the generated video is public (true) or private (false).
quantitynumberRequired. The number of outputs to generate. Set to 1. Defaults to 1.
seednumberThe seed value for generation.
widthnumberSets the width of the output video in pixels. Defaults to 1920.

Dimensions

The API accepts width and height parameters in the following aspect ratio combinations:

ResolutionAspect RatioPixel Values (Width x Height)
720p16:9 (Landscape)1280x720
4:31108x832
1:1 (Square)960x960
3:4832x1108
9:16 (Portrait)720x1280
1080p16:9 (Landscape)1920x1080
4:31662x1248
1:1 (Square)1440x1440
3:41248x1662
9:16 (Portrait)1080x1920