Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Submits batches of Kling AI text-to-video requests with rate-limited concurrency, progress tracking, and result collection.
59% 95%+36 ptsof test cases passed
Passed 21 of 22 test cases with the skill, and 13 of 22 without it.
I am extending a cost estimator for Kling AI video generation. When audio output is enabled on a standard 5-second video, how does the credit requirement change compared to video-only? Write the Python calculation logic.
Multiplies 5-second standard video credit cost by 5 when audio is enabled.
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 multiple videos efficiently using controlled parallelism, rate-limit-aware submission, progress tracking, and result collection. All requests go through https://api.klingai.com/v1.
import 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"}
def submit_batch(prompts, model="kling-v2-master", duration="5",
mode="standard", max_concurrent=3, delay=2.0):
"""Submit batch with controlled concurrency and pacing."""
tasks = []
active = []
for i, prompt in enumerate(prompts):
# Wait if at concurrency limit
while len(active) >= max_concurrent:
active = [t for t in active if not check_complete(t["task_id"])]
if len(active) >= max_concurrent:
time.sleep(5)
response = requests.post(f"{BASE}/videos/text2video", headers=get_headers(), json={
"model_name": model,
"prompt": prompt,
"duration": duration,
"mode": mode,
})
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.