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.
Endpoints
Section titled “Endpoints”| Method | Path | Purpose |
|---|---|---|
GET | /km/api/models | List models exposed to Key-Manager-issued keys, with recommendation ordering. |
GET | /km/api/budget | Current allocated / used / remaining budget and active key counts. |
POST | /km/api/keys | Create a temporary key with a budget, duration and rate limit. |
POST | /km/api/keys/status | Look up the status of one or more keys. |
curl https://aiapiv2.pekpik.com/km/api/budget \ -H "Authorization: Bearer $KM_ADMIN_TOKEN"Temporary key properties
Section titled “Temporary key properties”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.