MODELLIX editorial cover for Kling API Documentation, subtitle Integration Guide, Pricing and Code, above a glass API gateway

“Kling API documentation” is not one document, and knowing that is the fastest way to stop reading the wrong copy. When you search for it, the top results are the official English docs on kling.ai/document-api — but the same documentation family also lives on a Chinese mirror (klingai.com/document-api), in community re-copies on GitHub, and in stale mirrors that stopped updating. The official docs themselves are split across separate pages for overview, quick start, authentication, callbacks, per-model API references, and billing. This guide does three things the official pages don’t: maps that documentation so you know which section to open for what, walks a complete first integration in REST and Python (the official docs stop at cURL), and gives a same-day pricing table in per-second US dollars so you can read a Kling bill before you ever incur one. All prices and model statuses below were re-verified against kling.ai’s and Modellix’s own pages on September 8, 2026.

Where the official Kling API documentation lives (and which copy to trust)

The authority is the English developer platform at kling.ai/dev, which hosts the current documentation set under kling.ai/document-api. That set has four parts, and each answers a different question:

Documentation section What it answers Where it points
Get Started (quick start, authentication, error codes, concurrency, callbacks) “How do I get a key and make my first call?” document-api/guides/get-started/ + document-api/api/get-started/
Basic APIs — per-model references “What is the exact endpoint, request schema, and response for model X?” document-api/api/video/... and document-api/api/image/...
Solution APIs (Effects, Video Commerce, Goods Studio) “Is there a ready-made workflow instead of raw generation?” document-api/api/effects/... and document-api/api/ecommerce-replication/...
Asset APIs (deduction query, account usage) “Where did my units go?” document-api/api/assets/...

Three other copies will appear in your search results, and you should not treat any of them as authoritative for integration work: the Chinese open-platform mirror at klingai.com/document-api serves the same documentation family in Chinese (some pages render as navigation shells without the doc body, which is why search engines sometimes surface them oddly); community re-copies (for example the mcp-kling repository’s kling-api-docs.md on GitHub) are third-party snapshots that drift out of date and are maintained for specific tools; and mirrors that were explicitly discontinued still rank — the Qingque-hosted “Kling AI API Specification” that appears in this SERP carries a “this document has been discontinued for updates” notice. Rule of thumb: for anything you are about to ship code against, open the page on kling.ai/document-api and confirm the model and endpoint you need is listed there. The developer platform is also where model announcements land first — at the time of writing it leads with Kling 3.0 Turbo (“now available”, faster and cheaper per second than the 3.0 base at the same resolution), followed by Kling 3.0 & 3.0 Omni and Kling Image 3.0 & 3.0 Omni.

Map of official Kling API docs: Get Started, API reference, Solution APIs and Asset APIs converging on the developer platform

Figure: where to look in the official Kling API documentation — the four sections and the questions they answer. Concept diagram generated for this article, not a screenshot of the docs site.

What you need before the first request: account, resource package, API key

Three things gate the first call, in this order — and the official quick start is explicit that the account, the package, and the key are separate steps:

  1. A Kling AI developer account. You sign up on the developer platform (or kling.ai/app); the official quick start notes your console account is the same as your Kling AI web account.
  2. A prepaid resource package. Video and image generation are prepaid: you buy a package of units on the official pricing page, and every generation deducts units (billing details in the pricing section below). The quick start mentions a trial resource package for integration testing — its current availability and terms are shown when you log in, so check the console rather than trusting a blog post about it.
  3. An API key from the developer console. Open the console at kling.ai/dev/api-key, click + Create a new API Key, name it, and copy it — the official docs say it is only shown once, so store it in a secrets manager or environment variable immediately, never in client-side code or a committed file.

Authentication on the current API is one header: Authorization: Bearer <API_KEY> (with the space between Bearer and the key — a documented footgun). The older AccessKey/SecretKey scheme with a JWT you sign yourself still appears in the authentication documentation, but it applies only to legacy-version API designs; new integrations use the plain API key.

One more thing worth knowing before you write code: the API base URL is https://api-singapore.klingai.com, which the official docs note was changed from the older api.klingai.com and is suited to servers located outside mainland China. If a tutorial or older code sample sends requests to api.klingai.com, it is describing the pre-migration endpoint.

