Generate with Kling 2.5 Turbo Using Text Prompts

Example for generating a video using Kling 2.5 Turbo model from text

Follow this recipe to generate video using text:

The guide will recreate the following functionality in the Web UI via API.

Kling 2.5 Turbo Video Sample Request

curl --request POST \
     --url https://cloud.leonardo.ai/api/rest/v1/generations-text-to-video \
     --header 'accept: application/json' \
     --header 'authorization: Bearer <YOUR_API_KEY>' \
     --header 'content-type: application/json' \
     --data '
{

    "prompt":"A dreamlike sea of flowers reminiscent of a movie scene, with a gentle breeze caressing the golden hour light and shadow. The most beautiful place in the world, captured in stunningly dynamic cinematography.",
    "duration": 5,
    "model": "KLING2_5",
    "height": 1080,
    "width": 1920,
    "resolution": "RESOLUTION_1080",
    "isPublic": false
}
'

# Wait for a few seconds for video to be generated.

curl --request GET \
     --url https://cloud.leonardo.ai/api/rest/v1/generations/<YOUR_GENERATION_ID> \
     --header 'accept: application/json' \
     --header 'authorization: Bearer <YOUR_API_KEY>'

πŸ“˜

Duration

Duration can be 5 or 10. The units is seconds.

πŸ“˜

Resolution

Kling 2.5 Turbo generates at an aspect ratio of 16:9 at dimensions 1920x1080.

Kling 2.5 Turbo generates at an aspect ratio of 9:16 at dimensions 1080x1920.

Kling 2.5 Turbo generates at an aspect ratio of 1:1 at dimensions 1440x1440

height and width dimensions specified outside of this will not be accepted.

πŸ“˜

Switch to Motion 2

To use Motion 2.0, remove the model parameter or set it to MOTION2.

Parameters such as frameinterpolation is not compatible with Kling 2.5 Turbo.

Cost

Kling 2.5 Turbo 5s video costs 320 API Credits

Kling 2.5 Turbo 10s video costs 640 API Credits