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 3D scene of coloured blocks and cards. Estimate: tokens per call, calls per user, users.
Tokens per call, calls per user, users.

A rough estimate

  1. Ask Claude Code to log token use

    For each call.

  2. Find the average

    Over ten real inputs.

  3. Multiply

    By uses per user and expected users.

  4. Compare models

    A smaller model may be good enough at a fraction of the price.

A 3D scene of coloured blocks and cards. Limit each user: 20 uses a day, signed-in users only, unlimited, anonymous use.
Limit use per person and require sign-in.

Two limits

Account cap

A monthly maximum set with the provider.

Per-user limit

A daily number of uses, enforced in your app.

ActivityBuild stepOne AI feature

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.