🔥 3-day streak
Claude Certified Associate (Foundations)116 / 150
Question 116 of 150
A developer is building a chatbot and wants to display an estimated cost to users before sending each request to the Messages API. They need to know how many input tokens a given prompt (system prompt plus conversation history) will consume, without actually generating a response and being billed for output. What is the most appropriate approach?
Reviewed for accuracy · Report an issueNext question