This content originally appeared on DEV Community and was authored by Sudha Nippani
Hello everyone! I am building an agent using langchain, using Anthropic's 3.5 Haiku. I want to get the analytics of the model, such as number of input tokens, output tokens, cost per token, etc. When I fetch the number of input and output tokens from the json that is returned from the llm, there is a big difference in these numbers and the numbers which are displayed on the anthropic dashboard. I do not understand why and how to get an accurate number. Could anyone please share their insights regarding this problem?
Thankyou
This content originally appeared on DEV Community and was authored by Sudha Nippani

Sudha Nippani | Sciencx (2025-06-24T10:35:24+00:00) Anthropic analytics query. Retrieved from https://www.scien.cx/2025/06/24/anthropic-analytics-query/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.