Token Usage & Cost
You might say
My API bill blew up this month. What am I actually paying for?
The cumulative model tokens in a task and the price calculated from the model’s rate cardSystem rules, chat history, files, tool results, and model output all use tokens across a multi-turn task. Cost also depends on the model and separate input, output, and cached-token prices; external tools may have their own fees.
Know first
Why three turns cost more than the last answer alone
These rounds and Token counts are illustrative.
Total through three rounds1,380 TokenInput 1,200 + Output 180
Every round brings along needed rules, history, and new results; cost is not just the final answer.
How multi-turn usage and cost add up
Every turn has input:Rules, chat history, files, and tool results may enter the model again each turn.
Every turn has output:Responses, next-step suggestions, and tool requests also produce output tokens.
Calculate each token category separately:Add input, output, cache, and model categories, then apply the matching rates.
Learn next
Further reading