Skip to main content

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.

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.

How it works

Each evaluation cycle:
  1. Reads the key’s current period usagecredits.period.used and credits.period.limit from the key record
  2. Skips keys with no period limit — if the limit is null or zero, there is nothing to exhaust
  3. Queries the last 7 days of billing data for the key from billing_daily
  4. Calculates the average hourly burn rate — total credits consumed over the period divided by total hours
  5. Estimates hours remaining(periodLimit - periodUsed) / burnRatePerHour
  6. 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.
SettingDescriptionOptions
EnabledToggle the alert on or offtrue / false
Hours ThresholdAlert when estimated hours remaining drops below thisAny positive number (e.g., 24 for 1-day warning)
ScopeWhat entities to monitoruser, 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
Each key is subject to a 24-hour cooldown after an alert fires.