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.
Alerts
What this solves: Get notified when there's spend, request volume, a channel failure, or a DLP hit — and confirm the notification actually arrived, instead of stopping at "saved successfully".
Alert configuration has to do two things at once: rules and delivery channels. Configure only half and you have no alerts.
Setup order
- Open Alerts.
- Choose an account-level rule, or configure an exception rule for a specific key.
- Set the threshold, action, and enabled state.
- Configure a delivery channel: Webhook or Feishu / Lark.
- After saving, verify delivery: check the recent notification log and confirm the target group or Webhook actually received the message.
Don't take "saved successfully" as "alerts will be delivered". The Feishu signing secret, bot permissions, and clock skew can all cause you to miss messages, and most of these failures are silent.
How to think about account-level vs. key-level
Account-level rules cover all keys that don't have their own configuration. When a key has its own rule, it overrides the account default. This lets you set a separate budget for a production key without repeating the configuration on every key.
Rule types
Console → Alerts. Rules monitor spend, error rate, and channel failures; the channel decides where notifications go.
Each rule is resolved by (account, key), most specific wins: a rule set on a key overrides one set on the whole account, and an account-level one overrides the platform default.
ruleType | What it monitors | Default action | Scope |
|---|---|---|---|
HIGH_FREQUENCY | Requests per minute for a single key: model, provisioning, or reconciliation key | BLOCK | Per key |
HIGH_FREQUENCY_ACCOUNT | Total model requests per minute for the whole account | BLOCK | Account |
MONTHLY_BUDGET | Monthly budget consumption, at the 50% / 80% / 100% tiers | NOTIFY | Account |
LOW_BALANCE | How many days you can last at the current burn rate, not a fixed balance figure | NOTIFY | Account |
UPSTREAM_CHANNEL_DOWN | A channel is circuit-broken or recovered, or keeps rejecting requests other channels serve | NOTIFY | Account |
UPSTREAM_ALL_DOWN | All candidate channels for a model are unavailable and requests are being rejected | NOTIFY | Account |
DLP_DETECTED | A request contains sensitive content you set to "alert" on the Security page; the request is forwarded unchanged | NOTIFY | Account |
NODE_OFFLINE | One of your local nodes has had its tunnel down for 3 minutes, or has reconnected after that | NOTIFY | Account |
PROVIDER_ARREARS | One of your channels' upstream accounts is out of credit (the upstream says so: in arrears, insufficient balance, HTTP 402) | NOTIFY | Account or channel |
PROVIDER_ACCOUNT_BANNED | One of your channels' upstream accounts is disabled, suspended, or refuses every request with an empty answer | NOTIFY | Account or channel |
PROVIDER_STREAM_ERRORS | One of your channels keeps cutting streams off with an error after output has started: 5 times in 10 minutes by default | NOTIFY | Account or channel |
MONTHLY_BUDGETcounts everything you spend through Tare, including what you pay your own upstream on BYOK.LOW_BALANCEonly covers traffic Tare bills (platform models).UPSTREAM_CHANNEL_DOWNis a heads-up: traffic fails over to the next candidate, unless it was the only channel for that model. You also get it when a channel rejects a request with a 4xx three times within an hour and the same request then succeeds on another channel. That channel is not paused, but each of those requests took an extra round trip. The notification carries the upstream's error message; usually the channel rejects a particular field or input type, so either add a parameter rule for it or remove it from that model's route.UPSTREAM_ALL_DOWNis an outage: calls to that model are refused with503.HIGH_FREQUENCY_ACCOUNTis for fleets of child keys that each stay under the per-key limit but add up.- The three
PROVIDER_*rules name the cause instead of the symptom, and fire once per channel, not once per model: an account that runs out of credit stops every model on it, and you get one notification that says to top it up. Out of credit and banned fire on the first occurrence and then stay quiet for 6 hours; error frames fire when the count reaches the threshold. They are on by default and only cover your own channels. You can switch any of them off for a single channel, see below. - An upstream that answers
200but refuses before writing a single word counts as a failed attempt, and the request moves to the next channel on the route. If every channel refuses, you get the last refusal unchanged (finish_reason: "content_filter"): then it is the request content, not the channel. - A rule with no threshold and no platform default stays silent until you set a value.
BLOCK exists only on these two HIGH_FREQUENCY* types, and only you can loosen it.
All other rules default to NOTIFY: a spend or availability alert shouldn't block your own traffic the first time it fires.
HIGH_FREQUENCY is the platform's own request-rate guardrail, and it's in effect as BLOCK by default; you can raise the threshold or change it to
NOTIFY (see Rate limits and quotas), but it never starts out looser than this.
Configuring a rule
GET /v1/alerts/rules?apiKeyId=: each rule type, whether it's configured, and if so the currently effective threshold/action/severity/channel. OmitapiKeyIdfor the account-level view.PUT /v1/alerts/rules: create or update one, located by (ruleType,apiKeyId). Fields:threshold,windowSeconds,action,severity(INFO/WARNING/CRITICAL),channels(comma-separated channel names, see below; empty means send to all channels you've configured),silenceSeconds,enabled.DELETE /v1/alerts/rules/{id}: delete your override, falling back to the account or platform default — not turning the whole rule off.GET /v1/alerts/rules/overrides: which keys carry a rule different from the account default. Per-key exceptions are completely invisible in the account-level view; this is the only place to see them.PROVIDER_*rules can also be set for one channel: addproviderId(the channel's id) toPUT /v1/alerts/rules, withoutapiKeyId.GET /v1/alerts/rules/providerslists them. Order of precedence: this channel's rule, then your account rule, then the platform default. In the console this is the "Provider alerts by channel" table on the Alerts page.
Delivery channels
| Channel | Target |
|---|---|
| Webhook | Any URL; Tare sends JSON via POST |
| Feishu / Lark | Group bot webhook, with optional signature verification. Lark bots use the same format: paste the open.larksuite.com address here |
| WeCom | Group robot webhook: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=…. The key in the address is the credential |
Saving replaces all channels; any left empty are deleted. Existing targets are shown masked and can't be edited in place: the webhook URL is itself a credential and the platform doesn't return it.
Webhook payload
{
"msg_type": "text",
"content": { "text": "Monthly budget 80% used\n\n..." },
"rule_type": "MONTHLY_BUDGET",
"severity": "WARNING",
"title": "Monthly budget 80% used",
"text": "...",
"triggered_at": "2026-11-20T21:51:36",
"api_key_id": 2051,
"api_key_name": "customer-42",
"external_id": "cus_42",
"issuer_key_id": 17,
"issuer_key_name": "partner-master"
}
| Field | Meaning |
|---|---|
msg_type, content | The shape Feishu / Lark group bots accept, so the same URL works there |
rule_type | One of the rule types above |
severity | INFO, WARNING or CRITICAL |
title, text | The notification in plain text |
triggered_at | When the rule fired, ISO 8601 without a time-zone offset |
api_key_id, api_key_name | The key the alert is about |
external_id | The external_id you gave the key when you created it with a provisioning key |
issuer_key_id, issuer_key_name | The provisioning key that issued it |
The five key fields are null for account-wide alerts (budget, balance, channel and node alerts), and the issuer fields are null for a key you created yourself. If you issue one child key per customer, external_id tells you which customer an alert is for. The key itself is never sent.
Troubleshooting when alerts don't arrive
Feishu signature verification
Fill in the signing secret when the group bot has "signature verification" enabled; leave it empty when it's off.
Getting it wrong is silent. A bot with verification on rejects unsigned messages, and the reason stays on the Feishu side, so the platform only sees an error code and you receive no alert. The platform also can't probe whether the other side has it on: a bot with verification off also accepts signed messages. Only you can confirm the state of this switch.
Feishu also only accepts timestamps within an hour of its own clock, so clock skew has exactly the same symptom as a wrong secret.
There is no platform-level fallback channel
When no channel is configured, the alert is recorded as "send failed" and stays in that state; it is not forwarded to the platform. Your alert content shouldn't be forwarded through the platform — that would be a data leak, not a fallback.
Next steps
- Raise or loosen rate limit thresholds: read Rate limits and quotas.
- Make DLP hits trigger a notification: read Data protection (DLP).
- See the full error code comparison: read Error codes.
- Unfamiliar term: check the glossary.