Skip to content

Anthropic cache prices are calculated correctly

We corrected the price calculation for POST /v1/messages with Anthropic prompt caching so response usage, history, and the final debit agree.

Fixed issues

  • One-hour cache writes use the correct price.
  • Mixed cache read, cache write, and ordinary input usage no longer loses part of the usage data.
  • History and the final debit use the same calculation as the API response.
  • Differences between the catalog and request calculation were removed.

Compatibility and next steps

No client, request-format, or API key change is required. See the API reference for the current Anthropic-compatible request format.