API keys and usage
API keys let your own code spend your kral credit. The dashboard gives you two tools to keep that under control: per-key limits and a complete usage log.
Creating a key
Under API keys, click Create API key and give the key a name. The plain-text key, starting with sk-kral-, is shown exactly once at creation; store it in your secret manager right then. Afterwards the dashboard only shows the prefix.
The practical pattern is one key per project or environment. When something misbehaves, you can see which key it was and act on just that one.
Per-key spend limits
Each key can carry its own daily, monthly, and total spend limit. Daily and monthly limits reset automatically (UTC); the total limit never resets and acts as a hard lifetime budget for the key. At 75 percent of a daily or monthly limit you get a warning, by email and in the dashboard, so you can react before anything stops. At 100 percent of any limit, requests on that key are rejected until the period rolls over or you raise the limit; the rest of your account is unaffected.
This is the safety net for a bug that loops, or a side project that should never cost more than a few euros. The daily limit is the one that caps the blast radius: a runaway integration can burn a monthly budget overnight, but never more than one day's cap.
Scoping a key
Beyond spend limits, a key can be narrowed down to exactly what its consumer needs:
- Model allowlist: restrict the key to specific models. A support chatbot that only ever needs one small model cannot suddenly run your most expensive one.
- Rate limit: a per-key requests-per-minute cap, independent of your account-wide limits.
- Expiry date: the key switches itself off at the end of that day. Handy for trials, contractors, and rotation policies.
All of this is enforced at the gateway, so it holds no matter where the key is embedded.
Per-key usage
Each row on the API keys page expands into a 30-day chart of that key's cost and request count. The Show usage action jumps to the usage log pre-filtered to that key for the full request-by-request view.
Disabling and rotating
Keys can be disabled instantly and re-enabled later, without touching code that holds other keys. To rotate, create the new key first, deploy it, then delete the old one: deletion is immediate and permanent.
Provisioning keys
A provisioning key is a special key that manages your other keys through the key management API (create, update, disable, delete) but cannot call models itself. Platforms use it to issue one key per customer automatically. Create one by ticking the provisioning option in the create dialog.
The usage log
The Usage page lists every request on your account: timestamp, model, input and output tokens, exact cost, and where it came from. The source column shows the API key's name, or Web for requests made in the chat app. Filter by source or model to see what a project really costs. The same numbers drive your balance, so the log and your credit always agree.
Connecting
Base URL, code samples, and the full endpoint list are in the API quickstart and Endpoints.