Building in public means sharing the failures too. So here's ours.
We had an AI image generation feature running on Google's API. One parameter was set wrong: a "thinking budget" that told the AI to reason extensively before generating each image. Completely unnecessary for image generation. But it was there, silently burning tokens at premium rates.
The fix was literally one line of code. Remove the parameter. That's it. $1,589 mistake, 10-second fix.
WHAT WE BUILT AFTER:
- A cost tracking dashboard that logs every API call in real-time
- - Daily cost aggregation with automatic Slack alerts ($50/day warning, $150/day critical)
- - A rule: never trust "free tier" labels without checking the actual billing dashboard
The $1,589 turned out to be the cheapest lesson possible. It forced us to build infrastructure we should have built from day one.
Anyone else had an automation silently rack up costs? Or is it just us learning the hard way?