PulseAugur
EN
LIVE 10:13:40

OpenAI, Anthropic token reporting differs, causing cost confusion

OpenAI and Anthropic report token usage differently, particularly concerning cached tokens. OpenAI includes cached tokens within its total `prompt_tokens`, with `cached_tokens` indicating the number of cache hits. In contrast, Anthropic separates cached tokens, reporting them under `cache_read_input_tokens` and `cache_creation_input_tokens`, with `input_tokens` only reflecting new, non-cached input. This discrepancy can lead to significant undercounting or overcharging if not handled correctly. The article proposes a standardized `Tokens` data structure to normalize usage reporting across both providers, ensuring accurate cost calculations. AI

IMPACT Developers must adapt their cost-tracking scripts to account for differing token usage reporting between OpenAI and Anthropic to avoid billing errors.

RANK_REASON The item explains a technical nuance in how two major AI providers report token usage, offering a solution for developers to standardize this reporting for cost management.

Read on dev.to — LLM tag →

AI-generated summary · Google Gemini · from 1 sources. How we write summaries →

OpenAI, Anthropic token reporting differs, causing cost confusion

How we ranked this

Signal score
30 / 100
Composite score across the factors below. Higher = stronger signal that this story matters right now.
Newsworthiness bucket
Tool
The item explains a technical nuance in how two major AI providers report token usage, offering a solution for developers to standardize this reporting for cost management.
Source corroboration
Single-source cluster
Only one publisher covered this so far. Single-source stories can still rank when the publisher is high-authority, but they lack cross-source corroboration.
Topics
infra
Editorial topic classification. Feeds into how the story surfaces on /topic/<slug> hub pages and into the per-entity coverage mix.
AI-industry relevance
High
Clearly on-topic for AI-industry coverage.
Story freshness
Breaking (< 6h)
Fresh story with cross-source coverage still developing. Ranking may shift as more sources report.

Full methodology in our editorial standards.

COVERAGE [1]

  1. dev.to — LLM tag TIER_1 English(EN) · uncoil ·

    OpenAI and Anthropic count cached tokens in opposite ways

    <p>Send the same 2,048-token prompt to OpenAI and to Anthropic, with most of it served from the prompt cache, and look at the usage objects that come back:<br /> </p> <div class="highlight js-code-highlight"> <pre class="highlight plaintext"><code>OpenAI prompt_tokens = 2048 (pro…