The request pattern: async tasks, endpoints, and a working example

Kling generation is asynchronous on every model: you submit a task, poll for its status, and download the result when it reaches succeeded. The text-to-video API reference documents the full schema; the pattern below is the same shape across the video and image endpoints. Task states are submittedprocessingsucceeded (or failed, with a message explaining why — content-policy rejections land here).

Submit a generation taskPOST /text-to-video/kling-3.0 (the endpoint path encodes the model; siblings exist per model under the same host):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
curl "https://api-singapore.klingai.com/text-to-video/kling-3.0" \
-H "Authorization: Bearer $KLING_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A lighthouse on a rocky coast at dusk, waves breaking, warm light from the lantern room",
"settings": {
"resolution": "1080p",
"aspect_ratio": "16:9",
"duration": 5,
"audio": "native",
"multi_shot": false
},
"options": {
"callback_url": "",
"external_task_id": ""
}
}'

The response returns a task object with id and status. settings.audio accepts native or off; duration is an integer in seconds (3–15 on the current video line); multi_shot: true lets the model plan its own multi-shot transitions, while a custom storyboard uses a shot n, m, words; ... syntax in the prompt where the per-shot durations must sum to the total. The options.callback_url field is optional — if you set it, the server notifies you on status change (protocol in the callback documentation).

Poll for the resultGET /tasks?task_ids=<id> (you can also query by your own external_task_id):

1
2
curl "https://api-singapore.klingai.com/tasks?task_ids=<TASK_ID>" \
-H "Authorization: Bearer $KLING_API_KEY"

A succeeded task returns outputs with the video url (plus watermark_url and duration). Download it promptly: the callback documentation states generated results are cleared after 30 days, and URLs are hotlink-protected.

Python — the same flow with requests. The official docs stop at cURL for the current API, so here is the polling loop you will otherwise write yourself:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import os
import time

import requests

BASE = "https://api-singapore.klingai.com"
HEADERS = {"Authorization": f"Bearer {os.environ['KLING_API_KEY']}"}

def generate_video(prompt, resolution="1080p", duration=5):
r = requests.post(
f"{BASE}/text-to-video/kling-3.0",
headers=HEADERS,
json={
"prompt": prompt,
"settings": {
"resolution": resolution,
"aspect_ratio": "16:9",
"duration": duration,
"audio": "native",
},
},
)
r.raise_for_status()
task_id = r.json()["data"]["id"]
while True:
q = requests.get(f"{BASE}/tasks", headers=HEADERS,
params={"task_ids": task_id})
task = q.json()["data"][0] # current model pages return a bare array
if task["status"] in ("succeeded", "failed"):
return task
time.sleep(10)

task = generate_video("A lighthouse on a rocky coast at dusk, waves breaking")
video_url = task["outputs"][0]["url"] # download before the 30-day retention window ends

Current model pages return data as a bare array of tasks — confirmed on the Kling 3.0/3.0 Omni, 3.0 Turbo, O1, and 2.6 references; the nested data.tasks shape you may see in older examples belongs to legacy model pages. Confirm against the reference for the model you are actually calling. Read the model ID and base URL from configuration, not from hard-coded strings — endpoint paths changed once already in this API’s short life (the domain migration above), and the September 15, 2026 legacy-model retirement (next section) is a reminder that model endpoints get retired, not just added.

Async task flow for the Kling video API: submit a task, poll its status, then download the succeeded output

Figure: the Kling API request pattern — every model is an asynchronous submit-and-poll task, with an optional callback branch. Concept diagram generated for this article.

Kling API pricing, pulled today: units, per-second rates, and what a clip costs

Kling’s API billing is prepaid units, not metered dollars. You buy resource packages on the official pricing page: for video, 1 unit has a $0.14 list price, packages run $700–$8,400, valid 180 days with no rollover, and carry 20 concurrent requests. Image packages use a different unit ($0.0035 list per unit). Each model then deducts units per second of generated video (or per call, for things like video extension), and the official billing reference states the USD conversion alongside the unit figure. The table below is that conversion, pulled from the billing reference on September 8, 2026 — treat it as a same-day snapshot, because Kling adjusts prices without a fixed schedule:

