Vibe Coder · Unit 10: APIs · Lesson 6 of 13
What it costs
Estimate what your AI feature will cost per use and per month, and set limits so a mistake or abuse cannot run up a bill.
Read the short notes and pictures.Do everything inside a blue frame.
Small costs add up
One call costs a fraction of a cent. A feature used by many people, or abused by one, can cost real money. A rough estimate and two limits are enough to keep it safe.

A rough estimate
Ask Claude Code to log token use
For each call.
Find the average
Over ten real inputs.
Multiply
By uses per user and expected users.
Compare models
A smaller model may be good enough at a fraction of the price.

Two limits
Account cap
A monthly maximum set with the provider.
Per-user limit
A daily number of uses, enforced in your app.
Cost and cap your feature
Have Claude Code log token use, work out the average cost per use, and estimate a month at your success target. Set a provider cap and a per-user daily limit.
Done when
Your AI feature is built, structured, measured and capped.
Keep these
- Estimate cost before launch.
- Set a spending cap.
- Limit use per person.