An AI feature's bill grows with users, conversation length and model price. The good news is that each of those has a lever, and most can be pulled without users noticing.
1. Pick the smallest model that passes your tests
The same chatbot workload costs $391.20 a month on Claude Sonnet 5 and $42.72 on GPT-5.6 Luna. Test the cheaper tiers on real examples before assuming you need a flagship model.
2. Limit chat history
Every message re-sends the conversation so far, so input grows quickly with length.
Input tokens
12 × 800 + 12 × 60 + 360 × 12 × 11 ÷ 2equals34,080
Output tokens
12 × 300equals3,600
Per conversation
34,080 ÷ 1M × $2.00 + 3,600 ÷ 1M × $10.00equals$0.1042
Per month
$0.1042 × 10,000 conversationsequals$1,041.60
Doubling conversation length raised the monthly bill from $391.20 to $1,041.60. Keeping only recent turns, or summarizing older ones, caps that growth.
3. Cache repeated input
Long system prompts and documents are sent with every message. Providers discount cached input heavily; OpenAI bills cached reads at 10% of the standard input rate on current models.
4. Batch work that can wait
Batch APIs typically halve the price for jobs that can finish within 24 hours, such as nightly summaries or classification.
5. Cap output length
Output tokens cost several times more than input. Ask for concise answers and set a maximum output length.
6. Route by difficulty
Send simple requests to a cheap model and only hard ones to an expensive model. Even routing half of the traffic can cut the bill substantially.