Model (per second unless noted) 720p 1080p 4K
Kling 3.0 Turbo (with native audio) $0.112 $0.14
Kling 3.0 (no native audio) $0.084 $0.112 $0.42
Kling 3.0 (native audio, no voice control) $0.126 $0.168 $0.42
Kling 3.0 Omni (no video input, no native audio) $0.084 $0.112 $0.42
Kling 3.0 Omni (no video input, with native audio) $0.112 $0.14 $0.42
Kling O1 (no video input) $0.084 $0.112
Kling 2.6 (no native audio) $0.042 $0.07
Kling 2.6 (native audio, no voice control) $0.14
Kling 2.5 Turbo (no native audio) $0.042 $0.07
Motion Control $0.126 $0.168
Avatar $0.056 $0.112
Video extension (per call) $0.28 $0.49

A few readings from the table. A 5-second 1080p clip on Kling 3.0 with native audio costs 5 × $0.168 = $0.84; the same clip on 3.0 Turbo costs 5 × $0.14 = $0.70 — which is the “faster and cheaper” claim from the dev home page in numbers. 4K multiplies the bill: Kling 3.0 at 4K is $0.42/second regardless of audio, so a 5-second 4K clip is $2.10. Two further distinctions matter when you compare prices anywhere else:

  • API units ≠ consumer credits. Kling’s consumer product (the web/app generator) sells its own credit packs, explained in Kling’s credit cost guide; those credits are not API resource units and the prices do not transfer. When someone quotes you “Kling pricing,” ask whether they mean API units or consumer credits — the numbers differ by an order of magnitude.
  • Voice control adds a premium on some models. The 2.6 row shows it clearly: with native audio but no voice control, 1080p is $0.14/s; with voice control it is $0.168/s. Check the per-model billing row for the exact feature combination you plan to send.

For a full cost walkthrough across every Kling model, resolution, and clip length — including how these numbers move week to week — our separate Kling API price analysis keeps the complete table; this guide carries the rows you need to budget a first integration. If you are comparing against the consumer subscription instead, our Kling AI pricing-per-month breakdown covers that side of the ledger.

Calling Kling through an aggregator: one key vs the official platform

Everything above is the official route and works on its own. The aggregator route exists for a different situation: you want Kling and several other vendors’ generation models behind one key, one billing account, and one request pattern — without buying a separate prepaid resource package per vendor. This is what Modellix does, and a disclosure belongs here: Modellix operates this blog and has a commercial interest in you using its API. Treat the numbers below as a same-day snapshot of Modellix’s own model page, not a standing claim about any aggregator (the same single-key pattern exists at other platforms with their own catalogs and price lists).

Modellix lists Kling models under its Kling provider page with per-second, pay-as-you-go pricing — no prepaid unit packages, no 180-day validity window. Its kling-v3-t2v model page, pulled September 8, 2026, quotes the flagship text-to-video tier against the official list price (official figures from the billing reference above):

Route (per second) 720p 1080p 4K
Kling official — 3.0, no native audio $0.084 $0.112 $0.42
Kling official — 3.0, native audio $0.126 $0.168 $0.42
Modellix kling-v3-t2v, audio off $0.0672 $0.0896 $0.336
Modellix kling-v3-t2v, audio native $0.1008 $0.1344 $0.336

On the day we checked, every Modellix row is exactly 20% under the matching official list price — the result of Modellix pricing against list and passing its own margin on unit-cost terms, not a promotional discount. It is a snapshot, not a promise: both pages change without notice, so re-verify before you commit a budget. Calling through Modellix follows one async pattern for every vendor (submit task, poll, download — the same shape as the official flow above) on api.modellix.ai; the Modellix API documentation and each model page carry the exact route and schema. Modellix also documents the model-catalog trade-offs of the gateway approach in our unified AI API explainer.

When the official route is the right call: you need Kling’s enterprise terms or dedicated support (its dev platform sells an enterprise plan separately from the API service); your workload is region-locked to mainland-China infrastructure (the Singapore API domain is explicitly for servers outside China); you want the newest model IDs the day they launch, which land on Kling’s API before any reseller; or Kling is core to your product and you want the direct relationship and its 20-concurrency headroom without a middle layer. Aggregators shine when Kling is one model among many in a pipeline, or when you want per-call cash billing instead of committing to a prepaid unit package up front.

Two routes to the Kling API: official platform with key and packages, or one aggregator key reaching Kling and other models

