Skip to content

Pricing and running AI products

How do you stop a surprise AI bill?

Cal Renshaw, , 1 minute read

With 2 limits. A hard cap on every API key, the setting that stops spending rather than reporting it, and which you've watched fire. And a daily ceiling in your own code: when the day's spend reaches it, the product stops calling the model, holds the remaining work in the queue, and tells you.

The alert that only told me

A free page of mine, built in an evening, ran on a key with a spending alert and no cap. One Friday somebody posted it on a much busier site. The email arrived at 3:40 in the morning. An alert is a message about money that has already gone.

The ceiling that fired on the 1st

My document product's daily ceiling first fired on the 1st of the month, and it was my fault. I'd set it on an ordinary Tuesday, at a comfortable margin above an ordinary day. A number that would annoy me rather than frighten me.

What I'd forgotten was the shape of the month. Nearly every member uploads their batch in the first few days. The message came mid-afternoon; the held documents went through next morning, a day late. 2 members asked why, and I told them the truth: a safety limit of mine had been set for the wrong kind of day, and it was fixed.

The ceiling did its job. It stopped at my number and told me. It didn't quietly switch to a cheaper model, skip the check, or drop half the work.

Setting yours

  • Look at your busiest days of model spend in the last 2 months, and what they had in common.
  • Set the daily ceiling above those, at a number that would annoy you.
  • At the ceiling: stop, hold the work, send yourself a message.
  • Keep one command that stops everything at once.
  • Delete keys made for tutorials and demos.

Who Pays for the AI? has both chapters. The cost sheet has a line for the ceiling.

Questions

How do I limit OpenAI or Anthropic API spending?
Set a hard cap on every key where the provider offers one, and a daily ceiling in your own code that holds work at the limit.
Is a spending alert enough?
No. An alert tells you after the money has gone. A cap or ceiling stops it.
What should happen when an AI spending limit is reached?
Stop calling the model, keep the work safely queued, and tell yourself. Never silently degrade the product.