Cost Optimization & FinOps

Reconciling Cloud Invoices Against Internal Token Logs

When the cloud invoice lands, finance asks one question: does this match what we think we used? You can only answer if you logged the right fields and priced them by the right rules.

Claude 3P 101 · Updated July 2026 · Unofficial guide

Reconciliation is the monthly exercise of rebuilding the invoice from your own records. It catches billing surprises, misconfigured workloads, and — most commonly — gaps in your own logging. The method is the same on every platform: capture per-request usage, price it with the published rules, aggregate by day, and compare against the provider's line items.

Step 1: Log the usage object, not your estimates

Every Claude Messages API response, on all four platforms, includes a usage object. Persist at minimum: input_tokens, output_tokens, cache_creation_input_tokens, cache_read_input_tokens, the model ID, the timestamp (in UTC), and the request ID. Do not substitute client-side token estimates — in particular, never estimate with OpenAI's tiktoken, which undercounts Claude tokens by roughly 15–20% on typical text. That single mistake produces a permanent, unexplainable "gap to invoice."

Step 2: Price each row by the actual rules

Multiply each usage category by its own rate. The modifiers are where reconciliations go wrong, so apply them explicitly: cache writes at 1.25x base input (5-minute TTL) or 2x (1-hour), cache reads at 0.1x; batch mechanisms at 50% of on-demand on both input and output; a 10% premium for regional or multi-region endpoints on Bedrock and Google Cloud (Sonnet 4.5 and later models); 1.1x for US-only inference where inference_geo: "us" applies. Watch dated price changes too — Claude Sonnet 5's introductory $2/$10 pricing runs through August 31, 2026, so a September invoice will not match August unit rates.

Step 3: Compare against the platform's own records

PlatformWhat the invoice showsYour cross-check
Amazon BedrockPer-token AWS chargesModel invocation logging records input.inputTokenCount and output.outputTokenCount per call — but only on the bedrock-runtime endpoint; bedrock-mantle calls are not captured, so log those app-side
Google Vertex AIPer-token GCP chargesUse the token counting API or token_count metrics in Metrics Explorer; Google warns the console Quota page token figures may be inaccurate due to Anthropic's token estimation/refund system
Microsoft FoundryA single CCU marketplace line in Azure Cost ManagementPer-model token and request detail in the Foundry portal's Monitoring tab
Claude Platform on AWSCCU line via AWS MarketplaceConsole Usage/Cost pages; the programmatic Usage and Cost API is not available on this platform

The Claude Consumption Unit (CCU) deserves a note because it confuses finance teams. On Claude Platform on AWS and Foundry, usage bills at $0.01 per CCU, where 100 CCU equals $1.00 of fees at standard per-model rates after discounts, metered hourly and invoiced monthly in arrears. To reconcile: price your token log in dollars as in step 2, divide by $0.01, and compare CCU counts. Negotiated discounts (Azure Marketplace private offers) are applied at the token-to-CCU conversion, so use your contracted rates, not list, where they differ. On the first-party Claude API, by contrast, the Admin Usage and Cost API gives you Anthropic's own daily cost figures to reconcile against — that option does not exist on Bedrock, Vertex AI, or Claude Platform on AWS.

Explaining the residual gap

After honest pricing, expect a small residual and be ready to name its causes: hourly metering and UTC day boundaries versus your app's timezone; requests you failed to log (retries, dead-letter paths, engineers' ad-hoc calls); charges with no token log at all, such as web search fees ($10 per 1,000 searches) or Bedrock Provisioned Throughput's fixed hourly billing; and legitimately unbilled events — batch requests that expired unprocessed are not billed, and refusals issued before output generation are not billed on Fable 5. Token-count estimates from the counting endpoint may also differ slightly from billed tokens; only the response usage object is authoritative.

Rule of thumb: reconcile at daily granularity, in UTC, per model and per modifier bucket (standard / batch / cache write / cache read). A one-line monthly comparison hides exactly the errors you are looking for.

Where to go next

Platform-specific drill-downs: Bedrock in Cost Explorer, the Vertex billing dashboard, Foundry marketplace billing, and turning the reconciled data into a finance report.

Sources