Reconciling a metered AI bill means recomputing the provider’s charge from a usage record the buyer holds, then comparing the two. The recomputed charge is the quantity in each priced usage category multiplied by the contract price for that category.
Under section 34 of the Financial Administration Act, no payment is made unless someone certifies that the service was rendered and that the price charged is according to the contract or, if the contract does not specify it, is reasonable. For metered inference, the quantity behind that price is mostly visible through the provider’s own meter. Financial Administration Act, section 34.
What the provider counts
A single request can produce several counted quantities: uncached input, cache reads, cache writes, output, reasoning or thinking tokens, and tool use. Each quantity can carry its own price, so a total token count is not a billing quantity.
Providers name and count these categories differently. Anthropic’s usage response splits input across three fields, and total input is cache_read_input_tokens + cache_creation_input_tokens + input_tokens. The field named input_tokens covers only the portion after the last cache breakpoint. Cache writes cost 1.25 times the base input price with a 5-minute lifetime and 2 times with a 1-hour lifetime. Cache reads cost 0.1 times on most models. Anthropic prompt caching.
Gemini counts the other way. Its promptTokenCount is the total effective prompt size and includes cached content. The cached part is also reported separately as cachedContentTokenCount, and thinking tokens appear as thoughtsTokenCount. Adding Gemini’s cached count to its prompt count counts the cached tokens twice. Treating Anthropic’s input_tokens as total input leaves out the cached tokens. Gemini API usage metadata.
Reasoning tokens raise a similar problem. OpenAI’s usage object reports input_tokens, input_tokens_details.cached_tokens, output_tokens and output_tokens_details.reasoning_tokens. Reasoning tokens are not visible through the API but are billed as output tokens. OpenAI reasoning guide. Gemini labels its output price as including thinking tokens and states that every token the model processes is counted and billed. A record that measures only the visible response will not match billed output. Gemini pricing.
Some charges are not token charges. Anthropic’s response usage reports server_tool_use.web_search_requests and service_tier alongside the token fields. Anthropic Messages API. As of November 2026, web search costs $10 per 1,000 searches plus standard token costs, and search results count as input tokens. Code execution can be charged per container-hour. A token reconciliation alone does not verify these lines. Anthropic pricing.
Keeping a record the bill can be checked against
A checkable record starts with the usage object of every response, kept as returned rather than reduced to a derived total. Each entry also needs the model identifier, service tier, time, request status and a request or case reference. Model and tier matter because rates differ by both. Time matters because billing periods and price changes have dates. The case reference is the only path from a billed unit back to the work that caused it, which is also what cost per decision and showback or chargeback need.
Caching makes full-object logging necessary. Prompt caching is on by default for supported OpenAI models, and reused tokens are billed at a reduced cached-input rate. For newer models, cache writes cost 1.25 times the uncached input rate and reads 0.1 times on most models. A log that keeps only input and output totals has discarded the fields that set the input charge. OpenAI prompt caching.
The local record is then compared with the provider’s own usage and cost reports. Anthropic’s Usage and Cost API reports usage in 1-minute, 1-hour or 1-day buckets, filtered or grouped by API key, workspace, model, service tier and other dimensions. It tracks uncached input, cached input, cache creation and output tokens. The cost report is in US dollars at daily granularity only. Data typically appears within five minutes of a request completing, though delays can occasionally be longer.
These reports do not cover the whole invoice. Priority Tier costs use a different billing model and are not included in the cost endpoint. Code execution costs appear in the cost endpoint but not in the usage endpoint. The cost endpoint also excludes seat fees and usage that a seat covers. The comparison therefore proceeds category by category, with each excluded category checked against its own source. Anthropic Usage and Cost API.
A worked reconciliation
The following example is constructed, and its prices are illustrative, not any provider’s list price. Uncached input costs $3.00 per million tokens and output $15.00 per million. Cache writes cost 1.25 times input ($3.75 per million) and cache reads 0.1 times ($0.30 per million).
A month comprises 10,000 requests to an API that counts like Anthropic’s. Each request carries a 20,000-token shared instruction block that is cached, plus 1,000 tokens of case-specific input after the cache breakpoint. Each produces 800 output tokens, including reasoning. The cache is written 200 times, 20,000 tokens each time, and read on the other 9,800 requests.
The charge is recomputed category by category:
- Cache reads: 9,800 × 20,000, or 196 million tokens, at $0.30 per million: $58.80.
- Cache writes: 200 × 20,000, or 4 million tokens, at $3.75 per million: $15.00.
- Uncached input: 10,000 × 1,000, or 10 million tokens, at $3.00 per million: $30.00.
- Output: 10,000 × 800, or 8 million tokens, at $15.00 per million: $120.00.
The recomputed charge is $223.80, on total input of 210 million tokens.
Suppose the local log captured only input_tokens and output_tokens. It recomputes $150.00, and a correct invoice appears $73.80, about a third, too high.
Suppose instead the log captured total input but priced all of it at the uncached rate. That gives 210 million × $3.00, or $630, plus $120 for output: $750. The invoice now appears cheap, and a genuine overcharge of anything less than $526.20 would go unnoticed. The two errors point in opposite directions but have the same cause: the record did not keep the priced categories as the provider defines them.
Differences that are not billing errors
Some differences remain after the arithmetic is right. Period boundaries and time zones can place a request made near midnight in different periods in the two records, and provider reporting can lag completion. The local record should keep the provider’s timestamp as well as the department’s.
A logged attempt is not necessarily a billable request. Anthropic does not bill errored, cancelled or expired batch requests, and charges batch usage at 50 percent of standard prices. Anthropic batch processing. A web search that fails with an error is not billed either. Anthropic pricing. A log without request status and tier overstates the expected charge.
Charges that sit outside a provider report, such as the Priority Tier and seat fees noted above, mean that a mismatch between that report and the invoice is not by itself evidence of an error. The invoice line has to be traced to its own source.
Prices can also change inside a billing period. Gemini’s pricing page, as accessed in November 2026, lists scheduled input-price increases for two models taking effect on 1 December 2026 and 1 January 2027. A single rate applied to a whole period will not match an invoice that applies two. Gemini pricing.
An intermediary adds another boundary. Shared Services Canada’s 2024 evaluation of its cloud services describes the broker as responsible for billing and monitoring consumption of cloud services on behalf of government organizations. The evaluation concerns cloud services, not AI specifically. Where a broker sits between a department and a provider, the broker’s charges have to be reconciled as well as the provider’s usage. Evaluation of Shared Services Canada’s Cloud Services.
What the contract has to secure
Reconciliation depends on four contractual terms. Unit definitions state how input, cached input, cache writes, output, reasoning tokens, service tiers and non-token units are counted and priced. Data access gives the buyer per-request and aggregated usage at the granularity needed to recompute the invoice. Change notice requires the provider to announce changes to units or prices before they apply. Audit rights extend to the meter itself, not only to the invoice.
The research behind this site found no entitlement to consumption data sufficient to verify an invoice in the federal guidance it examined. The visibility obligations in that guidance were shaped for security: a monitoring feed for “certain aspects” of a cloud service and evidentiary information at least annually. No notice duty for metering changes and no case-level attribution of metered consumption were found either. This is a finding about the material examined, not about every contract. Its consequence is that, unless the department keeps independent telemetry, certification comes down to accepting the counterparty’s record of what it is owed.
When the only record is the provider’s, a certifying officer can attest that the contract rates were applied to the quantities the provider reported. The officer cannot independently attest that those quantities are the service actually rendered. The price may accord with the contract, but the usage it depends on has a single witness.