| name | klingai-rate-limits |
| description | Handle Kling AI API rate limits with backoff and queuing strategies. Use when hitting 429 errors
or planning high-volume workflows. Trigger with phrases like 'klingai rate limit', 'kling ai 429',
'klingai throttle', 'kling api limits'.
|
| allowed-tools | Read, Write, Edit, Bash(npm:*), Grep |
| version | 1.18.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","kling-ai","rate-limits","reliability"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Kling AI Rate Limits
Overview
Kling AI enforces rate limits per API key. When exceeded, the API returns 429 Too Many Requests. This skill covers detection, backoff strategies, request queuing, and concurrent job management.
Rate Limit Tiers
| Tier | Concurrent Tasks | Requests/Min | Notes |
|---|
| Free | 1 | 10 | 66 daily credits cap |
| Standard | 3 | 30 | Per API key |
| Pro | 5 | 60 | Per API key |
| Enterprise | 10+ | Custom | Contact sales |
Exponential Backoff with Jitter
import time, random, requests
def exponential_backoff(attempt: int, base: float = 1.0, max_wait: float = 60.0) -> float:
"""Calculate wait time with jitter to avoid thundering herd."""
wait = min(base * (2 ** attempt), max_wait)
jitter = random.uniform(0, wait * 0.5)
return wait + jitter
def request_with_retry(method, url, headers, json=None, max_retries=5):
for attempt in range(max_retries + 1):
response = method(url, headers=headers, json=json, timeout=30)
if response.status_code == 429:
if attempt == max_retries:
raise RuntimeError()
wait = exponential_backoff(attempt)
()
time.sleep(wait)
response.status_code >= :
attempt == max_retries:
response.raise_for_status()
time.sleep(exponential_backoff(attempt, base=))
response.raise_for_status()
response
RuntimeError()