CourseAI System Design: The Complete Course · Module 3: Capacity and Cost Estimation · part 21 of 107
Part 21 · Module 3: Capacity and Cost Estimation

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.

THE QUESTION What is inside 2,000 tokens? JOEL'S TARGET, ONE ASK REQUEST 2,000 input tokens: made of what? 500 out written by the model × 1M requests a day
Joel's target fixes 2,000 input tokens (blue, what Northdesk sends) and 500 output (amber, what the model writes), but not what the 2,000 are made of.

The rest of this course is yours to keep

This course is bought on its own, once, and stays readable afterwards, including the parts added to it later.

Or open everything with a plan