DevPrep

All topics › AI fundamentals for developers

What are tokens in terms of money and limits?

Junior PRO

Essence

Models don't read and write letters or words but tokens: chunks of text. Tokens are at once the unit of price (the API charges per million tokens), the unit of limits (subscriptions and rate limits are counted in them) and the unit of context window size. Understanding where tokens come from explains why one agent session costs pennies while another eats your daily limit.

The rest of this answer, with code and interview follow-ups, is in the DevPrep app.

Read the full answer in DevPrep

Practice this before your interview

DevPrep turns these answers into one-minute challenges: what does this code print, find the bug, mock interviews. One challenge a day.

Get DevPrep on the App Store