When you use an AI service like ChatGPT or Claude, you're not paying for words—you're paying for tokens. A token is a chunk of text that the AI model processes, and it can be as short as a single character or as long as a word. For example, the word 'database' is actually three tokens, not one.
Every API call is metered: your bill equals tokens sent in the request plus tokens generated in the response. That includes the system prompt, which you pay for on every single request. The result? Costs can balloon unexpectedly.
There's a fix that many developers miss: prompt caching. With caching, you pay full price for a system prompt once, then only about 10% of that on subsequent requests. Once you understand tokens as the meter, optimizing AI costs becomes straightforward.