A per-million-token price list is not a bill. One request is charged on three separate buckets — input that missed the cache, input that hit it, and output — and the price of the first two is different from the third by a factor of nearly four hundred on our table. Add two time windows and a rounding rule and you get a number you cannot reproduce without the run behind it. This article takes one real request, prints the usage block the upstream returned, prints what the ledger booked for it, and reconciles the two by hand. It then repeats the exercise with a cache hit and with a replayed bill, so you can check any usage statement we send you.
The table, in the units it is actually charged in
Four numbers and two windows decide everything:
Bucket Off-peak, per 1M Peak, per 1M
Input, cache miss $0.25 $0.50
Input, cache hit $0.006 $0.012
Output $1.45 $2.90
Peak is 01:00-04:00 and 06:00-10:00 UTC, Monday to Friday; everything else, including weekends, is off-peak.…