Skip to content

Temporary keys (Key Manager)

The Key Manager lets you mint short-lived, scoped 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 through the project channels when you need this workflow.

MethodPathPurpose
GET/km/api/modelsList models exposed to Key-Manager-issued keys, with recommendation ordering.
GET/km/api/budgetCurrent allocation, usage and active key counts.
POST/km/api/keysCreate a temporary key with duration and rate controls.
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:

  • Usage cap per key.
  • 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.