Skip to main content

video models

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.

Get Started!

Kling 4 API pricing

Without a reference video, pricing follows generated output duration. With a reference video, verified input video duration also affects the quote.

Kling 4.0 · 720p

$0.1667 /sec

  • Standard video generation
  • 3–30 second output

Kling 4.0 · 1080p

$0.25 /sec

  • Pro video generation
  • 3–30 second output

Kling 4.0 Flash · 720p

$0.10 /sec

  • Flash video generation
  • 3–20 second output

Ready to generate with Kling 4?

Kling 4 capabilities

A single asynchronous API for standard and Flash Kling 4 text, image, keyframe, and Omni reference workflows.

Kling 4.0 and Flash

Choose Kling 4.0 for 720p or 1080p output, or Kling 4.0 Flash for fast 720p generation.

Flexible video entry

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 references

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.

Predictable per-second pricing

Standard Kling 4 costs $0.1667/sec at 720p and $0.25/sec at 1080p; Flash costs $0.10/sec at 720p.

Compact result contract

Completed tasks expose the generated video at output.video, with one output per task.

API access

Create a task with model kling and version 4.0 or 4.0-flash, then poll it until completion.

Availability

Kling 4 is available now through the PiAPI API and Workspace Playground.

Generation

One output is returned per task in output.video.

Get started

Create your API key

Sign up and grab an API key from the PiAPI workspace — free credits are included on sign-up.

Top up credits

Add credits on the billing page when you are ready to scale beyond the free tier.

Call the API

POST your first task following the API docs, then poll the task until the result is ready.

Create a task

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"
  }
}'

Retrieve the result

curl 'https://api.piapi.ai/api/v1/task/{task_id}' \
  -H 'X-API-Key: YOUR_API_KEY'

video

Pricing

  • 4.0-std-720p-perSec: $0.1667 / video
  • 4.0-pro-1080p-perSec: $0.25 / video

Kling 4 API FAQ

What is Kling 4?

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.

How do I access Kling 4 through PiAPI?

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.

How much does Kling 4 cost?

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.

What duration and reference limits does Kling 4 support?

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.

What does a completed Kling 4 task return?

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.

Our blog

Kling 4 API