Token Consumption Discrepancies in Anthropic's Claude Messages API on Cloud Platforms

Hello, community!

We are experiencing an issue with the Anthropic (Claude/Messenger) integration within n8n:

  • When we send prompts directly to the agent without triggering any additional workflow, the token count is correct and the charges correspond to what we expect.

  • However, when the agent is triggered within a workflow that fires other actions (for example, multiple nodes or chained actions), the token count displayed by n8n does not reflect the actual usage. In practice, Anthropic charges much more than what n8n shows.

  • As far as we can tell, the n8n node only accounts for the first action and ignores subsequent calls, causing a discrepancy between what is shown in the n8n dashboard and what Anthropic actually charges.

We would like to know if anyone has experienced this and how we can fix this discrepancy, whether by adjusting the node, using detailed logs, or manually tracking token usage.

Thank you!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.