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.
Billing rules
What this solves: Explains when balance is deducted, when a cost is merely recorded, and why a failed call is sometimes a 402 and sometimes a 403.
The one-line principle
Whether you're charged depends only on who pays for this call's tokens.
| Route taken | Token fee | Governance fee |
|---|---|---|
| Platform model | Charged per the platform price list | — |
| Your own channel (BYOK) | Not charged; the provider already bills you directly | Charged. Floor 0.0001. A higher rate follows the trial or contract |
The diagram below separates the token fee on a normal call. BYOK also pays a governance fee, floor 0.0001. Interrupted calls are covered below.
So a zero balance doesn't block calls on your own channel: those tokens aren't owed to the platform, and the platform shouldn't block a call that could have gone through anyway.
First tell the three limits apart
Before diagnosing a failure, figure out which limit might have blocked the request:
| Limit | Granularity | Resets monthly | Typical symptom |
|---|---|---|---|
| Account balance | Account | No | Platform model arrears is usually a 402 |
| Monthly budget | Governance config on the account or key | Yes | Over budget is usually a 403 |
| Key limit | A single key | No by default; can reset daily, weekly, or monthly | A Child key or Inference key that's used up is usually a 403 |
Tokens on a BYOK channel are paid by you directly to the provider. Tare records their cost and the governance fee, but this is not the same as the platform model deducting balance.
Diagnosis order
- Look at the HTTP status code first.
- Then look at
error.type(always present; this is the field the OpenAI SDK reads) andmetadata.refusal_reason.error.codeis always equal to the HTTP status code; branching on it is never wrong, but it won't show the specific cause. - If it's a 402, check the account balance first.
- If it's a 403, check in order: key type, key limit, monthly budget, source IP, DLP.
- If it's a 429, treat it as a rate limit; don't mistake it for arrears.
402 and 403 are two different things; don't mix them up. 402 only means the account owes the platform; 403 means a governance threshold (key limit, monthly budget) blocked it. See Error codes for details.
Details
Governance fee
Your own channel is charged a governance fee per million tokens (input + output), floor 0.0001, not a percentage cut of the provider's charge. A rate above the floor follows the trial or contract. The Routing page shows the current price list.
Balance and key limit
- Account balance applies only to platform models.
- The limit on a key is independent of the balance and caps a single key's spend. A runaway task stops at the limit instead of draining the whole account.
- When exhausted, it returns a dedicated error code (see Error codes) rather than a generic failure.
Interrupted calls: whether you're charged depends on who broke it and where
When a stream is interrupted, the upstream tokens have usually already been consumed. But the usage numbers are in the final frame, and the final frame never arrives. So Tare queries upstream afterward and records the real cost, rather than discarding it.
Whether this charge ultimately lands on your bill depends on two things: who caused the interruption, and whose money these tokens are.
| Interruption cause | Your own channel (BYOK) | Platform model |
|---|---|---|
| Upstream failure (timeout, error, rate limit) | Not charged | Not charged |
| Your client disconnects before the stream ends | Not charged (on this channel you're already paying the provider directly) | Charged at the real upstream cost found by the query, with no markup |
The "Platform model" cell takes effect from 2026-09-26. Before that, this class was borne by the platform.
When the client disconnects after reading the first chunk, upstream still runs the whole generation to completion and bills it; with an expensive model and a large max_tokens, this kind of disconnect keeps generating cost. The charge collected is exactly the original price on the upstream bill, with no markup.
Whether or not this charge ends up on you, the record always keeps the real upstream cost: reconciliation and gross-margin accounting won't lose track of where this money went just because one line didn't charge you.
Failover iterates over every configured route
A model can have any number of routes configured, and one call tries them all in order until one succeeds. The platform sets no cap: configure four fallbacks and it tries at most four times. Whether to bear the extra wait for one more fallback is a trade-off for the account owner.
Two outcomes don't count as an attempt and are listed separately in Call Traces:
- parked: that channel was taken out of rotation by the circuit breaker at the time, and not a byte was sent;
- never tried: a candidate that wasn't reached. This only appears when the emergency attempt cap is enabled, which is a global switch, off by default and not configurable per account.
On the Tare server path, every real attempt counts toward the governance fee's minimum charge. A failover means the platform sent two upstream requests (opened two connections, waited out two timeouts), so the minimum charge is counted twice. Those blocked by the circuit breaker don't count: not a byte was sent, and it's a platform-side issue. Failures reported by a node have no floor fee.
Failover and billing line count
One call won't produce two billing lines. Failover only happens before the first byte is returned, i.e. when the attempt hasn't produced any token consumption yet; once content starts returning there's no more failover. Therefore:
- The prompt tokens of a failed attempt don't go on your bill;
- One business call has only one charged line on the bill.
You won't be charged in this case: when a non-streaming request fails over due to timeout while upstream has actually completed, upstream may bill it twice. This cost is borne by the platform and not passed on to you. (A mid-stream disconnect is a different case, see the "Interrupted calls" section above; that class can land on your bill.)
Next steps
- Want to know which business line each charge went to: read Cost attribution.
- Want to reconcile by period: read Statements and invoices.
- Want to see what 402 / 403 / 429 each mean: read Error codes.