Lesson 2: Counting the tokens one request really sends
25 min read·
Module 3 · Lesson 2 · About 50 minutes · Needs: Lesson 1 (requests per day), and what a prompt and a model reply are
The situation
Week 3, Monday 16 November 2026. Lesson 1 turned Joel's target into 1,000,000 Ask requests a day. Ana wants the bill next, and a bill is tokens times a price. Joel's target says "2,000 input and 500 output tokens per request". Ana asks: what goes into those 2,000, and is it right for the Ask that runs today?
You answer by hand first, then prove it in code. Lesson 4 prices whatever you count here, so an error here reaches every dollar after it.