Kling Effects API
136+ creative video effects including holiday themes, dynamic effects, and style transforms. Apply effects to photos for stunning video output.
Quick Start
Authentication
Add Authorization header with Bearer token to all requests:
Authorization: Bearer YOUR_API_KEY
Available Model
| Model | API Name | Features |
|---|---|---|
| Kling Effects | kling-effects | 136+ creative video effects, single & dual person support |
Pricing (up to 60% off)
| Category | $ | Examples |
|---|---|---|
| Ultra Low | $0.0110 | pet_lion, pet_cat, pet_dog |
| Low | $0.0190 | santa_gift |
| Medium (base) | $0.0220 | santa_express, balloon_parade |
| Medium-High | $0.0380 | bloombloom, dizzydizzy, face_warp |
| High | $0.0430 | happy_birthday, birthday_cake |
| Ultra High | $0.0750 | bullet_time |
Endpoints
/api/v1/video/generationsCreate a Kling effects video generation task. Applies a creative effect to one or two person photos.
/api/v1/video/generations?task_id=xxxQuery task status and get video URL
Request Parameters
input Object Fields
Code Examples
curl -X POST https://api.apimodels.app/v1/video/generations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-effects",
"effect_scene": "balloon_parade",
"input": {
"image": "https://example.com/person.jpg"
}
}'Response Format
Create Task Response
{
"code": 200,
"msg": "success",
"data": {
"taskId": "clxxx...",
"state": "pending",
"model": "kling-video/kling-effects"
}
}Success Response
{
"code": 200,
"msg": "success",
"data": {
"taskId": "clxxx...",
"state": "completed",
"model": "kling-video/kling-effects",
"resultUrls": ["https://...video.mp4"],
"createTime": 1705123450000,
"completeTime": 1705123500000
}
}Failed Response
{
"code": 200,
"msg": "success",
"data": {
"taskId": "clxxx...",
"state": "failed",
"model": "kling-video/kling-effects",
"failMsg": "Content policy violation"
}
}Webhook Callback (callback_url)
Pass callback_url in the create request. When the task reaches the completed or failed terminal state, our server sends a single HTTP POST to that URL with Content-Type: application/json (no signing header). Delivery is retried up to 3 times (exponential backoff 1s/2s/4s, 10s per attempt); if still unsuccessful, a background job keeps retrying for up to 30 minutes until your endpoint returns 2xx.
Payload Structure
POST {your callback_url}
Content-Type: application/json
{
"code": 200,
"msg": "success",
"data": {
"taskId": "clxxx...",
"model": "kling-video/kling-effects",
"state": "completed" | "failed",
"param": "<JSON string>", // request params, JSON.parse once
"resultJson": "<JSON string> | null", // result object, JSON.parse once
"failCode": null | "CONTENT_MODERATION | INVALID_INPUT | INSUFFICIENT_BALANCE | UPSTREAM_BUSY | UPSTREAM_FAILED | TIMEOUT | INTERNAL_ERROR | OTHER",
"failMsg": null | "string",
"retryable": true | false, // present when state=failed: safe to retry/fallback
"costTime": 12345, // duration in ms
"completeTime": 1705123500000, // ms epoch
"createTime": 1705123450000 // ms epoch
}
}Note: data.param and data.resultJson are both JSON strings — call JSON.parse once on each.
Video task: shape after JSON.parse(data.resultJson)
{
"resultUrls": ["https://r2.apimodels.app/videos/xxx.mp4"],
"videoDuration": 5 // optional, seconds
}resultUrls is always present (length 1 in success, [] on failure). Other fields are optional. When state=failed, resultJson is typically null or {"resultUrls":[]}.
Node.js receiver example
app.post('/webhook/kling-effects', express.json(), (req, res) => {
const { taskId, state, resultJson, failMsg } = req.body.data
if (state === 'completed') {
const r = JSON.parse(resultJson)
console.log('video ready', taskId, r.resultUrls[0], r.videoDuration)
} else {
console.warn('video failed', taskId, failMsg)
}
res.status(200).end() // must be 2xx, otherwise we retry
})Notes
- -A task stops retrying only after a 2xx response — once delivered it is never pushed again.
- -Callbacks are not signed today. Embed a random token in your callback_url path and verify it on receipt.
- -Effects video jobs typically take 30s to several minutes — strongly prefer callback_url over polling.
- -Use a public HTTPS endpoint that responds within 10 seconds (per-attempt timeout).
Task States
pendingTask queued, waiting to processprocessingVideo is being generatedcompletedVideo generation successfulfailedVideo generation failedError Codes
400Bad Request - Missing or invalid parameters401Unauthorized - Invalid API key402Payment Required - Insufficient credits404Not Found - Task ID not found500Internal Server ErrorImportant Notes
- *Video files are stored for 30 days, download promptly
- *136+ effects available across holiday, dynamic, and style categories
- *Single-person effects use the "image" field, dual-person effects use the "images" array
- *Pricing varies by effect category, from $0.0110 to $0.0750
- *Poll every 5-10 seconds to check status
- *Effect scene names are case-sensitive
FAQ
How do Kling video effects work?
Pick a preset effect and pass an input image/video; the API returns a video with the effect applied. One key, per-clip pricing, charged only on success.