Kling 4.0 · 720p
$0.1667 /sec
- Standard video generation
- 3–30 second output
Kling 4 API / Cinematic video generation with text, image, video, and audio 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.
Pricing is calculated per second of generated output. Omni reference video can add billable input duration.
$0.1667 /sec
$0.25 /sec
$0.10 /sec
Ready to generate with Kling 4?
A single asynchronous API for standard, Flash, and multimodal Kling 4 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 multimodal references with explicit 3–30 second standard or 3–20 second Flash durations.
Standard Kling 4 Omni accepts up to 10 images, 5 videos, and 3 audio references in one task.
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",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9",
"enable_audio": true,
"prompt": "Use video_1 as the movement reference and image_1 as the scene",
"images": [
"YOUR_IMAGE_URL"
],
"videos": [
"YOUR_VIDEO_URL"
],
"audio_urls": [
"YOUR_AUDIO_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": "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",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9",
"enable_audio": true,
"prompt": "Use video_1 as the movement reference and image_1 as the scene",
"images": [
"YOUR_IMAGE_URL"
],
"videos": [
"YOUR_VIDEO_URL"
]
}
}'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 multimodal Omni references through one asynchronous task API.
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.
Kling 4.0 supports 3–30 second outputs and Kling 4.0 Flash supports 3–20 seconds. Standard Omni accepts up to 10 images, 5 videos, and 3 audio references.
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.