Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Documents common Kling AI API integration mistakes with their symptoms, root causes, and fixes.
48% 100%+52 ptsof test cases passed
Passed 23 of 23 test cases with the skill, and 11 of 23 without it.
We are calculating credit budget estimates for Kling AI video generation. For a 5-second video, standard generation costs 10 credits. If the request sets `motion_has_audio: true`, how many credits will be consumed?
Calculates the credit cost as 50 credits.
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
Documented mistakes, gotchas, and anti-patterns from real Kling AI integrations. Each pitfall includes the symptom, root cause, and tested fix.
Symptom: 400 Bad Request on valid-looking requests.
# WRONG -- duration as integer
{"duration": 5}
# CORRECT -- duration as string
{"duration": "5"}
The API requires duration as a string "5" or "10", not an integer.
Symptom: 401 Unauthorized even with correct AK/SK.
# WRONG -- missing headers parameter
token = jwt.encode(payload, sk, algorithm="HS256")
# CORRECT -- explicit JWT headers
token = jwt.encode(payload, sk, algorithm="HS256",
headers={"alg": "HS256", "typ": "JWT"})
Some JWT libraries don't include typ: "JWT" by default. Kling requires it.
Symptom: Works for 30 minutes, then all requests fail with 401.
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.