Controlling AI Costs for Your Business: Keep Spend Predictable
AI is billed per use, so the bill can climb without anyone noticing. A few simple safeguards make the spend predictable from day one.
When you first try an AI service, the cost often looks tiny. The trouble starts once the AI feature is opened to customers or staff: usage grows, a few people use far more than expected, and the monthly bill becomes hard to predict. The good news is that AI costs can be kept under control with a handful of safeguards designed in from the start. This article covers the ones we use ourselves.
Why AI API costs are hard to predict
Most AI services charge by tokens, the chunks of text that go into the model and come back out as an answer. That means your cost depends on things you don't fully control:
- How many people use the AI feature, and how often.
- How long the questions, supporting documents, and generated answers are.
- Which model is used, since per-token prices vary widely between models.
- Abnormal usage, such as automated scripts or one user firing off hundreds of requests.
Without limits, one busy day or one bored user can burn through a month's budget. That's why safeguards belong in the build alongside the feature, not after the invoice arrives.
Daily quotas per user
The simplest safeguard is a quota: each user can use the AI feature a set number of times per day. Quotas keep usage fair and stop one person from draining a shared budget. They can also vary by plan, with free users getting a smaller allowance than paying customers. Show users how much they have left so they aren't surprised when it runs out.
Per-user and global spending caps
Quotas count requests, but one long request can cost far more than ten short ones. So alongside quotas, you need caps on actual spend, in rupiah or dollars.
- A daily cap per user makes sure no single account can exhaust the budget.
- A global daily cap is the final brake for the whole system, whatever happens.
- A token limit per request stops one question from triggering a huge answer.
For these caps to work, every AI call needs to be logged with its estimated cost. One small detail that's easy to miss: if the system doesn't recognise a model's price, don't treat the cost as zero. Use a safe estimate instead, so the cap can still be reached and isn't quietly bypassed.
A cheaper default model, with escalation
Not every question needs the most expensive model. An effective pattern is to use a cheaper model by default and pass only genuinely hard cases to a stronger one. The rules for when escalation happens should be explicit and reviewable, for example when a user has failed several times or when the question includes an image.
Even better, not every request has to go to AI at all. If the answer already exists in your system, such as an FAQ, an official hint, or order data, just show it directly. Save the AI call for free-form questions that can't be answered any other way.
Fallbacks when AI fails or a cap is hit
AI services can be slow, throw errors, or go down for a while. Your spending cap will also be reached at some point. Plan what happens in those moments so users don't stare at an empty screen.
- Set up a backup AI provider that takes over automatically when the main one fails.
- If every provider fails or a cap is reached, show a safe fallback, such as official material or a message to try again tomorrow.
- Notify you or your team when the global cap is close, so raising the budget is a deliberate decision.
A real example: the AI tutor at Numekara
Numekara, our own education business that is live today, runs an AI tutor used by real students, and every safeguard above is in place there. The main model is DeepSeek via OpenRouter, with Gemini as a backup when the main model fails. There's a daily quota for AI use, daily spending caps both per user and for the whole system, and a token limit per request.
Escalation to a stronger model only happens under specific conditions, such as when a student asks for deeper hints or keeps getting the answer wrong. For ordinary hint requests, the tutor first serves hints from official course material without calling an AI model at all. If the AI service fails, students still get help from the official material and worked solutions.
Next steps
- Set a maximum daily budget for your AI feature.
- Log every AI call with the user, model, token count, and estimated cost.
- Add per-user quotas, per-user spending caps, and a global cap.
- Choose a cheaper default model and write clear escalation rules.
- Prepare fallback answers, then review usage data weekly during the first month.