Skip to main content
Docs

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.

BillingBilling rules

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 takenToken feeGovernance fee
Platform modelCharged per the platform price list—
Your own channel (BYOK)Not charged; the provider already bills you directlyCharged. 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.

Who charges the token fee on a normal call Token fee on a normal call: platform models debit the balance at the platform price list. BYOK settles tokens with the provider, and Tare does not charge that token fee again. BYOK also pays a governance fee, floor 0.0001, with a higher rate set by trial or contract. Interrupted calls follow the rules in the text. Who charges the token fee on a normal call Who pays for this call's tokens? Platform models debit balance. BYOK settles with the provider. Platform model Token fee: your price list Debited from the balance Your channel (BYOK) Token fee: not charged The provider already billed you BYOK governance fee floor 0.0001. A higher rate follows the trial or contract. The token fee is not taken from balance, so a zero balance does not block BYOK.
Who charges the token fee for a normal call

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:

LimitGranularityResets monthlyTypical symptom
Account balanceAccountNoPlatform model arrears is usually a 402
Monthly budgetGovernance config on the account or keyYesOver budget is usually a 403
Key limitA single keyNo by default; can reset daily, weekly, or monthlyA 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

  1. Look at the HTTP status code first.
  2. Then look at error.type (always present; this is the field the OpenAI SDK reads) and metadata.refusal_reason. error.code is always equal to the HTTP status code; branching on it is never wrong, but it won't show the specific cause.
  3. If it's a 402, check the account balance first.
  4. If it's a 403, check in order: key type, key limit, monthly budget, source IP, DLP.
  5. 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 causeYour own channel (BYOK)Platform model
Upstream failure (timeout, error, rate limit)Not chargedNot charged
Your client disconnects before the stream endsNot 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.

Interrupted call: who broke it, who pays On an upstream failure, neither your channel nor a platform model is charged. If your client disconnects before the stream ends, your channel is not charged and a platform model is charged at the looked-up upstream cost with no markup. Interrupted call: who broke it, who pays Cause \ channel Your channel (BYOK) Platform model Upstream fault Timeout, error, limit Not charged Not charged Your client drops Before the stream ends Not charged Billed at real upstream cost No markup The platform-model / client-drop cell starts 2026-09-26. Before that, the platform paid it too. Whether it lands on you or not, the record keeps the real upstream cost for reconciliation and margin.
Interrupted calls: whether you're charged depends on who broke it and where

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

Docs last updated Nov 27, 2026, 12:56 (UTC+8)