klingai-team-setup
Configures Kling AI for teams with per-project API keys, usage quotas, and role-based access management.
Install
mkdir -p .claude/skills/klingai-team-setup && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/8651" && unzip -o skill.zip -d .claude/skills/klingai-team-setup && rm skill.zipInstalls to .claude/skills/klingai-team-setup
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Configure Kling AI for teams with per-project API keys, usage quotas,Key capabilities
- →Configure separate API keys for different environments
- →Define team members with roles and credit limits
- →Enforce per-member and team-wide credit limits
- →Authorize user actions based on allowed models
- →Generate team usage reports
How it works
The skill manages team access to the Kling AI API by configuring environment-specific API keys, defining member roles and credit limits, and enforcing usage quotas.
Inputs & outputs
When to use klingai-team-setup
- →Set up separate API keys for development and production
- →Define team roles and daily credit limits
- →Implement multi-user access control
- →Configure project-specific environment variables
About this skill
Kling AI Team Setup
Overview
Manage team access to the Kling AI API using separate API keys, environment-based routing, usage quotas per team member, and centralized credential management.
Per-Environment API Keys
Create separate API key pairs in the Kling AI developer console for each environment:
| Environment | Key Naming Convention | Purpose |
|---|---|---|
| Development | dev-<project> | Local testing, free tier |
| Staging | staging-<project> | Integration testing |
| Production | prod-<project> | Live traffic |
# .env.development
KLING_ACCESS_KEY="ak_dev_..."
KLING_SECRET_KEY="sk_dev_..."
# .env.production
KLING_ACCESS_KEY="ak_prod_..."
KLING_SECRET_KEY="sk_prod_..."
Team Configuration
from dataclasses import dataclass
from typing import Optional
@dataclass
class TeamMember:
name: str
email: str
role: str # admin, editor, viewer
daily_credit_limit: int
allowed_models: list[str]
@dataclass
class TeamConfig:
name: str
members: list[TeamMember]
total_daily_limit: int = 1000
default_model: str = "kling-v2-master"
default_mode: str = "standard"
def get_member(self, email: str) -> Optional[TeamMember]:
return next((m for m in self.members if m.email == email), None)
# Example team configuration
team = TeamConfig(
name="marketing",
total_daily_limit=5000,
members=[
TeamMember("Alice", "[email protected]", "admin", 2000,
["kling-v2-6", "kling-v2-master", "kling-v2-5-turbo"]),
TeamMember("Bob", "[email protected]", "editor", 500,
["kling-v2-master", "kling-v2-5-turbo"]),
TeamMember("Carol", "[email protected]", "viewer", 100,
["kling-v2-5-turbo"]),
],
)
Usage Quotas Per Member
import time
from collections import defaultdict
class TeamQuotaManager:
"""Enforce per-member and team-wide credit limits."""
def __init__(self, config: TeamConfig):
self.config = config
self._usage = defaultdict(int) # email -> credits used today
self._reset_time = time.time()
def _check_reset(self):
if time.time() - self._reset_time > 86400:
self._usage.clear()
self._reset_time = time.time()
def authorize(self, email: str, credits_needed: int, model: str) -> bool:
self._check_reset()
member = self.config.get_member(email)
if not member:
raise PermissionError(f"Unknown user: {email}")
if model not in member.allowed_models:
raise PermissionError(f"{email} not authorized for {model}")
if self._usage[email] + credits_needed > member.daily_credit_limit:
raise RuntimeError(f"{email} exceeds daily limit "
f"({self._usage[email]} + {credits_needed} > {member.daily_credit_limit})")
team_total = sum(self._usage.values()) + credits_needed
if team_total > self.config.total_daily_limit:
raise RuntimeError(f"Team daily limit exceeded ({team_total} > {self.config.total_daily_limit})")
return True
def record_usage(self, email: str, credits: int):
self._usage[email] += credits
def usage_report(self) -> dict:
return {
"team_total": sum(self._usage.values()),
"team_limit": self.config.total_daily_limit,
"by_member": dict(self._usage),
}
Secrets Management
| Tool | How to Store AK/SK |
|---|---|
| AWS Secrets Manager | aws secretsmanager create-secret --name kling/prod |
| GCP Secret Manager | gcloud secrets create kling-prod |
| HashiCorp Vault | vault kv put secret/kling ak=... sk=... |
| 1Password CLI | op item create --category login --title "Kling API" |
# Load from AWS Secrets Manager
import boto3
import json
def get_kling_credentials(secret_name="kling/prod"):
client = boto3.client("secretsmanager")
secret = client.get_secret_value(SecretId=secret_name)
creds = json.loads(secret["SecretString"])
return creds["access_key"], creds["secret_key"]
Access Control Wrapper
class TeamKlingClient:
"""Kling client with team-level access control."""
def __init__(self, base_client, quota_manager: TeamQuotaManager):
self.client = base_client
self.quotas = quota_manager
def text_to_video(self, email: str, prompt: str, **kwargs):
model = kwargs.get("model", "kling-v2-master")
credits = 10 if kwargs.get("mode") != "professional" else 35
self.quotas.authorize(email, credits, model)
result = self.client.text_to_video(prompt, **kwargs)
self.quotas.record_usage(email, credits)
return result
Resources
How it compares
This skill provides structured team access control and quota management for Kling AI, which is more organized than individual, unmanaged API key usage.
Compared to similar skills
klingai-team-setup side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| klingai-team-setup (this skill) | 0 | 27d | Review | Intermediate |
| mcp-builder | 136 | 3mo | Review | Advanced |
| swarm-advanced | 7 | 4mo | Review | Advanced |
| agentdb-memory-patterns | 9 | 9mo | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by jeremylongshore
View all by jeremylongshore →You might also like
mcp-builder
anthropics
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
swarm-advanced
ruvnet
Advanced swarm orchestration patterns for research, development, testing, and complex distributed workflows
agentdb-memory-patterns
ruvnet
Implement persistent memory patterns for AI agents using AgentDB. Includes session memory, long-term storage, pattern learning, and context management. Use when building stateful agents, chat systems, or intelligent assistants.
agentdb-advanced-features
ruvnet
Master advanced AgentDB features including QUIC synchronization, multi-database management, custom distance metrics, hybrid search, and distributed systems integration. Use when building distributed AI systems, multi-agent coordination, or advanced vector search applications.
reasoningbank-with-agentdb
ruvnet
Implement ReasoningBank adaptive learning with AgentDB's 150x faster vector database. Includes trajectory tracking, verdict judgment, memory distillation, and pattern recognition. Use when building self-learning agents, optimizing decision-making, or implementing experience replay systems.
ollama-setup
jeremylongshore
Configure auto-configure Ollama when user needs local LLM deployment, free AI alternatives, or wants to eliminate hosted API costs. Trigger phrases: "install ollama", "local AI", "free LLM", "self-hosted AI", "replace OpenAI", "no API costs". Use when appropriate context detected. Trigger with relevant phrases based on skill purpose.