Managing keys
Two surfaces, same underlying API (the management key speaks to the proxy directly).
Option 1: Dashboard UI
- Create modal —
key_aliasrequired; optionalmax_budget,budget_duration(30d/1d/1h),rpm_limit,tpm_limit,models(comma list, empty = all). Showscurlpreview. - Copy once — the raw
sk-…is shown a single time. - Inline edit — alias, budget, duration, RPM/TPM via
POST /key/update. - Delete — confirmation via
POST /key/delete. - Search — exact, case-sensitive alias search via
GET /key/list?key_alias=…. Pagination viatotal_count/total_pages. - Status —
active/blockedderived from the key state.
Option 2: Programmatic — management key
Get your management key from the dashboard (Team API key). Keep it on the server — never ship it to the browser.
Base PROXY_URL is https://proxy.klunqlabs.com. The proxy is LiteLLM-based with custom hooks and guardrails, so the management key exposes only a documented subset (the key/spend routes listed in API reference) — not the full upstream LiteLLM surface.
TEAM_MGMT_KEY="sk-..." # from dashboard
# Create
curl -X POST "$PROXY_URL/key/generate" \
-H "Authorization: Bearer $TEAM_MGMT_KEY" \
-H "Content-Type: application/json" \
-d '{"key_alias":"vkey-landing","models":["gemma4"],"max_budget":2,"budget_duration":"30d"}'
# → { "key": "sk-…", "token_id": "…", "max_budget": 2 }
# List (all keys for your team)
curl -G "$PROXY_URL/key/list" -H "Authorization: Bearer $TEAM_MGMT_KEY"
# → { "keys": [...], "total_count": 42 }
# Filter by exact alias
curl -G "$PROXY_URL/key/list" -H "Authorization: Bearer $TEAM_MGMT_KEY" --data-urlencode "key_alias=vkey-landing"
# Info — use the sk-… value
curl -G "$PROXY_URL/key/info" -H "Authorization: Bearer $TEAM_MGMT_KEY" --data-urlencode "key=$VKEY"
# Update
curl -X POST "$PROXY_URL/key/update" -H "Authorization: Bearer $TEAM_MGMT_KEY" -H "Content-Type: application/json" -d '{"key":"sk-…","key_alias":"vkey-updated"}'
# Delete
curl -X POST "$PROXY_URL/key/delete" -H "Authorization: Bearer $TEAM_MGMT_KEY" -H "Content-Type: application/json" -d '{"keys":["sk-…"]}'
# → subsequent GET /key/info?key=sk-… → 404 No key
Rules
key_aliasis required and must be non-empty on create and update.- v-keys cannot call management routes (
POST /team/newwith a v-key →401/403). They are inference-only.
Choosing models, rpm_limit, tpm_limit
Leave models empty for all curated models. Restrict per key when needed. Rate limits are optional per-key caps.
Next: API reference for status codes and full endpoint tables