API Overview
Legacy public video API: documented model identifiers, asynchronous jobs and result handling. Website Kling 4.0 access is separate.
How it works
The kling-4.ai API is a small REST surface around one idea: you create a generation job, then poll it until the video is ready.
POST /api/ai-video/jobs create a generation job
GET /api/ai-video/jobs/{id} fetch one job (refreshes provider status)
GET /api/ai-video/jobs list your recent jobs
POST /api/ai-video/jobs/sync refresh all of your active jobs at once- Base URL:
https://kling-4.ai - Auth: an approved API key in the
x-api-keyheader — see Authentication - Format: JSON in, JSON out
- Model: the job's
modelfield selects the Kling model — see Models. Website access to Kling 4.0 does not imply API access. This legacy endpoint does not acceptkling-v4; use only documented model identifiers.
Quick start
1. Get a key. API key access is rolling out during v1. Contact us if you need server-side access.
2. Create a job:
curl -X POST 'https://kling-4.ai/api/ai-video/jobs' \
-H 'x-api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model": "kling-v2-6",
"prompt": "A cinematic sunrise over a glass city, slow drone push-in",
"parameters": {
"mode": "std",
"duration": 5,
"aspectRatio": "16:9"
}
}'The response contains the job you'll poll:
{
"job": {
"id": "0b6c2f6e-6d5f-4a4e-9d3e-7c9a1f2b8d41",
"model": "kling-v2-6",
"status": "queued",
"progress": 0,
"resultUrl": null,
"createdAt": "2026-07-09T03:12:45.000Z"
}
}3. Poll until it completes:
curl 'https://kling-4.ai/api/ai-video/jobs/0b6c2f6e-6d5f-4a4e-9d3e-7c9a1f2b8d41' \
-H 'x-api-key: YOUR_API_KEY'When status becomes completed, the job carries a resultUrl (the video file) and a thumbnailUrl. Renders typically take a few minutes; polling every 10–15 seconds is plenty. Note that resultUrl links expire — check resultExpiresAt and download your file promptly.
Runnable Node.js and Python versions of this flow live in our awesome-kling-4 repo on GitHub, alongside a tested prompt library.
Endpoints at a glance
| Endpoint | What it does |
|---|---|
POST /api/ai-video/jobs | Create a generation job from a prompt (+ optional reference images) |
GET /api/ai-video/jobs/{id} | Fetch a single job; refreshes status from the render pipeline |
GET /api/ai-video/jobs | List your 50 most recent jobs |
POST /api/ai-video/jobs/sync | Refresh every queued/processing job in one call |
Quotas
Browser guests can explicitly claim a one-time image credit reward. Video generation requires sign-in. Eligible signed-in users receive a first-sign-in reward instead of that day’s daily reward, then daily rewards on later UTC dates. Each generation must fit the server quote and applicable free-cost limits. Approved API keys use the credits or quota assigned to that workspace. See Errors for insufficient-credit and request validation responses; for higher volume, contact us.