Watched our AI model hit 40,000 API calls in a single day and my gut dropped
Last Tuesday I checked our usage dashboard and we went from about 2,000 calls a day to just over 40,000 in one jump, all from a new feature a teammate shipped without telling anyone. At first I figured our key leaked somewhere and spent two hours digging through logs in a panic. Turns out it was fine, just a retry loop someone forgot to cap, but it put us at $610 in overage fees before I caught it. If you're letting anyone on your team touch prompts or model calls, check your spend limits today. How are you all keeping an eye on sudden usage spikes, or is it just me refreshing a dashboard at 11pm?
Retry loops are the worst because they look harmless in code review and then quietly eat your whole budget overnight. Setting a hard cap per day per key would've caught that in minutes instead of hours, so maybe push for that before the next feature ships.
Ugh, yes, been there. We had a retry loop on a webhook worker that looked totally fine in review, and it kept hammering a dead endpoint all weekend. Nobody noticed until the on-call guy got paged for spend at like 3am. The sad part is a simple daily cap would've stopped it cold, but we only thought of that after. So yeah, get that cap in before the next thing ships, it's way cheaper than the 3am page.