Kling 3.0 Turbo

Kling 3.0 Turbo

This guide shows how to generate videos using the Kling 3.0 Turbo 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": "kling-3.0-turbo",
    "public": false,
    "parameters": {
      "prompt": "The koala plays with the cat",
      "guidances": {
        "start_frame": [
          {
            "image": {
              "id": "<YOUR_START_IMAGE_ID>",
              "type": "UPLOADED"
            }
          }
        ]
      },
      "duration": 5,
      "motion_has_audio": true,
      "width": 1920,
      "height": 1080
    }
}
'

Recipe

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
durationintegerDuration of the video in seconds. Set to 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, or 15. Defaults to 5.
guidances.start_framearrayMaximum 1 item. Each item includes image.id and image.type (INIT, GENERATION, UPLOADED, GENERATED, or VARIATION). Use a reference image to seed the video.
heightintegerSets the height of the output video in pixels. See the Dimensions table for valid values.
modestringDeprecated. Width and height are the canonical inputs for this model; this field is retained for backwards compatibility. RESOLUTION_720 routes to the standard (720p) tier, RESOLUTION_1080 routes to the pro (1080p) tier. Defaults to RESOLUTION_1080.
modelstringSpecifies the model used for generation. Set to kling-3.0-turbo.
motion_has_audiobooleanWhether the video generation will include audio. Defaults to true.
promptstringText description of the video content to generate. Maximum of 2500 characters.
publicbooleanControls whether the generated video is public (true) or private (false).
quantityintegerThe number of outputs to generate. Minimum 1, maximum 1. Defaults to 1.
widthintegerSets the width of the output video in pixels. See the Dimensions table for valid values.

Dimensions

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

ResolutionAspect RatioPixel Values (Width x Height)
720p16:9 (Landscape)1280x720
1:1 (Square)960x960
9:16 (Portrait)720x1280
1080p16:9 (Landscape)1920x1080
1:1 (Square)1440x1440
9:16 (Portrait)1080x1920
AutoModel-selected0x0