Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Configures callback_url webhooks so Kling AI POSTs video task results on completion, replacing status polling.
78% 100%+22 ptsof test cases passed
Passed 23 of 23 test cases with the skill, and 18 of 23 without it.
Our devops team is configuring timeout policies for our HTTP proxy in front of our Kling AI webhook receiver. What is the maximum response time limit within which our webhook server must return a 2xx status code to Kling AI before Kling considers the request timed out?
The response specifies a maximum timeout limit of 5 seconds.
This test ran on v1. v2 is the current version and hasn’t been tested on gemini-3.6-flash yet.
3 of 3 safety checks passed
Instead of polling task status, pass a callback_url when creating a task. Kling AI will POST the completed task result to your URL when generation finishes. This eliminates polling overhead and reduces API calls.
Supported on: All video generation endpoints (text2video, image2video, video-extend, lip-sync, effects)
callback_url in your task creation requestsucceed or failed), Kling POSTs the full result to your URLimport jwt, time, os, requests
BASE = "https://api.klingai.com/v1"
def get_headers():
ak, sk = os.environ["KLING_ACCESS_KEY"], os.environ["KLING_SECRET_KEY"]
token = jwt.encode(
{"iss": ak, "exp": int(time.time()) + 1800, "nbf": int(time.time()) - 5},
sk, algorithm="HS256", headers={"alg": "HS256", "typ": "JWT"}
)
return {"Authorization": f"Bearer {token}", "Content-Type": "application/json"}
# Create task with callback
response = requests.post(f"{BASE}/videos/text2video", headers=get_headers(), json={
"model_name": "kling-v2-master",
"prompt": "A futuristic city skyline at night with neon lights",
"duration": "5",
"mode": "standard",
"callback_url": "https://your-app.com/webhooks/kling", # your endpoint
})
task_id = response.json()["data"]["task_id"]
Next to this one in the catalogue, plus more from the same author.