One habit
Every AI feature should record tokens per request. If you cannot see usage, you cannot explain cost when your demo gets shared in a college WhatsApp group.
Tokens are what the model processes. Input, cached input, and output tokens can have different prices, based on the model.
What tokens mean
A token can be a character, part of a word, a whole word, punctuation, or spaces. For English, OpenAI gives a rough estimate: 1 token is about 4 characters, and 100 tokens are about 75 words.
Reasoning tokens may not appear in the visible answer. They still count toward output usage and are billed as output tokens.