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,266 stars 315 forks Updated today 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
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

klingai-audit-logging

Implement audit logging for Kling AI operations for compliance and security. Use when tracking API usage or preparing for audits. Trigger with phrases like 'klingai audit', 'kling ai audit log', 'klingai compliance log', 'video generation audit trail'.

2,266 Updated today
jeremylongshore
AI & Automation Featured

klingai-usage-analytics

Build usage analytics and reporting for Kling AI video generation. Use when tracking patterns, analyzing costs, or building dashboards. Trigger with phrases like 'klingai analytics', 'kling ai usage report', 'klingai metrics', 'video generation stats'.

2,266 Updated today
jeremylongshore
AI & Automation Featured

klingai-sdk-patterns

Production SDK patterns for Kling AI: client wrapper, retry logic, async polling, and error handling. Use when building robust integrations. Trigger with phrases like 'klingai sdk', 'kling ai client', 'klingai patterns', 'kling ai wrapper'.

2,266 Updated today
jeremylongshore
AI & Automation Featured

klingai-install-auth

Set up Kling AI API authentication with JWT tokens. Use when starting a new Kling AI integration or troubleshooting auth issues. Trigger with phrases like 'kling ai setup', 'klingai api key', 'kling ai authentication', 'configure klingai'.

2,266 Updated today
jeremylongshore
AI & Automation Featured

klingai-common-errors

Diagnose and fix common Kling AI API errors. Use when troubleshooting failed video generation or API issues. Trigger with phrases like 'kling ai error', 'klingai not working', 'fix klingai', 'klingai failed'.

2,266 Updated today
jeremylongshore