Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Walks through creating, polling and downloading a first Kling AI text-to-video clip via its REST API.
58% 83%+25 ptsof test cases passed
Passed 20 of 24 test cases with the skill, and 14 of 24 without it.
When constructing the JSON body for a Kling AI text-to-video submission in JavaScript, should the property names use camelCase (like `modelName` and `aspectRatio`) or snake_case?
sets model_name to kling-v2-master
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
Generate your first AI video in under 20 lines of code. This skill walks through the complete create-poll-download cycle using the Kling AI REST API.
Base URL: https://api.klingai.com/v1
klingai-install-auth setuprequests and PyJWTimport jwt, time, os, requests
# --- Auth ---
def get_token():
ak = os.environ["KLING_ACCESS_KEY"]
sk = os.environ["KLING_SECRET_KEY"]
payload = {"iss": ak, "exp": int(time.time()) + 1800, "nbf": int(time.time()) - 5}
return jwt.encode(payload, sk, algorithm="HS256",
headers={"alg": "HS256", "typ": "JWT"})
BASE = "https://api.klingai.com/v1"
HEADERS = {"Authorization": f"Bearer {get_token()}", "Content-Type": "application/json"}
# --- Step 1: Create task ---
task = requests.post(f"{BASE}/videos/text2video", headers=HEADERS, json={
"model_name": "kling-v2-master",
"prompt": "A golden retriever running through autumn leaves in slow motion, cinematic lighting",
"duration": "5",
"aspect_ratio": "16:9",
"mode": "standard",
}).json()
task_id = task["data"]["task_id"]
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.