Generate with Kling 2.1 Pro Using Start and End Frame
Example for generating a video with uploaded images as a start frame with Kling 2.1 Pro
The guide will recreate the following functionality in the Web UI via API.

Kling 2.1 Pro Using Start and End Frame Sample Request
curl --request POST \
--url https://cloud.leonardo.ai/api/rest/v1/generations-image-to-video\
--header 'accept: application/json' \
--header 'authorization: Bearer `<YOUR_API_KEY>`' \
--header 'content-type: application/json' \
--data'
{
"prompt":"woman walks forward, camera follows her, timelapse with clouds and sky moving very quickly to signify transformation from night to sunsrise, her hair flies violently around her as if a burst of wind is blown at her face very quickly before it calms down again when daytime hits",
"imageId" : <YOUR_IMAGE_ID>,
"imageType": "GENERATED",
"endFrameImage":{
"id" : <YOUR_IMAGE_ID>,
"type": "GENERATED"
},
"resolution": "RESOLUTION_1080",
"duration":10,
"height":1080,
"width":1920,
"model": "KLING2_1"
}
'
Start Frame RequiredKling 2.1 Pro must have a start frame in the request.
DurationDuration can be 5 or 10. The units is seconds.
ResolutionKling 2.1 Pro generates at an aspect ratio of 16:9 at dimensions 1920x1080.
Kling 2.1 Pro generates at an aspect ratio of 9:16 at dimensions 1080x1920.
Kling 2.1 Pro Turbo generates at an aspect ratio of 1:1 at dimensions 1440x1440
height
andwidth
dimensions specified outside of this will not be accepted.
Cost
Kling 2.1 Pro 5s video costs 410 API Credits
Kling 2.1 Pro 10s video costs 820 API Credits
Updated 4 days ago