← All posts

Why your AI app got a $5,000 API bill — and how to cap it

Your idea worked perfectly in testing. Then it went live, someone pointed a script at it, and at the end of the month a five-figure invoice arrived. How?

AI-built apps almost never ship with two basic brakes: a rate limit (how often someone can call your endpoint) and a spend cap (how much you're willing to spend in total). Without them, every call costs money and nothing stops it from being millions of calls.

How the spend runs away

  • An AI endpoint called on every keystroke, using the most expensive model.
  • A loop — from a bot or a curious user — hitting it thousands of times a minute.
  • The API key exposed in the browser, where anyone can grab and use it.

How to put a ceiling on it

Expensive calls happen on the server, never in the browser. You add a per-user rate limit, set a spend cap in the provider's dashboard, and use the cheapest model that does the job. Simple to say, easy to forget.

Want to know where your app is exposed before the next invoice lands? Send it over and we'll take a look.