Figure: the choice this guide exists for — Kling’s own prepaid platform vs one key across many vendors. Concept diagram generated for this article.

Kling on the Modellix REST API

Browse the live model pages, request schemas, and per-call pricing for the full Kling family on one Modellix key.

View Docs

Documentation gaps, version traps, and what to watch in 2026

Reading the official Kling API docs is easier when you know what they do not tell you up front:

  • A formal retirement is scheduled for September 15, 2026. The authentication page carries an advance notice (at the time of writing) that legacy models will be retired on that date: Kling Image 1.0/1.5/2.0/2.0 New, Kling Video 1.0/1.5/1.6/2.0 Master/2.1/2.1 Master, the Virtual Try-On API, and 119 video-effect templates. If any tutorial you are reading centers on those model names, its endpoint will stop answering in days, not months — migrate to the 3.x/Omni line it recommends.
  • Generated results expire. Outputs are cleared 30 days after generation and URLs are hotlink-protected. Download results as part of your pipeline; do not treat the returned URL as durable storage.
  • The API host has already moved once. api.klingai.comapi-singapore.klingai.com (for servers outside China). Old code samples — and old copies of the docs — still point at the old host.
  • No official SDK for the current API. The docs ship cURL examples and a Python JWT snippet for the legacy AccessKey scheme only. For the current API-key design you bring your own HTTP client; the polling loop in the previous section is the part everyone re-implements.
  • There is no PDF of the documentation. The docs are a rendered web reference; the “-pdf” search variant mostly lands on community snapshots, which is another reason to prefer the live pages.
  • Error handling is documented per page, not centralized. Error codes live under Get Started and each API reference’s response section; the common shape is a code/message envelope with task-level failed states carrying the human-readable reason.

Frequently Asked Questions

Is there an official PDF of the Kling API documentation?

No. The documentation is a web reference on kling.ai/document-api; the “kling api documentation pdf” results you may see are community snapshots (some discontinued) that drift out of date. Use the live pages and check the model list for the endpoint you need.

Does Kling have an official Python SDK?

Not for the current API-key design. Official examples are cURL for the current API and a Python JWT snippet for the legacy AccessKey/SecretKey scheme. The current API is plain REST, so any HTTP client works — the async submit-and-poll pattern in this guide is the part to copy.

Is the Kling API free to try?

Kling sells prepaid resource packages for the API and mentions a trial resource package for integration testing in its quick start. Whether a trial is currently available to new accounts, and what it includes, is shown in the console when you log in — there is no published always-on free tier for the API. Separately, Kling’s consumer product gives away credits through promotions; those are not API units.

What is the difference between kling.ai and klingai.com documentation?

They are the same documentation family: kling.ai/document-api is the English developer-platform copy, klingai.com/document-api is the Chinese open-platform mirror (some of its pages render as navigation shells without body content). Neither is a different API — the API host is the same. Prefer the English copy for integration work, and do not treat community GitHub copies as authoritative.

How long does it take to make the first Kling API call?

Account + resource package + API key take minutes once you are signed in; the first successful video then depends on queue time. The realistic “hello world” path — register, buy the smallest package or trial, create a key, run the cURL submit, poll to succeeded — fits in an afternoon including reading this guide.

How long are generated videos kept?

30 days. The callback documentation states generated results are cleared after that window and URLs are hotlink-protected, so download outputs as part of your normal flow.

Is Kling 3.0 Turbo cheaper than Kling 3.0?

Per second, yes, at the resolutions both support: 3.0 Turbo with native audio is $0.112/s at 720p and $0.14/s at 1080p, versus $0.126 and $0.168 for Kling 3.0 with native audio. Turbo has no 4K row; Kling 3.0 tops out at $0.42/s at 4K.


Kling model status and pricing reflect public information as of September 8, 2026 and change without notice — the September 15, 2026 legacy-model retirement, the API domain migration, and per-model unit prices are all moving targets, so validate against kling.ai’s own billing reference and the specific provider’s live model page before committing budget. This article was written by Modellix, an API aggregator with a commercial interest in the single-key route it describes; the official Kling integration material above is vendor-neutral, and the Modellix prices quoted are a same-day snapshot rather than a standing claim. Access 210+ image, video, and audio models through one API key at modellix.ai.