API Overview
One key, every Kling model — async video generation over plain HTTP, with CDN-hosted results.
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. When a new Kling generation ships, your integration changes that one field.
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
Every browser guest gets one free generation per UTC day. Approved API keys use the quota assigned to that workspace. When the day's generation is used, job creation returns 429 DAILY_QUOTA_USED (details in Errors). For higher volume, contact us.