End-to-End Call Cost
Token problems: 10 of 20
Token problems: the workbook
End-to-End Call Cost
How do you price a call when you only know the word count? Estimate input tokens from the words, then price input and output separately. Get the token counts right and the cost follows. In practice, agent prompts arrive as natural language, so word-to-token estimation is the first step in any cost calculation.
Problem
An AI agent receives a 200-word prompt and returns 200 output tokens. Input tokens are estimated at 1.5 per word. Input is priced at 2 cents per 100 tokens and output at 8 cents per 100 tokens. What does the call cost in total?
Estimate the input tokens
Cost of the input tokens
Cost of the output tokens
Add the two costs
Practice 1
An AI agent receives a 100-word prompt and returns 600 output tokens. Input tokens are estimated at 2.0 per word. Input is priced at 2 cents per 100 tokens and output at 8 cents per 100 tokens. What does the call cost in total?
Estimate the input tokens
Cost of the input tokens
Cost of the output tokens
Add the two costs
Practice 2
An AI agent receives a 200-word prompt and returns 100 output tokens. Input tokens are estimated at 2.5 per word. Input is priced at 2 cents per 100 tokens and output at 8 cents per 100 tokens. What does the call cost in total?













