Accurate Anthropic Messages prompt caching pricing hotfix¶
An urgent hotfix resolves pricing discrepancies for POST /v1/messages using
Anthropic prompt caching, ensuring complete consistency between API response
usage metrics, public catalog pricing rules, and ledger transaction records.
Fixed issues¶
1-hour and 5-minute cache pricing tiers¶
- Corrected pricing calculations for explicit 1-hour cache write tokens
(
cache_creation_1h_input_tokens), which previously applied an incorrect base rate. - Enforced strict rate separation between standard 5-minute ephemeral cache
creation (
cache_creation_input_tokens) and 1-hour persistent cache blocks.
Mixed token requests¶
- Fixed partial usage accounting loss in complex requests combining standard input tokens, cache read tokens, and new cache write blocks simultaneously.
- Ledger debit records in balance history now use the exact same normalized pricing formula as returned in the API response.
Catalog and debit synchronization¶
- Resolved discrepancies between cache creation rates displayed in the public catalog and actual transaction ledger debits.
Improvements¶
Transaction history transparency¶
- Detail views for Claude model requests in the History section now clearly break down prompt caching token metrics and exact billing structures.
Compatibility and user actions¶
- No changes to client SDKs, request formats, or Anthropic caching headers are needed.
- Standard Anthropic prompt caching parameters work as documented in the API reference.