Key limit is a reactive alert that fires when an API key’s usage reaches a configured percentage of its period limit. Unlike the predictive key exhaustion warning, which forecasts when a key will hit its cap based on burn rate, key limit fires the moment usage crosses the percentage threshold you set.Documentation Index
Fetch the complete documentation index at: https://concentrate.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
How it works
Key limit is evaluated reactively on incoming API requests rather than on a scheduled cycle. When a request authenticated with an API key is received:- Reads the key’s current period usage —
credits.period.usedandcredits.period.limitfrom the key record - Skips keys with no period limit — if the limit is null or zero, there is nothing to measure against
- Calculates the usage percentage —
(periodUsed / periodLimit) * 100 - Compares against your threshold — if usage percentage is less than
threshold_percentage, no alert is fired - Triggers the alert when usage is at or above the threshold
Configuration
You can configure key limit alerts from the Alerts page in your dashboard.| Setting | Description | Options |
|---|---|---|
| Enabled | Toggle the alert on or off | true / false |
| Threshold Percentage | Percentage of the period limit at which the alert fires | Any value between 0 and 100 (e.g., 80) |
Key limit and key exhaustion warning complement each other. Key limit fires when usage crosses a percentage threshold right now. Key exhaustion forecasts when a key will hit its cap based on burn rate. Consider enabling both for comprehensive coverage.
Edge cases
No period limit set
Keys without a period limit (null or zero) are never evaluated — there is no cap to measure usage against. Set a period limit on the key to enable this alert.No active requests
Because key limit is reactive, it only evaluates when a request is made with the key. If the key is idle, the alert will not fire even if cumulative usage is already over the threshold. The next request with the key will trigger evaluation.Notifications
When a key limit alert fires, you are notified via your configured channels:- Email — includes the current usage percentage, a visual usage bar, and a link to manage your keys
- SMS — a shorter summary with the usage percentage