POST
/
v1
/
ai
/
image-to-video
/
kling-pro
curl --request POST \
  --url https://api.freepik.com/v1/ai/image-to-video/kling-pro \
  --header 'Content-Type: application/json' \
  --header 'x-freepik-api-key: <api-key>' \
  --data '{
  "webhook_url": "<string>",
  "image": "<string>",
  "image_tail": "<string>",
  "prompt": "<string>",
  "duration": "5",
  "cfg_scale": 0.5,
  "static_mask": "<string>",
  "dynamic_masks": [
    {
      "mask": "<string>",
      "trajectories": [
        {
          "x": 123,
          "y": 123
        }
      ]
    }
  ]
}'
{
  "data": {
    "task_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
    "status": "IN_PROGRESS"
  }
}

Important

The service allows up to 3 concurrent requests per user.

Authorizations

x-freepik-api-key
string
header
required

Your Freepik API key. Required for authentication. Learn how to obtain an API key

Body

application/json
image
string
required

Reference Image. Supports Base64 encoding or URL (ensure accessibility). For URL, must be publicly accessible. The image file size cannot exceed 10MB, and the resolution should not be less than 300x300px. Aspect ratio should be between 1:2.5 ~ 2.5:1.

duration
enum<string>
required

Duration of the generated video in seconds

Available options:
5,
10
webhook_url
string

Webhook URL to notify the user when the task is completed

image_tail
string

Reference Image - End frame control. Supports Base64 encoding or URL. For URL, must be publicly accessible. Must follow the same format requirements as the 'image' field. (Optional) Not compatible with standard mode.

● Supported image formats include .jpg / .jpeg / .png ● The image file size cannot exceed 10MB, and the image resolution should not be less than 300*300px ● At least one parameter should be filled in between parameter image and parameter image_tail; cannot both be empty at the same time

prompt
string

Text prompt describing the desired motion, cannot exceed 2500 characters

cfg_scale
number
default:0.5

Flexibility in video generation; The higher the value, the lower the model's degree of flexibility, and the stronger the relevance to the user's prompt.

Required range: 0 <= x <= 1
static_mask
string

Static mask image for defining motion brush application areas.

● Supports both Base64 encoding and image URLs (ensure URLs are publicly accessible and follow the same format requirements as the image field). ● Supported image formats include .jpg / .jpeg / .png. ● The aspect ratio of the mask image MUST match the input image (image field); otherwise, the task will fail. ● The resolutions of the static_mask image and the dynamic_masks.mask images must be identical; otherwise, the task will fail. ● The static brush feature allows you to define areas where motion will be applied in the generated video.

dynamic_masks
object[]

Response

200
application/json
OK - Get the status of the kling-pro task
data
object
required
Example:
{
  "task_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
  "status": "IN_PROGRESS"
}