AI usage is several times its usual level

Token usage for an hour is four to six times what that hour normally sees. Nothing is failing.

Why it happens

Your app is calling the model far more than usual, but nothing is failing: a retry loop that calls the model on every error, a feature that regenerates on every render, or one user running bulk generation. It looks like a loop or a new heavy feature, not an outage.

How to tell

  • Hourly tokens far above the usual for that hour, for two or more hours running.
  • No error spike — the calls succeed.
  • One route, or one user, accounts for most of it.

The fix

  1. Log the route and the user id on every model call, so the spike has a name.
  2. Add a per-user daily cap with a friendly message when it is reached.
  3. Cap retries with backoff, and never retry a 4xx.
  4. Set a monthly limit with the provider as the last line.

The prompt for your builder

Paste this into Lovable, Bolt, Cursor, Claude Code or whatever built the app. Replace anything in capitals. It never asks you to paste a secret into a chat; keys go into your host’s environment, by you.

Prompt for your builder
Add a per-user daily limit of 200 AI requests to my app, return a friendly message when it is reached, log the route and user id for every model call so I can see who is using the most, and make sure any retry logic backs off and gives up after three attempts.

How Keelnest catches it

Cost Guard polls usage hourly and compares it with the same hour's usual level; the billed cost arrives daily from the provider and confirms it. Budgets warn at 80% and alert at 100%.

Know the moment this happens.

Keelnest watches your production app every five minutes and tells you in plain English what broke — with the fix. Free for your first app.

Related