Kling 4.0 API Is Live: Versions, Pricing, and a Request Example

Kling 4.0 API is live on PiAPI
Kling 4.0 is now available through the PiAPI task API. Use model: "kling" with task_type: "omni_video_generation", then select the version that matches your duration, resolution, and reference-media needs.
Kling 4.0 API at a glance
The table below records the launch contract supplied for the Kling API docs. Prices are in USD per second unless the reference-video rule below applies.
- Kling 4.0: 720p or 1080p, 3–30 seconds, up to 10 images, 5 reference videos, and 3 reference audio files.
- Kling 4.0-flash: 720p, 3–20 seconds, with image and reference-video inputs.
- Kling 3.0: 720p or 1080p, 3–15 seconds, images, one reference video, and multi-shot generation.
- The shared task shape is
omni_video_generation; the version value selects 4.0, 4.0-flash, or 3.0. - The live API documentation is the source for request fields and response handling.
Kling 4.0, 4.0-flash, and 3.0 specifications
Use these confirmed dimensions when choosing a version. The 3.0 prices list 720p first and 1080p second; audio-enabled 3.0 requests use the second rate pair.
| Version | Resolution and duration | Reference inputs | Output price (USD/second) |
|---|---|---|---|
| 4.0 | 720p or 1080p · 3–30s | Up to 10 images · 5 videos · 3 audio files | 720p: $0.1667 · 1080p: $0.25 |
| 4.0-flash | 720p · 3–20s | Images and reference videos | 720p: $0.10 |
| 3.0 | 720p or 1080p · 3–15s | Images · 1 reference video · multi-shot | Without audio: $0.10/$0.15 · with audio: $0.15/$0.20 |
Three practical Kling API workflows
Short-form production with 4.0-flash
Use 4.0-flash for a 3–20-second 720p clip when a fast social cut or a quick creative iteration is the goal. It accepts image and reference-video inputs, so a product team can start from an existing visual without moving to the longer 4.0 window.
Reference-led product scenes with 4.0
A product launch sequence can combine up to 10 reference images, 5 reference videos, and 3 reference audio files in a 4.0 request. This is useful when the subject, motion, and sound need to stay tied to approved source material.
Multi-shot edits with 3.0
Choose 3.0 for a 3–15-second multi-shot sequence or when a single reference video is enough. It supports 720p and 1080p output, with separate rates for requests with and without audio.
Kling 4.0 API request example
This cURL request creates a ten-second 1080p Kling 4.0 task. Keep the API key on your server, replace the prompt with your scene, and use the reference fields documented for the input mode you choose.
curl --request POST "https://api.piapi.ai/api/v1/task" \
--header "X-API-Key: $PIAPI_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "kling",
"task_type": "omni_video_generation",
"input": {
"version": "4.0",
"prompt": "A product camera move around a glass bottle on a sunlit table",
"duration": 10,
"resolution": "1080p",
"aspect_ratio": "16:9"
},
"config": { "service_mode": "public" }
}'Pricing when a request includes reference video
For requests with reference video, billable seconds are calculated as output seconds + max(total reference-video seconds, output seconds). The reference-video rate is $0.10/second at 720p or $0.15/second at 1080p for Kling 4.0, and $0.0667/second for Kling 4.0-flash. Confirm the current billing response in the live docs before estimating a production batch.
- A ten-second 4.0 720p output with no reference video uses the $0.1667/second output rate.
- If that request includes 12 seconds of reference video, the billable-second formula uses 10 + max(12, 10) = 22 seconds for the reference-video calculation.
- Reference images and reference audio are subject to the version limits in the table; the special billable-second rule is for reference video.
How to access Kling 4.0 on PiAPI
The API is live in the Kling documentation. A backend integration can follow this sequence:
- Create or use a PiAPI API key and keep it in a server-side secret.
- POST the task with
model: "kling",task_type: "omni_video_generation", and a supportedversion. - Read the returned task and poll it using the status operation documented with the Kling API until the video output is ready.
Kling 4.0 API FAQ
Is the Kling 4.0 API live?
Yes. The task API is live on PiAPI. Use model kling, task type omni_video_generation, and a supported version such as 4.0 or 4.0-flash.
How long can Kling 4.0 generate?
Kling 4.0 supports 3–30 seconds at 720p or 1080p. Kling 4.0-flash supports 3–20 seconds at 720p, while Kling 3.0 supports 3–15 seconds at 720p or 1080p.
How many references can a Kling 4.0 request include?
Kling 4.0 supports up to 10 images, 5 reference videos, and 3 reference audio files. Kling 4.0-flash supports image and reference-video inputs; use the live docs for the field-level limits for that version.
How are Kling 4.0 reference videos billed?
Billable seconds are output seconds plus the larger of total reference-video seconds and output seconds. The reference-video rates are $0.10/second at 720p and $0.15/second at 1080p for 4.0, and $0.0667/second for 4.0-flash.
Source and verification: PiAPI's Kling API documentation, checked against the launch specifications on October 27, 2026. Pricing and limits can change; verify the live contract before shipping a billing estimate.

