Key exhaustion warning is a predictive alert that estimates when an API key will hit its period usage limit based on its current burn rate. Unlike the reactive key limit alert which fires when usage crosses a percentage threshold, this alert forecasts exhaustion ahead of time so you can act before it happens.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
Each evaluation cycle:- 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 exhaust
- Queries the last 7 days of billing data for the key from
billing_daily - Calculates the average hourly burn rate — total credits consumed over the period divided by total hours
- Estimates hours remaining —
(periodLimit - periodUsed) / burnRatePerHour - Compares against your threshold — if estimated hours remaining is less than
hours_threshold, an alert is triggered
Configuration
You can configure key exhaustion alerts from the Alerts page in your dashboard.| Setting | Description | Options |
|---|---|---|
| Enabled | Toggle the alert on or off | true / false |
| Hours Threshold | Alert when estimated hours remaining drops below this | Any positive number (e.g., 24 for 1-day warning) |
| Scope | What entities to monitor | user, key |
Scope
- User — monitors all API keys you own, evaluated as a group at the user level.
- Key — monitors each of your active API keys individually. Each key is evaluated independently against its own period limit and burn rate.
Edge cases
Zero burn rate
If a key has had no usage in the last 7 days, the burn rate is zero and no alert is fired — there is no basis to predict exhaustion.High burn rate
Keys with very high burn rates may show only a few hours (or less) of remaining time. The alert fires as long as the estimate is below your threshold, even if the key is predicted to exhaust within minutes.Notifications
When a key exhaustion alert fires, you are notified via your configured channels:- Email — includes the key name, current usage, period limit, estimated hours remaining, and burn rate
- SMS — a shorter summary with the key name and estimated hours remaining