What
Pricing overrides let an organisation with contracted rates tell Claude Code what each model costs, so spending can be measured accurately. Caching saves part of a prompt so it can be reused, and writing to the cache has its own price. Overrides now accept more detail:
- A row now needs
input,output,cacheRead,cacheWrite5mandcacheWrite1h, so 5-minute and 1-hour cache writes are priced separately. In gateway form these arecache_write_5mandcache_write_1h. - The older
cacheWritevalue still works and fills in whichever of the two cache write prices is not set. - If the cache write prices are incomplete, a validation error says to "set cache_write_5m and cache_write_1h, or cache_write as the price for whichever of them is not set".
- A new
longPromptobject (long_promptin gateway form) holdsabovePromptTokens(above_prompt_tokens) plus all five rates. It is for models that charge more for long prompts, such as Haiku 5.5. - Older versions of Claude Code skip a row that has no
cacheWrite.
Before this release a row needed only input, output, cache read and cache write, each from 0 to 10000, and one cache write price covered both 5-minute and 1-hour writes.
Why
Administrators with contracted rates can now meter spending more accurately. If some people in your organisation run older versions, keep a cacheWrite value in each row so those versions do not skip it.
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
The result of `$.model.complete` has a `usage` object with the API's [cache fields](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#tracking-cache-performance). `usage.cache_creation_input_tokens` counts the tokens the…plugins/mods/api see the edit
A small documentation edit on Use the mods API touched a line naming cache_read after this was published.
Added cacheWrite5m, cacheWrite1h and, for Haiku 5.5, longPrompt to modelPricing, and cache_write_5m, cache_write_1h, long_prompt to gateway…