Use case
How to track OpenAI and Anthropic spend by customer, across providers
Two provider invoices, one customer. The invoices will never add themselves up for you.
Route every provider through Spendline and send x-customer-id on each request. One ledger covers all providers, so per-customer cost is directly comparable across them instead of living in two invoices that were never designed to be summed.
How Spendline does this
The ledger entry Spendline writes for every call already records the provider and model; adding the customer header means the same entry also carries who the call was for. Summing "customer X's AI cost" is then one query across the ledger, not a manual reconciliation between an OpenAI invoice and an Anthropic invoice that use different units, different line-item structures, and different billing cycles.
Why it matters
This is deliberately distinct from a hard cross-provider spending cap: a team can want to see combined per-customer cost without wanting a shared cap, or vice versa. Attribution and enforcement are separate controls that happen to use the same underlying ledger.
Frequently asked questions
Do the two providers need to be tagged differently?
No. The same x-customer-id header works regardless of which provider the request is proxied to. The provider is recorded automatically from the request itself.
Can I see cost broken out by provider within one customer?
Yes. The ledger keeps provider and model as separate fields, so a customer's total can be viewed as one number or split by provider without re-attributing anything.
See where this stands in your own setup
This page describes the mechanism. The 5 minute assessment scores your own attribution, enforcement, and reconciliation setup, so you know exactly which of these problems you actually have today.
Run the 5 minute assessment