Kling API Guide (November 2026): API Key, Kling 4.0 Models, Endpoints and Billing
Image & VideoQuick answer: The Kling API is Kuaishou’s official developer API for Kling video and image models. You sign in at kling.ai/dev with your Kling AI account, buy an API resource package (or top up balance), create an API key, and call https://api-singapore.klingai.com with Authorization: Bearer <API key>. The newest models, Kling 4.0 and Kling 4.0 Flash, are selected by request path, for example POST /text-to-video/kling-4.0. Jobs run asynchronously, and video is billed per second. Everything here comes from Kling’s API docs, checked November 19, 2026. Comparing Kling with Google, Runway and Luma? See AI video APIs compared.
How do you get a Kling API key?
From Kling’s quick start:
- Open the API platform at kling.ai/dev.
- Buy a resource package or top up balance. Video Generation offers four package types (Basic, Pro, General and Flagship), and the models and capabilities you can use vary by package. Image Generation has its own packages. Custom or bulk purchases go through Business Inquiry.
- Log in to the developer console at kling.ai/dev/api-key. The console account is the same as your Kling AI web account.
- Create a key. Click + Create a new API Key, name it and confirm. Copy it right away: Kling says the key “will only be shown once.”
- Send it as a Bearer token in the
Authorizationrequest header, with a space betweenBearerand the key.
The authentication page recommends keeping the key in an environment variable, because a leaked key can be used to spend your quota.
API key vs Access Key / Secret Key
Older Kling integrations used an Access Key + Secret Key pair to sign a short-lived JWT for every request. Kling now says API key authentication works for all models. The AK/SK method only applies to the legacy API design, where you pick a model with the model_name parameter. In the new design, the model version is in the path (/text-to-video/kling-4.0). If you are maintaining old code, the authentication page still documents the JWT method.
Which models does the Kling API offer?
Kling’s video capability map lists these video models:
| Model | Inputs | Clip length | Resolution | What Kling highlights |
|---|---|---|---|---|
| Kling 4.0 | Text, image, video | 3–30 s | 720p, 1080p, 4K (10-bit HDR at 1080p and 4K) | Native 30-second generation, omni reference, keyframe control |
| Kling 4.0 Flash | Text, image, video | 3–20 s | 720p | Faster generation, “greater value” |
| Kling 3.0 Turbo | Text, image | 3–15 s | 720p, 1080p | Value-focused 3.0 model with native audio |
| Kling 3.0 | Text, image, video | 3–15 s | 720p, 1080p, 4K | Native audio, multi-shot, motion control |
| Kling 3.0 Omni | Text, image, video | 3–15 s | 720p, 1080p, 4K | Multimodal references and voice-driven characters |
| Kling O1 | Text, image, video | 3–10 s | 720p, 1080p | Unified multimodal video model |
| Kling 2.6 / 2.5 Turbo | Text, image (2.6 also video) | 5 s or 10 s | 720p, 1080p (Kling 2.6 audio output at 1080p only) | Older models, still listed |
A few details from the API changelog:
- Kling 4.0 became fully available on the API on October 28, 2026. At launch it offered 720p and 1080p. Since November 19, 2026, the Kling 4.0 text-to-video, image-to-video and omni-video APIs also accept
4kforsettings.resolution, and HDR output can be enabled at 1080p or 4K. It supports up to 10 keyframes, up to 10 reference images and up to 5 reference videos, with up to 15 inputs per Omni task. - Kling 4.0 Flash arrived on November 4, 2026, at 720p, 3–20 seconds. Its image-to-video mode takes a single first-frame image.
- On November 14, 2026, Kling 4.0 and 4.0 Flash text-to-video and omni-video added 4:3 and 3:4 aspect ratios, alongside 21:9, 16:9, 9:16 and 1:1.
- Kling Image 4.0 arrived on November 17, 2026, with 2K, 4K and native 8K image output.
Beyond generation, the API also covers motion control (Kling 3.0 and 2.6 only), avatar, lip sync, multi-element video editing, video-to-audio and text-to-audio. If you need start and end frames, see first and last frame AI video.
How do you call the Kling 4.0 API?
The Kling 4.0 text-to-video reference uses the new path-based design:
| Step | Method and path | Notes |
|---|---|---|
| Create a task | POST /text-to-video/kling-4.0 |
Also /image-to-video/kling-4.0 and /omni-video/kling-4.0; swap in kling-4.0-flash for Flash |
| Query by ID | GET /tasks with task_ids or external_task_ids |
Returns the task status, result URLs and usage |
| Query a list | POST /tasks |
Cursor-based listing of async tasks |
Useful request fields on that page:
settings.duration: target length in whole seconds. If you leave it out, the model uses a duration stated in the prompt. If neither is set, the default is 10 seconds.settings.aspect_ratio: defaults to16:9.settings.resolution:720p,1080p(default) or4k. Only this field sets the output resolution; writing “4K” in the prompt does not.settings.dynamic_range:sdr(default) orhdr. HDR works only when the resolution is1080por4k.options.callback_url: Kling will notify this URL when the task status changes (callback protocol, which also covers webhook signatures).options.watermark_info.enabled: also return a watermarked copy. Custom watermarks are not supported.
The text-to-video endpoint only takes a prompt. To pass reference images, videos or elements, Kling points you to the Omni endpoint.
How does Kling API billing work?
Kling’s quick start says calls can be billed by unit (deducted from a prepaid resource package) and by balance. The video pricing page lists units per second for each model and mode. The rate rises with resolution, native audio and video input. We don’t reprint the rates here; check the live table before you budget.
Kling 4.0 and 4.0 Flash have one rule worth knowing before you build (video pricing):
- No input video: billed on the output duration.
- Input video no longer than the output: billed on output duration × 2.
- Input video longer than the output: billed on input duration + output duration.
Input video includes reference videos and video character elements.
HDR costs extra. When you turn on HDR with Kling 4.0, Kling adds an HDR fee for each second of output video, on top of the base cost (video pricing). Check the live table for the HDR rate at 1080p and 4K. The task query returns usage.output_duration (and input_duration when relevant), and Kling says to use those values when you calculate cost.
You can track spend in the console: call volume, resource package consumption, and unit and balance deduction details. The Terms of API Paid Service say account balance is non-refundable, non-withdrawable and non-transferable, does not expire, and is not refunded if the service is terminated. Resource packages have their own validity period, shown on the purchase page.
Comparing Kling’s per-second units with Google’s token billing or Runway’s credits? The billing table in AI video APIs compared puts them side by side.
What do Kling API error codes mean?
The common ones from Kling’s error code table:
| HTTP | Code | Meaning | What to do |
|---|---|---|---|
| 401 | 1000–1004 | Authorization missing, invalid, not yet valid or expired | Check the Authorization: Bearer header; reissue JWTs on legacy AK/SK setups |
| 429 | 1101 | Account in arrears (postpaid) | Top up the balance |
| 429 | 1102 | Resource package used up or expired (prepaid) | Buy another package, or enable post-payment if offered |
| 403 | 1103 | No access to this API or model | Check your account permissions |
| 400 | 1301 | Content security policy triggered | Change the input and resend |
| 429 | 1302 / 1303 | Too many requests / concurrency over the package limit | Back off and retry, or ask Kling to raise the limit |
| 5xx | 5000–5002 | Server error, maintenance or backlog | Retry later |
On concurrency, Kling’s rules say the limit is per account, model version and package type, shared across all your keys. A video task holds one slot from submission until it finishes, including failures. Image tasks use as many slots as the n you request. Kling recommends exponential backoff starting at one second or more. Query calls do not use concurrency.
Kling API vs other video APIs
If you have not picked a provider yet, start with the comparison pages:
- AI video APIs compared covers Google’s Gemini API, Runway, Kling and Luma: auth, billing units and model coverage.
- Veo vs Kling vs Runway compares the consumer apps.
- Can you use AI video commercially? covers licensing before you ship generated clips.
FAQ
How do I get a Kling API key?
Sign in at kling.ai/dev with your Kling AI account, buy an API resource package (or top up balance), then open kling.ai/dev/api-key and click + Create a new API Key. Kling's quick start says the key is shown only once, so store it securely.
Is Kling 4.0 available through the API?
Yes. Kling's API changelog says the Kling 4.0 API became fully available on October 28, 2026, and Kling 4.0 Flash followed on November 4, 2026. Both support text-to-video, image-to-video and Omni reference-to-video.
What is the Kling API base URL?
https://api-singapore.klingai.com. Kling's authentication page says the endpoint changed from api.klingai.com and that this domain suits servers located outside China.
How is the Kling API billed?
Kling supports calls billed by units (from prepaid resource packages) and by account balance. Video models are billed per second of video. For Kling 4.0 and 4.0 Flash, the billed duration also counts input video when you supply reference video. Current unit rates are on kling.ai/document-api/pricing/base/video.
Is there a free Kling API tier?
Kling's quick start does not describe a free API tier: the documented path is to buy a resource package or top up balance before calling the API. Kling's paid-service terms say account balance is non-refundable and non-withdrawable, so start with the smallest package that covers your test.
Do Kling API calls have a rate limit?
Kling limits concurrency, not QPS. The concurrency rules say the cap depends on your account, model version and resource package, is shared by all your API keys, and returns error 1303 when exceeded. Video tasks use one slot each until they finish.
Sources
- Kling API: Quick start (accessed 2026-11-19)
- Kling API: Authentication (accessed 2026-11-19)
- Kling API: Capability map (video) (accessed 2026-11-20)
- Kling API: Kling 4.0 text to video (accessed 2026-11-20)
- Kling API: Error codes (accessed 2026-11-19)
- Kling API: Concurrency rules (accessed 2026-11-19)
- Kling API: Callback protocol (accessed 2026-11-19)
- Kling API: Basic APIs pricing (video) (accessed 2026-11-20)
- Kling API: API updates (changelog) (accessed 2026-11-20)
- Kling API: Terms of API Paid Service (accessed 2026-11-19)