Kling 4.0 · 720p
$0.1667 /sec
- Standard video generation
- 3–30 second output
Kling 4 API / Cinematic video generation with text, images, keyframes, or Omni references
Kling 4 is live on PiAPI. Generate 720p or 1080p video with Kling 4.0, or choose Kling 4.0 Flash for fast 720p generations.
Without a reference video, pricing follows generated output duration. With a reference video, verified input video duration also affects the quote.
$0.1667 /sec
$0.25 /sec
$0.10 /sec
Ready to generate with Kling 4?
A single asynchronous API for standard and Flash Kling 4 text, image, keyframe, and Omni reference workflows.
Choose Kling 4.0 for 720p or 1080p output, or Kling 4.0 Flash for fast 720p generation.
Use text-to-video, image-to-video, or first/last-frame generation with explicit 3–30 second standard or 3–20 second Flash durations.
Kling 4 Omni supports image and video references on both versions; standard 4.0 also supports up to three audio references. See the Kling 4 Omni API documentation.
Standard Kling 4 costs $0.1667/sec at 720p and $0.25/sec at 1080p; Flash costs $0.10/sec at 720p.
Completed tasks expose the generated video at output.video, with one output per task.
Create a task with model kling and version 4.0 or 4.0-flash, then poll it until completion.
Kling 4 is available now through the PiAPI API and Workspace Playground.
One output is returned per task in output.video.
Sign up and grab an API key from the PiAPI workspace — free credits are included on sign-up.
Add credits on the billing page when you are ready to scale beyond the free tier.
POST your first task following the API docs, then poll the task until the result is ready.
Prototype prompts and settings in the Open the Kling 4 Playground before wiring them into your product.
curl -X POST 'https://api.piapi.ai/api/v1/task' \
-H 'X-API-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model": "kling",
"task_type": "text_to_video",
"input": {
"version": "4.0",
"duration": 5,
"mode": "std",
"aspect_ratio": "16:9",
"prompt": "A tree moving gently in the wind"
}
}'curl 'https://api.piapi.ai/api/v1/task/{task_id}' \
-H 'X-API-Key: YOUR_API_KEY'video
curl -X POST 'https://api.piapi.ai/api/v1/task' \
-H 'X-API-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model": "kling",
"task_type": "image_to_video",
"input": {
"version": "4.0",
"duration": 5,
"mode": "std",
"aspect_ratio": "16:9",
"prompt": "The camera slowly moves toward the subject",
"image_url": "YOUR_IMAGE_URL"
}
}'curl 'https://api.piapi.ai/api/v1/task/{task_id}' \
-H 'X-API-Key: YOUR_API_KEY'video
curl -X POST 'https://api.piapi.ai/api/v1/task' \
-H 'X-API-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model": "kling",
"task_type": "video_generation",
"input": {
"version": "4.0",
"duration": 5,
"mode": "std",
"aspect_ratio": "16:9",
"prompt": "A smooth transition between the opening and closing frames",
"image_url": "YOUR_IMAGE_URL",
"image_tail_url": "YOUR_IMAGE_URL"
}
}'curl 'https://api.piapi.ai/api/v1/task/{task_id}' \
-H 'X-API-Key: YOUR_API_KEY'video
curl -X POST 'https://api.piapi.ai/api/v1/task' \
-H 'X-API-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model": "kling",
"task_type": "omni_video_generation",
"input": {
"version": "4.0",
"prompt": "Use image_1 as the scene reference",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9",
"images": [
"YOUR_IMAGE_URL"
],
"enable_audio": true,
"keep_original_audio": false
}
}'curl 'https://api.piapi.ai/api/v1/task/{task_id}' \
-H 'X-API-Key: YOUR_API_KEY'video
curl -X POST 'https://api.piapi.ai/api/v1/task' \
-H 'X-API-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model": "kling",
"task_type": "text_to_video",
"input": {
"version": "4.0-flash",
"duration": 5,
"mode": "std",
"aspect_ratio": "16:9",
"prompt": "A tree moving gently in the wind"
}
}'curl 'https://api.piapi.ai/api/v1/task/{task_id}' \
-H 'X-API-Key: YOUR_API_KEY'video
curl -X POST 'https://api.piapi.ai/api/v1/task' \
-H 'X-API-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model": "kling",
"task_type": "image_to_video",
"input": {
"version": "4.0-flash",
"duration": 5,
"mode": "std",
"aspect_ratio": "16:9",
"prompt": "The camera slowly moves toward the subject",
"image_url": "YOUR_IMAGE_URL"
}
}'curl 'https://api.piapi.ai/api/v1/task/{task_id}' \
-H 'X-API-Key: YOUR_API_KEY'video
curl -X POST 'https://api.piapi.ai/api/v1/task' \
-H 'X-API-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model": "kling",
"task_type": "omni_video_generation",
"input": {
"version": "4.0-flash",
"prompt": "Use image_1 as the scene reference",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9",
"images": [
"YOUR_IMAGE_URL"
],
"enable_audio": true,
"keep_original_audio": false
}
}'curl 'https://api.piapi.ai/api/v1/task/{task_id}' \
-H 'X-API-Key: YOUR_API_KEY'video
Kling 4 is PiAPI's latest Kling video generation API. It supports text-to-video, image-to-video, and first/last-frame video generation through one asynchronous task API. Kling 4 Omni is available for image and video references on both versions, and audio references on standard 4.0.
Create a task with model kling and version 4.0 or 4.0-flash, then poll the task until it completes. The Kling 4 Playground and API quickstart use the same request contract.
Kling 4.0 costs $0.1667 per second at 720p and $0.25 per second at 1080p. Kling 4.0 Flash costs $0.10 per second at 720p. Reference-video tasks also bill verified input duration.
Kling 4.0 supports 3–30 second outputs and Kling 4.0 Flash supports 3–20 seconds. Kling 4 Omni supports up to 10 images, 5 videos, and 15 references total. Standard 4.0 also supports up to 3 audio references; Flash does not.
Completed Kling 4 tasks return the generated URL in output.video. Continue polling the task until status is completed or failed.
More questions? See the API docs.
Kling 4 API