klingai-debug-bundle

Featured

Set up logging and debugging for Kling AI API integrations. Use when troubleshooting video generation or building observability. Trigger with phrases like 'klingai debug', 'kling ai logging', 'klingai troubleshoot', 'debug kling video generation'.

AI & Automation 2,926 stars 433 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Kling AI Debug Bundle ## Overview Structured logging, request tracing, and diagnostic tools for Kling AI API integrations. Captures request/response pairs, task lifecycle events, and timing metrics for every call to `https://api.klingai.com/v1`. ## Debug-Enabled Client ```python import jwt, time, os, requests, logging, json from datetime import datetime logging.basicConfig( level=logging.DEBUG, format="%(asctime)s [%(levelname)s] %(name)s: %(message)s" ) logger = logging.getLogger("kling.debug") class KlingDebugClient: """Kling AI client with full request/response logging.""" BASE = "https://api.klingai.com/v1" def __init__(self): self.ak = os.environ["KLING_ACCESS_KEY"] self.sk = os.environ["KLING_SECRET_KEY"] self._request_log = [] def _get_headers(self): token = jwt.encode( {"iss": self.ak, "exp": int(time.time()) + 1800, "nbf": int(time.time()) - 5}, self.sk, algorithm="HS256", headers={"alg": "HS256", "typ": "JWT"} ) return {"Authorization": f"Bearer {token}", "Content-Type": "application/json"} def _traced_request(self, method, path, body=None): """Execute request with full tracing.""" url = f"{self.BASE}{path}" start = time.monotonic() trace = { "timestamp": datetime.utcnow().isoformat(), "method": method, "path": path, "request_body": body, } try: if ...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category