klingai-install-auth

Featured

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'.

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 Install & Auth ## Overview Kling AI uses JWT (JSON Web Token) authentication. You generate a token from your Access Key (AK) and Secret Key (SK), then pass it as a Bearer token in every request. Tokens expire after 30 minutes. **Base URL:** `https://api.klingai.com/v1` ## Prerequisites - Kling AI account at [klingai.com](https://klingai.com) - API access enabled (self-service, no waitlist) - Python 3.8+ with `PyJWT` or Node.js 18+ ## Step 1 — Get Credentials 1. Sign in at [app.klingai.com/global/dev](https://app.klingai.com/global/dev) 2. Navigate to **API Keys** in the developer console 3. Click **Create API Key** to generate an Access Key + Secret Key pair 4. Store both values securely — the Secret Key is shown only once ```bash # .env file KLING_ACCESS_KEY="ak_your_access_key_here" KLING_SECRET_KEY="sk_your_secret_key_here" ``` ## Step 2 — Generate JWT Token ### Python ```python import jwt import time import os def generate_kling_token(): """Generate a JWT token for Kling AI API authentication.""" ak = os.environ["KLING_ACCESS_KEY"] sk = os.environ["KLING_SECRET_KEY"] headers = {"alg": "HS256", "typ": "JWT"} payload = { "iss": ak, "exp": int(time.time()) + 1800, # 30 min expiry "nbf": int(time.time()) - 5, # valid 5s ago (clock skew) } return jwt.encode(payload, sk, algorithm="HS256", headers=headers) token = generate_kling_token() # Use: Authorization: Bearer <token> ``` ### Node.js ```ja...

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