Watch: See how much AI each of my users costs me | Vovy

Watch Vovy do it on a Mac: "Log AI token usage per user so I know who costs what". Record tokens and cost for every AI call by user and feature in your database, then see a dashboard of your most expensive users.

"Log AI token usage per user so I know who costs what"

Record tokens and cost for every AI call by user and feature in your database, then see a dashboard of your most expensive users.

What happens in the video

  1. Create a usage table: Vovy asks Claude Code for a Supabase table with user ID, feature, model, input tokens, output tokens and cost, with Row Level Security on.
  2. Log every call: Claude Code reads the usage numbers each API response already returns and writes a row after every call from your server.
  3. Price it per model: Vovy adds a small price table per model from the providers' pricing pages, so cost is calculated, not guessed.
  4. Build a cost view: Vovy writes a SQL view that totals cost by user and by feature for the month, and runs it in the Supabase SQL editor.
  5. Show the results: A table shows your top 20 users by AI cost next to their plan, so you can spot users who cost more than they pay.
Read the step-by-step guide