Toolsvia Dev.to API
OpenAI and Anthropic count cached tokens differently

OpenAI includes cached tokens inside prompt_tokens and marks the hit count in cached_tokens, while Anthropic keeps cache reads separate in cache_read_input_tokens and reports only fresh tokens as input_tokens. A developer who reads one field per provider will undercount Anthropic usage and overcharge for OpenAI calls.
Was this summary accurate?