Skip to main content
POST
Kling V2.1 Pro
Generate videos from a source image using the kling/v2-1-pro model.

Authentication

All API requests require a Bearer Token.

Create a Video Generation Task

Submit an image-to-video generation task using the endpoint below.

Request Body

string
required
Must be kling/v2-1-pro.
object
required

Input Parameters

The input object contains the parameters used to generate the video.
string
required
Use prompt to describe the video you want to generate.Maximum length: 5000 characters.

Source Image

string
required
The image_url must contain the URL of an uploaded image.Supported formats:
  • image/jpeg
  • image/png
Maximum file size: 10 MB
string
Use tail_image_url to provide an image for the ending frame of the generated video.The image must be an uploaded file URL.Supported formats:
  • image/jpeg
  • image/png
Maximum file size: 10 MB
string
Use duration to specify the length of the generated video.Supported values:
  • "5"
  • "10"
Default: "5"
string
Use negative_prompt to specify terms or qualities that should be avoided in the generated video.Maximum length: 500 characters.
string
The cfg_scale parameter controls how closely the model follows the prompt.

Example Request

Response

Successful Response

A successful request returns a task ID.
number
Response status code.
string
Response message. Contains the error description when the request fails.Example: success
object
required
The task data object containing task id.
string
required
The unique identifier for this task.Example: task_123456
Use the returned taskId with the Get Task Details endpoint to check task progress and retrieve the generation results.

Get Task Details

Learn how to query task status and retrieve generation results.

Error Response

API Response Codes