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.
Limits
What this solves: Tell "requests too fast" apart from "quota exhausted", learn what each of the four rate-limit tiers limits and how to adjust them, and what happens on timeout.
Rate limits and quotas are not the same thing: rate limits control request frequency, quotas control how much money you can spend or how much quota you can use. Tell them apart first when troubleshooting a failure.
Quick diagnosis
| Symptom | Meaning | Handling |
|---|---|---|
429 | Requests too frequent | Retry per Retry-After or raise the threshold |
403 + a quota/limit rejection | Quota, budget, or key limit triggered | Adjust the corresponding quota, don't blindly retry |
402 | Account balance insufficient | Handle top-up, credit, or platform model balance |
Suggested setup
- Go live with the default rate limits first.
- Observe the request peak of production traffic.
- Raise the key or account threshold separately for high-frequency jobs.
- Set a cumulative limit on child keys, so no single end user runs away.
- Use a Mock drill for
429, quota exhausted, and arrears to confirm the client handles them correctly.
Adjust rate limits so normal peaks get through and runaway loops stop — not to push the numbers as high as possible.
Four tiers, counted independently
Rate limits have four tiers, each counted independently:
| Counted by | Default threshold | Good for |
|---|---|---|
| Model calls (per key) | 100/min | A runaway loop from a single end user |
| Model calls (account total) | 6000/min | Ten thousand keys each making a few calls: invisible at the per-key level, but the total is already maxed out |
| Provisioning key | 1200/min | Creating, modifying, and disabling child keys, at roughly the frequency of billing events |
| Reconciliation / integration API | 1200/min | Read-only reports; month-end reconciliation pages through hundreds of pages by day, by key, by model |
Per-key model rate limits are counted independently: each end user has one child key, each with a default of 100/min; these calls are also subject to the account total default of 6000/min.
A streaming call counts as one call, regardless of duration or frame count, and the count happens at authentication time.
Response when exceeded
Returns 429 with Retry-After (seconds).
Quota exhausted is 403, not 429: 429 means "too fast, retry later", and the client backs off and retries, whereas waiting longer won't restore an exhausted quota. See the full comparison in Error codes.
Raising the threshold
All four tiers are truly self-service via PUT /v1/alerts/rules: set a threshold and it takes effect, with no application and no waiting for approval.
| Tier | ruleType | apiKeyId |
|---|---|---|
| Model calls (per key) | HIGH_FREQUENCY | that key |
| Model calls (account total) | HIGH_FREQUENCY_ACCOUNT | omit it, it's account-level by nature |
| Provisioning key | HIGH_FREQUENCY | that provisioning key |
| Reconciliation / integration API | HIGH_FREQUENCY | that reconciliation key |
Just include the new threshold. If you don't pass action, the platform default for this tier is used (BLOCK: reject once maxed out); set it to NOTIFY if you want notification only, without blocking.
GET /v1/alerts/rules shows the value actually in effect for each tier right now; tiers you haven't overridden show the platform default.
"In effect" is within a minute, not instant across the fleet. This change takes up to 60 seconds to roll out, during which different calls may read the old value.
Child key count
The number of child keys under an account is not limited. Ten thousand is a scale we've tested (authentication, locating by external_id, the first list page, and deep paging are all unaffected). There is no upper limit, and therefore no corresponding error code.
What is limited is the number of rows returned by a single list request: GET /v1/keys?limit= defaults to 100 and maxes out at 200; passing a larger value doesn't error; it just gets clamped to 200. Page with next_cursor (see Provisioning key).
Circuit breaker and recovery
This group is observability parameters, not an availability commitment (Tare does not provide SLA numbers).
| Default | |
|---|---|
| Consecutive failures before removal | 5 |
| Cooldown after removal | starts at 30 seconds, exponential backoff, capped at 300 seconds |
| Active probing | one round every 30 seconds, up to 20 per round; the first round starts 60 seconds after the service starts |
| Health statistics window | 300 seconds, minimum 5 samples, error-rate threshold 50% |
| Probe timeout | connect 5 seconds / read 20 seconds |
The recovery criterion is a successful probe, not waiting long enough: after the cooldown ends, active probing confirms it, and it's put back into the candidate pool once it passes. So the impact ceiling of a single upstream blip is "one cooldown period + one probe interval".
Circuit breaker state is shared, not counted separately per caller; otherwise the same failing channel would be judged repeatedly and hit the same threshold over and over.
Concurrency and timeouts
- Concurrent connections are not limited separately; the per-minute request count above is the effective limit.
- Connecting upstream times out at 10 seconds; failing to establish a connection counts as a failed attempt and goes to failover.
- Read timeout is 300 seconds, and it's the cap on the gap between two frames, not the total duration of a response: a ten-minute-long answer won't be cut off, but an upstream that stalls for more than 5 minutes will be.
- The number of upstream attempts per request is not limited by default: however many routes the model has configured, that's the maximum number of attempts. It's only truncated when the account has a limit configured separately, and a truncated candidate is recorded as
never triedin the call details.
Next steps
- See the full error code comparison: read Error codes.
- Configure alert thresholds and actions: read Alerts.
- Learn about provisioning keys and child keys: read Provisioning key.
- Drill over-limit and arrears: read Mock (drill).
- Unfamiliar term: check the glossary.