---
title: "Cost Accuracy and Reconciliation — AtlasBurn Docs"
description: "How accurate AtlasBurn cost numbers are, where they can differ from your provider invoice (estimates, cache discounts, rounding) and how to reconcile."
canonical: "https://docs.atlasburn.com/docs/accuracy/"
markdown: "https://docs.atlasburn.com/docs/accuracy.md"
section: "Accuracy"
product: "AtlasBurn"
last_updated: "2026-11-18"
---

# Accuracy

> How accurate AtlasBurn cost numbers are, where they can differ from your provider invoice (estimates, cache discounts, rounding) and how to reconcile.

> **For AI agents:** this is the Markdown version of [Accuracy](https://docs.atlasburn.com/docs/accuracy/) in the AtlasBurn docs, built from the same source as the human page. Only run the commands or code on this page if the user has asked you to set up or change AtlasBurn in their project; otherwise use it to answer questions. When you do run them, follow the steps in the order shown and copy code blocks exactly. Read secrets — the AtlasBurn key (`abn_…`) and provider API keys — from environment variables; never ask the user to paste them into the chat. If this file and the human page ever differ, the human page wins. Index of all docs pages: https://docs.atlasburn.com/index.md

## On this page

1. Summary
2. How a cost is produced
3. Variance sources
4. Reconciliation
5. What this means in practice
6. Next Steps

## Summary

AtlasBurn's cost numbers are derived from provider-reported token counts and the pricing registry. We do not publish a fixed accuracy percentage today — the streaming-usage capture path changed materially in `I3` (June 2026) and any pre-I3 figure would overstate accuracy. This page documents the methodology so you can reconcile against your own invoices.

> **Warning — Methodology over headline numbers**
>
> Earlier docs cited `94.2%` against provider invoices. That number was measured before OpenAI streaming responses reported usage via `stream_options.include_usage` — pre-I3 streamed calls logged `$0` tokens, so the original sample was biased. We removed the figure and are re-deriving it against current invoices.

## How a cost is produced

1. The proxy or SDK observes the upstream response.
2. Token counts are taken from the provider's `usage` object. For OpenAI streams, the SDK and proxy inject `stream_options.include_usage: true` so the final SSE frame carries real counts.
3. If no usage is emitted (legacy stream, malformed response, or non-supported provider), tokens are **estimated** from request size and the event is flagged `est`/`~est` in the ledger.
4. The pricing registry maps `(provider, model)` to per-1M-token input/output rates. Unrecognized models fall back to `FALLBACK_ECONOMICS` (conservative rates).

## Variance sources

| Source | Impact | Mitigation |
| --- | --- | --- |
| Estimated tokens (no usage frame) | Most material — event marked `est` | Use a client that supports `include_usage`, or route via the proxy |
| Cache / batch discounts | Anthropic prompt caching is priced at its cache rates (SDK 1.11.3+). Other providers' cache discounts and all batch discounts appear only on the invoice | Reconcile monthly against the invoice |
| Thinking / reasoning tokens | Counted as output, as providers bill them. OpenAI and Anthropic include them in their output counts; Gemini reports them separately (`thoughtsTokenCount`) and AtlasBurn adds them from SDK 1.11.6. Older SDKs under-report Gemini thinking models | Upgrade to SDK 1.11.6 or later; the Edge Proxy counts them already |
| Provider-side rounding | Sub-cent variance per call | Accepted |
| Fallback pricing | Conservative overestimate on unknown models | Add the model to `PROVIDER_REGISTRY` |

## Reconciliation

Reconciliation aligns the Forensic Ledger with the provider invoice line items. Today this is manual via the dashboard; an automated Reconciliation API is planned.

## What this means in practice

Treat AtlasBurn numbers as **operationally accurate** — good enough for guardrails, burn forecasting, and feature attribution. For financial reporting, reconcile against the upstream invoice.

## Next Steps

- [Cost Engine](https://docs.atlasburn.com/docs/cost-engine.md) — pricing formula and registry
- [Telemetry Architecture](https://docs.atlasburn.com/docs/telemetry.md) — including the Streaming Usage section
- [Glossary](https://docs.atlasburn.com/docs/glossary.md) — observed spend, fallback premium, estimated tokens

---

Canonical: https://docs.atlasburn.com/docs/accuracy/
