Skip to content

Temporary keys (Key Manager)

The Key Manager lets you mint short-lived, budget- and rate-limited API keys on demand — ideal for trials, per-user sandboxes, or distributing access without sharing your main key. It is served under /km on the same domain.

https://aiapiv2.pekpik.com/km/api/...

Key Manager admin endpoints require an admin token (separate from your usual sk-... API key). Request one from sales.

MethodPathPurpose
GET/km/api/modelsList models exposed to Key-Manager-issued keys, with recommendation ordering.
GET/km/api/budgetCurrent allocated / used / remaining budget and active key counts.
POST/km/api/keysCreate a temporary key with a budget, duration and rate limit.
POST/km/api/keys/statusLook up the status of one or more keys.
Terminal window
curl https://aiapiv2.pekpik.com/km/api/budget \
-H "Authorization: Bearer $KM_ADMIN_TOKEN"

Created keys are bounded by server-side limits, typically:

  • Budget cap per key (USD).
  • Duration (the key expires automatically).
  • Rate limit (RPM).

Expired keys are cleaned up automatically. Use /km/api/keys/status to check whether a key is active, expired, or unknown.