By the end of this lesson your bot will have four walls against a surprise bill, you will know what one chat and one user cost you per month, and your bot will shrug off the most common tricks users try.
You need: the streaming chat from lesson 3, your coding agent, the AllModelAPI dashboard · Time: 9 minutes
A chat app spends money every time someone presses Send. Most of the time that is a few paise. The danger is the rare bad day: one user pasting a whole textbook, a bug that loops, or a stranger with a script. You do not stop that with one big rule. You stop it with four small walls, each catching what the one before missed.
Each wall is cheap to build. Together they turn "unlimited" into a number you chose. Why?Every wall alone has a gap. A spend limit stops the money but also stops your app for everyone. A per-user limit keeps one heavy user from causing that.
Log in free to read the rest of this lesson
Every lesson is free. A free account unlocks all of them and saves your progress.
Still to come in this lesson:
- Walls 1 and 2: cap each answer and the history
- Wall 3: limit each user
- Wall 4: the key's spend limit, and watching usage
- What your app costs, and what to charge
- Tricks users will try
- Recap