Hit 10,000 API calls in one day on my side project and felt sick
I run a little trading alert bot with a language model reading news headlines, and I checked my usage page on Tuesday and saw 10,247 calls in 24 hours. That was not a spike from a big news day, that was just my retry loop hammering the endpoint every time the model gave me a weird response. I sat there doing the math on what the next bill looks like and it was over $40 for one day of a bot that 12 people use. Turns out a rate limit error from the provider was making my code resend the same prompt up to 8 times, and no log ever showed it because I only logged successful runs. How are you all catching silent retry loops like that before the bill shows up?
The line "I only logged successful runs" is the part that got me, because I used to think logging failures was enough and that was just noise. Then I watched a buddy burn $200 in a weekend on a summarizer that kept retrying on 429s, and his logs were full of happy green checkmarks the whole time. What changed my mind was setting up a simple counter that fires an alert if the same prompt hash shows up more than twice in five minutes. Two weeks later it caught a loop where the model kept returning an empty string and the code just kept asking again. Now I treat retries as something to count, not something to hide.