Skip to main content
POST
/
v1
/
ai
/
image-to-video
/
kling-v2-6-pro
Kling 2.6 Pro - Create video from text or image
curl --request POST \
  --url https://api.freepik.com/v1/ai/image-to-video/kling-v2-6-pro \
  --header 'Content-Type: application/json' \
  --header 'x-freepik-api-key: <api-key>' \
  --data '
{
  "prompt": "<string>",
  "duration": "5",
  "webhook_url": "<string>",
  "negative_prompt": "<string>",
  "cfg_scale": 0.5,
  "aspect_ratio": "widescreen_16_9",
  "generate_audio": true
}
'
{
"data": {
"generated": [
"https://openapi-generator.tech",
"https://openapi-generator.tech"
],
"task_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"status": "CREATED"
}
}

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
prompt
string
required

Text prompt describing the desired video to generate, cannot exceed 2500 characters

Maximum string length: 2500
duration
enum<string>
required

Duration of the generated video in seconds

Available options:
5,
10
webhook_url
string<uri>

Webhook URL to notify the user when the task is completed

negative_prompt
string

Text prompt describing what to avoid in the generated video, cannot exceed 2500 characters

Maximum string length: 2500
cfg_scale
number<float>
default:0.5

Flexibility in 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
aspect_ratio
enum<string>
default:widescreen_16_9

Aspect ratio for the generated video

Available options:
widescreen_16_9,
social_story_9_16,
square_1_1
generate_audio
boolean

Whether to generate audio for the video

Response

OK

data
object
required
Example:
{
"task_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"status": "CREATED",
"generated": [
"https://openapi-generator.tech",
"https://openapi-generator.tech"
]
}