Kling 4.0 API: Kie AI's video-generation model, one key away
Kling 4.0 via the ApexApi gateway
Kling 4.0 turns a text prompt into a single clip of 3 to 30 seconds at 720p or 1080p, with audio generated on every render. Pick it over Kling 3 when you need a clip longer than 10 seconds in one pass. Call it through ApexApi's unified, OpenAI-compatible API with one `ak-` key, alongside every other model in the catalog. Pricing is $0.171–$0.255/sec per second, billed pay-per-use from your credit balance with no subscription.
Kling 4.0 is served through ApexApi's unified, OpenAI-compatible API. One key, one format, with smart routing and automatic failover. Provider: Kie AI.
Why Kling 4.0
AI video generation
Text-to-video (and image-to-video where supported) via a simple async job.
Per-second pricing ($0.171–$0.255/sec)
Pay only for what you generate from your credit balance. No subscription.
OpenAI-compatible
Drop-in with any OpenAI SDK. Change the base URL and key, keep your code.
Specifications
- Modality
- video
- Context window
- —
- Max output
- —
- Streaming
- —
- Tool / function calling
- —
- Vision input
- —
Kling 4.0 pricing
- That makes it the 16th cheapest of the 38 video models we serve, ranked on output price.
- It runs 2.0× cheaper than Kling 2.0 Master Text-to-Video, the pricier option from the same maker.
Getting started with Kling 4.0
OpenAI-compatible. Point your client at ApexApi, swap your key, and call it. No new SDK to learn.
import requests, time
job = requests.post(
"https://api.apexapi.dev/v1/videos/generations",
headers={"Authorization": "Bearer <YOUR_APEXAPI_KEY>"},
json={"model": "kuaishou/kling-video/v4/text-to-video", "prompt": "A drone shot over a neon city at night", "duration": 5},
).json()
# Poll until the async job completes
while True:
res = requests.get(
f"https://api.apexapi.dev/v1/videos/generations/{job['id']}",
headers={"Authorization": "Bearer <YOUR_APEXAPI_KEY>"},
).json()
if res["status"] in ("completed", "failed"):
print(res)
break
time.sleep(3)Kling 4.0 use cases
What teams build with Kling 4.0 on ApexApi.
Short-form content
Generate clips for social, ads, and marketing.
Product & explainer
Turn prompts or images into motion for launches and demos.
Creative prototyping
Explore video concepts fast before a full production.
Kling 4.0 vs other models
How it compares, and on ApexApi you can switch between any of them with a single string change, same key, same endpoint.
Kling 4.0 vs Veo 3.1
Compare Kling 4.0 against this model on price, capabilities, and latency. A/B them with a single key on ApexApi.
Learn more about Veo 3.1 API →Kling 4.0 vs Seedance 2.0
Compare Kling 4.0 against this model on price, capabilities, and latency. A/B them with a single key on ApexApi.
Learn more about Seedance 2.0 API →Kling 4.0 API: FAQ
How do I call Kling 4.0 through ApexApi?
Create an ApexApi key, point your client at https://api.apexapi.dev/v1, and POST to /v1/videos/generations with the model set to `kuaishou/kling-video/v4/text-to-video`. The API is OpenAI-compatible, so an existing OpenAI SDK works once you change the base URL and key.
How much does Kling 4.0 cost on ApexApi?
$0.171–$0.255/sec, billed per second with no subscription or minimum. The exact figure is shown before you generate, so nothing is charged against a price you have not seen.
What do I send to Kling 4.0?
This variant takes a text prompt on its own, with no image required. The other variants of the same model accept different inputs, so pick the slug that matches what you already have.
What should I use instead of Kling 4.0?
From the same maker, Kling 3.0 Standard costs less for lighter work and Kling 2.0 Master Text-to-Video is the step up when this one falls short. Switching is one string: both run on the same endpoint and the same key, so there is nothing to re-integrate.
Ready to build with Kling 4.0?
One API key. Every major AI model. Pay only for what you use.
Try Kling 4.0, pay as you go from $5