One endpoint,
every model.
Tare is an OpenAI-compatible gateway in front of every model you use — ours and the ones you bring yourself. One base URL, one key, and every token accounted for.
Cost attribution
What this solves: Lets you see "where this money went" and break spend down by customer, product line, task, and stage.
Attribution isn't a bill-download feature. It's finer-grained than an API bill, recording each model call separately by key, model, business label, and task stage.
To see spend by business line, the call must carry labels
If you want to see cost by customer, product line, task, or stage, you need to have your engineering team include fields like usage_label, task_id, and stage_code in the request body. Tare records them on this call and strips them before forwarding upstream, so the provider never sees them.
This is an action item: without labels, you can never break it down afterward. If you can't change the call code for now, there are only two alternatives:
- Have your engineering team add the business labels to the request body;
- Split into different Child keys by customer, business line, or environment.
With neither labels nor separate keys, there's no reliable way to break historical spend back down by business line.
Before reading reports, tell the two numbers apart
The console can break spend down by model, by key, by product line, and by time. Before reading a report, tell these two numbers apart:
| Field | Meaning |
|---|---|
| Charged | The amount the platform charges you, including the governance fee |
| Attributed spend | How much this call actually cost you, including the BYOK upstream cost |
To measure the cost of a single feature, use Attributed spend.
Charged includes the governance fee. It is not the upstream token charge. Attributed spend includes what the provider bills you directly. Do not add the two together.
Details
How to add attribution fields
Attach these fields in the request body; Tare records them on this call and strips them before forwarding, so the provider never sees them:
{
"model": "GLM 5.1",
"messages": [ ... ],
"task_id": 4821,
"task_type": "issue-fix",
"stage_code": "plan",
"action_code": "draft-patch",
"attempt_no": 2,
"usage_label": "acme-corp",
"available_tool_count": 12,
"available_tool_choice_mode": "auto"
}
Stripping is necessary: the official OpenAI endpoint returns 400 for unknown body parameters. A BYOK channel pointing at api.openai.com would fail on every call because of this, and the error message has no visible relation to "one extra label was passed".
models and provider (see Routing) are also stripped, but they're not attribution labels: they decide which model and which channel answers this call, and aren't recorded against this call.
Charged and Attributed spend
- Charged: the amount the platform charges you, including the governance fee.
- Attributed spend: how much this call cost you, including the part the provider charges you directly. Use this value to measure the cost of a single feature.
Charged includes the governance fee. It is not the upstream token charge. Attributed spend includes what the provider bills you directly. Do not add the two together.
Retries and idle tool calls
The spend on retries, and on "tools were provided but never called once", is counted separately. These two are usually a small share; once their share rises, they're the lowest-cost improvements in the whole table.
Upstream Costs
Console → Upstream Costs shows what you paid your own upstream accounts for BYOK calls. Only calls with a known upstream price appear, so the total is a lower bound. For a provisioning key it shows the combined upstream cost of the child keys it issued.
The console's own read endpoints
The following are the console pages' own logged-in session endpoints, not part of the key-authenticated reconciliation API. For automated reconciliation, use the Reconciliation API.
The Analytics page (GET /v1/analytics) puts usage, per-model share, and success rate together in one endpoint; these three come from the same batch of numbers.
Its time series accepts a granularity (minute / half-hour / hour / day) and can plot spend, request count, tokens, success rate, or average latency; the detail table groups by model, channel, key, or stage, and the console page itself toggles among these five metrics and four groupings. The model-share chart keeps only the 6 models with the most requests and folds the rest into Other; an account that ran thirty models sees the ones that truly dominate, not thirty thin lines squeezed together indistinguishably.
/usage (with query, message, daily-chart, live, cost-series endpoints) provides the data used by the console charts and the "in-flight calls" live view; POST /usage/realtime/ticket is the WebSocket handshake ticket for that live view, expiring after a single use.
Next steps
- Want to figure out which costs land on you: read Billing rules.
- Want to reconcile by period: read Statements and invoices.
- Want to pull data programmatically: read Reconciliation API.