Expand description
What prompt caching cost and saved, priced the same way on every provider.
Structs§
- Cache
Cost - A request’s or a run’s input tokens by how they are billed, plus the
token-hours its cache resources were stored. Sum the costs of a run’s
calls (and of any cache resources beside them) and price the total with
CacheCost::usd. - Cache
Rates - Prices of one model and tier, in USD per 1M tokens (storage: per 1M
token-hours). The built-in catalog’s
Pricingholds the input, cached-read and cache-write prices of the models it lists, but no storage price. A provider without a separate write price bills writes atinput; one without storage leavesstorage_per_hourat zero.