Light Mode
Kling Elements Video Generation API
Overview
Kling Image-to-Video generation now supports elements parameter. You can provide 1-4 elements, where each element consists of an image URL. The entire image is treated as one element, and region selection is not currently supported.
Upload 1-4 images, select the subjects (people, animals, objects, or scenes) in the images as elements, and describe their actions and interactions. A video will be created based on the elements and prompts.
Element Image Requirements
- Supports 1-4 JPG/PNG images
- Maximum file size: 10MB per image
- Minimum dimension: 300px
API Specifications
Input Object Parameters
prompt
: Description of the desired video outputduration
: Video length in seconds (5 or 10)elements
: Array of image elements (1-4 items)mode
: Generation mode (e.g., "std")aspect_ratio
: Output video ratio ("16:9", "9:16", or "1:1")version
: Must be "1.6" for elements feature
Example Request
{
"model": "kling",
"task_type": "video_generation",
"input": {
"prompt": "Two toy figures fighting",
"negative_prompt": "",
"duration": 5,
"elements": [
{
"image_url": "https://i.ibb.co/p6rmPwdm/2025-01-17-133430.png"
},
{
"image_url": "https://i.ibb.co/RfHW0tK/2025-01-17-133106.png"
}
],
"mode": "std",
"aspect_ratio": "16:9",
"version": "1.6"
},
"config": {
"service_mode": "public",
"webhook_config": {
"endpoint": "",
"secret": ""
}
}
}
Last modified: 14 days ago