Docs

Platform

Governance and alerts

Decide which models, providers and data may reach your AI providers, cap monthly spend, and get told when spend or a rule needs attention. This page covers Governance, Alerts, notification channels and the Inbox.

Before you start

  • A Token Meter workspace, and the right role for the part you are setting up. See Who can use it. Most setup needs an Owner or Admin.
  • For alerts: an email address, a Slack incoming-webhook URL, or a Discord webhook URL (see Notification channels for where to get one).
  • To stop calls, not just record them: your app sends its AI calls through the Router, or checks them first with governance preflight.
  • For provider controls and key revocation at OpenAI or Anthropic: that provider's admin key connected on Settings › Connections.

Blocked or detected

A call that goes through the Router, or is checked first by governance preflight, is checked before the provider sees it. A call that breaks a rule can be blocked. Usage that reaches Token Meter any other way (the SDK, OpenTelemetry, provider usage reports) has already happened. A rule break there can only be detected: Token Meter alerts you, can open a ticket and, if you opt in, revokes the key that made it.

Who can use it

AreaWhereWho
Rules (allowed models, scanning, violations, provider controls)Governance › RulesOwners and admins
API keysGovernance › API keysOwners, admins and team leads. A team lead sees and manages only keys assigned to a team they lead. Read keys: owners and admins only.
BudgetsGovernance › BudgetsTeam leads can view. Only owners and admins can create, change or delete budgets and channels.
Activity log, RetentionGovernance › Activity log (Retention is a link on that page)Owners and admins
Shadow AIGovernance › Rules › Shadow AI (link at the foot of Rules)Owners and admins
AlertsAlertsOwners and admins
Notification channelsSettings › NotificationsOwners and admins
InboxInboxAnyone who can open Alerts, Governance › Rules or Shadow AI. Each person sees only items from the pages they can open.

Tabs you cannot open are hidden. Owners and admins who open Governance land on Budgets. The tabs are API keys, Budgets, Rules and Activity log. Team leads see only API keys (where they land) and Budgets.

Ingest keys

An ingest key (it starts tl_live_…) is the password your app uses to talk to Token Meter. The SDK, the Router and governance preflight all use it. A key can carry a default environment and a default team. Token Meter adds those to the usage the key reports.

Create a key

  1. In the dashboard, open Governance › API keys and choose Create key.
  2. Enter a Name, for example prod-api.
  3. Optionally fill in Environment (optional) and Team (optional).
  4. Choose Create key. A Key created: copy it now banner shows the key.
  5. Copy the key and store it where your app reads secrets, for example as the TOKEN_METER_KEY environment variable. It is shown only once. Token Meter keeps only its first characters and a hash.

The key table shows each key's name, the start of the key, Created (UTC) and Last seen (UTC). When some key needs them, it also shows Env / team, Expires (UTC) and Status (Revoked or Expired; blank while a key works).

Rotate without downtime

  1. On the key's row, choose Actions › Rotate. A second live key appears with the same name, environment and team, and a New key minted: copy it now banner shows it.
  2. Put the new key in your app and deploy. Both keys work in the meantime.
  3. Revoke the old key (below). A name can have at most two live keys, so you must revoke one before you rotate again.

Revoke

  1. On the key's row, choose Actions › Revoke.
  2. Type the key's name to confirm, and confirm.

The key stops working at once and cannot be restored. The SDK, the Router and preflight all refuse it with HTTP 403 and the code key_revoked. An expired key gets the same answer. A key Token Meter has never seen gets 401 invalid_key.

Preflight refuses a revoked key in every fail mode

A 401 or 403 from preflight raises GovernanceRejected / GovernanceRejectedError, even with fail mode open. (SDK 0.2.0 treated it as an outage and, in fail mode open, let the call go ahead. Use 0.2.1 or later.)

Read API keys

A read key (it starts tl_admin_…) can only read daily usage summaries from /api/v1/usage/daily. It cannot send or change usage. Only owners and admins can make one:

  1. On Governance › API keys, choose Create a read key (below the key table).
  2. Enter a Name, for example warehouse-export, and choose Create read key.
  3. Copy the key from the banner. It is shown once.

Keep read keys separate from ingest keys. See the Read API reference.

Access policies

An access policy is a rule about AI calls: which models and providers may be used, which kinds of data may be sent, and how large or costly one call may be. You manage them on Governance › Rules, in the Allowed models section.

Create a policy

  1. Open Governance › Rules and, under Allowed models, choose New rule.
  2. Enter a Policy Name.
  3. Pick a Team Scope: Global (All Teams) or one team.
  4. Pick an Environment: All Environments, or one environment.
  5. Set the rules you need. Leave the rest empty.
    • Allowed Models: only these models may be used. Empty means all models are allowed.
    • Blocked Models: these models may not be used.
    • Providers: click a provider once to allow it (then only the providers you allow may be used). Click again to block it. Click a third time to clear it.
    • Blocked Data Classes: calls carrying any of these kinds of data are refused (see below).
    • Max Tokens / Request and Max Cost / Request (USD).
  6. Set the Violation Severity (low, medium, high or critical; high by default). Optionally add an Owner Email. Both are copied onto every violation of this policy.
  7. Optionally tick Revoke credentials on detected violations (see Automatic credential revocation).
  8. Choose Create Policy. The policy appears in the list as Active.

The list shows each policy's scope, models, rules, violations in the last 30 days and status. Click the status to switch a policy between Active and Disabled. Use Delete to remove it.

A policy marked Managed by Agent registry blocks the models of tools marked Prohibited in the Agent registry. An Anthropic, OpenAI, Azure OpenAI or Claude-on-Vertex model is blocked under its undated name, so every dated version of it is blocked too (prohibiting claude-opus-4-5-20251101 blocks claude-opus-4-5 and all its versions). Gemini and Bedrock models are blocked exactly as named. The Router refuses calls to a blocked model, and a call made straight to the provider is recorded as a Detected violation when its usage arrives. Calls made straight to Amazon Bedrock never pass through the Router, so for a Bedrock model Prohibit can only record them; to refuse that Claude model at the Router as well, block it (for example claude-sonnet-4-5) in a rule of your own, which blocks it on every endpoint. You cannot switch it off or delete it here. To remove it, un-prohibit the tool (its row links there with Edit in registry). Two rows in the registry can name the same model: another dated name of it, or a tool that uses it. Prohibiting one blocks the model for both, so the other row says Blocked by the Prohibited one, the Prohibited row says what else it Also blocks, and Prohibit asks first when it would block another row. A model seen in usage is listed once per provider, whichever of its dated names the usage came under, and not at all when the registry already has a row for it. For an Amazon Bedrock model the other row says Flagged by instead: its usage is recorded, not refused.

How policies apply

  • Every active policy whose scope matches a call applies to it. When several set a token or cost cap, the tightest one wins.
  • A team-scoped policy compares the call's team tag with the team's slug (its short id). A call with no team tag never matches a team-scoped policy. Environment works the same way.
  • Model rules match a model and its dated versions: gpt-4o covers gpt-4o-2024-08-06, but not gpt-4o-mini. They never match on part of a name.
  • Data classes are labels for sensitive data. A family name covers its members: blocking pii also blocks pii.email, pii.phone and pii.us_ssn. The Router and preflight look for email addresses, phone numbers, US social security numbers, card numbers, API keys, AWS access keys and private keys in the prompt. Your code can also declare a class (public, internal, confidential, restricted, pii, phi or pci) with data_classification. That is the only way Token Meter knows business labels such as restricted or phi. Only the labels are kept, never the matched text.
  • Separately from policies, ingest scans event metadata (feature, customer reference and tag values) for things like email addresses, phone numbers, card numbers and API keys. It redacts them before storing the event. The PII detections link at the foot of Governance › Rules opens the Use cases page (also under More breakdowns on Analytics › Spend), which counts what was redacted.

Where policies are enforced

WhereWhenWhat happens on a violation
RouterBefore the provider is calledThe call is refused with HTTP 400. The code is request_blocked_by_governance_policy, or model_blocked_by_governance_policy when only model rules were broken. Recorded as Blocked.
Governance preflightBefore a call your code makes straight to a providerRecorded as Blocked. In enforce mode (the default) the SDK refuses the call. In advisory mode the call still goes ahead; see the note below.
Ingest (SDK, OpenTelemetry)After the call already happenedRecorded as Detected: alert, ticket webhook and optional revocation.
Provider usage reportEvery 15 minutes, for provider controlsRecorded as Detected.

Before a call, the Router checks the final provider and model (after tiering and any fallback), the data classes found in the prompt plus any declared ones, the worst-case token count (input plus the output limit) and its estimated cost. After a call, ingest checks the provider, model, actual tokens, reported cost and any class declared on the event in tags.data_classification. Ingest never sees the prompt.

The Router's refusal is a JSON body like this one. Match on error_code (or error.code), not on error, which is an object. The OpenAI SDKs also put the code on the error's code property.

JSON
{
  "error": {
    "message": "A governance policy blocked this request. The violations are listed in this body.",
    "type": "invalid_request_error",
    "code": "request_blocked_by_governance_policy"
  },
  "error_code": "request_blocked_by_governance_policy",
  "message": "A governance policy blocked this request. The violations are listed in this body.",
  "type": "error",
  "violations": [
    {
      "policy_id": "<policy id>",
      "kind": "data_classification",
      "reason": "Request carries blocked data classes: pii.email"
    }
  ]
}

If the Router cannot read your policies, it refuses the call with 503 governance_policies_unavailable rather than letting it through. All codes are listed under Errors your app sees.

For calls your code makes straight to a provider, governance preflight asks the Router first, under the same policies. It adds one round trip and can stop the call.

Preflight in advisory mode

In advisory mode the call goes ahead, but the denial is still recorded as a Blocked violation. A Blocked violation raises no alert and is listed in the Inbox. The usage that follows is checked again at ingest, so a breach there is also recorded as a separate Detected violation, with its alert, webhook and optional revocation.

Provider controls

A provider control is your list of approved provider projects, API keys and service accounts. Token Meter compares it with the usage your provider reports. Usage from anything not on the list is recorded as a Detected violation. Provider controls are on Governance › Rules, under Advanced.

  1. Connect the provider's admin key on Settings › Connections, so its usage is reported. Without it, the control shows "no usage feed connected" and checks nothing.
  2. On Governance › Rules, open Advanced and choose Add provider control.
  3. Pick the Provider and a Severity.
  4. Fill in at least one of Approved projects / workspaces / accounts, Approved API key ids and Approved service accounts (key owners). Separate values with commas. An empty control is refused because it would restrict nothing.
  5. Optionally add an Owner email. Tick Revoke the offending key automatically if you want that. It works for OpenAI and Anthropic only, and also needs the workspace-wide switch (see Set up detection and remediation).
  6. Choose Save control.

Saving a provider that already has a control replaces it. Each control shows how far it has checked. Delete stops it at once.

Violations and remediation

Governance › Rules shows how much of your traffic policy can catch, and what it caught.

Enforcement coverage

The top of Governance › Rules says how many of your requests in the last 30 days went through the Router. Calls through the Router, or checked first with governance preflight, can be blocked before they reach the provider. Other usage (SDK, OpenTelemetry, provider reports) can only be detected. The sentence is hidden until there are requests.

Policy violations

Each violation shows where it was caught, the policy (or provider control), its scope, team and environment, project and key, owner, how often and when it was seen, what remediation ran, and its status. The same block repeated within an hour, or the same detection repeated on the same day, adds to one violation's count.

Open a violation to Resolve, Acknowledge or Dismiss it, or Reopen a closed one. The list shows Open and acknowledged by default. Switch to All for the history.

Blocked violations notify nobody

A blocked call never reached the provider, so it gets no alert, webhook or revocation. It is listed on Governance › Rules and in the Inbox.

What happens on a detected violation

A job runs every minute. For each new detected violation it does three things:

  1. Alert. If the severity is at or above Alert at severity (medium until you change it), it raises an alert. The alert goes to the channels on your workspace-wide Governance violation (detected) rule. A critical violation becomes a Critical alert, low becomes Info, and medium and high become Warning. Without that rule, the alert shows on Alerts and in the Inbox but is sent nowhere.
  2. Ticket webhook. If you set one, it sends a signed JSON POST (see Ticket webhook).
  3. Revocation. Only if both the policy (or provider control) and the workspace allow it.

The violation's Remediation field shows each result: Alert sent or "below threshold / pending", the webhook status, and the revocation status with what was revoked.

Set up detection and remediation

  1. On Governance › Rules, choose Detection & remediation.
  2. Pick Alert at severity, for example medium and above.
  3. Optionally enter a Ticket / incident webhook URL. It must be a public https:// address.
  4. Optionally tick Allow automatic credential revocation.
  5. Choose Save. If you entered a webhook URL, the dialog shows a signing secret. Copy it now: it is shown once. Saving a new URL makes a new secret.
  6. If the dialog says "No alert channel yet", create a Governance violation (detected) rule on Alerts (see Alerts and alert rules).

Ticket webhook

Token Meter sends each detected violation once, as a POST with a JSON body. Point it at Jira or ServiceNow automation, PagerDuty, or anything that accepts JSON. The body looks like this:

JSON
{
  "type": "governance.violation.detected",
  "violation": {
    "id": "<violation id>",
    "org_id": 123,
    "policy_id": "<policy id>",
    "control_id": null,
    "enforcement_point": "ingest",
    "kind": "model_not_allowed",
    "severity": "high",
    "owner_email": "team-lead@company.com",
    "team": "core-platform",
    "environment": "production",
    "provider": "openai",
    "model": "gpt-4o",
    "provider_key_id": null,
    "provider_project_id": null,
    "event_id": "<event id>",
    "reason": "Model \"gpt-4o\" is not on the governance allowlist",
    "occurrences": 1,
    "first_seen_at": "2026-11-14T09:30:12.000Z",
    "last_seen_at": "2026-11-14T09:30:12.000Z",
    "auto_revoke": false
  }
}
  • kind is one of model_blocked, model_not_allowed, provider_blocked, provider_not_allowed, data_classification, token_cap, cost_cap, unapproved_provider_project, unapproved_provider_key or unapproved_service_account.
  • enforcement_point is ingest (usage from the SDK or OpenTelemetry) or provider_usage (usage your provider reported). For provider_usage, control_id (as a string), provider_key_id and provider_project_id are filled in when known.
  • The body never contains prompt content or credentials.

Every request carries two headers:

  • X-TokenMeter-Timestamp: when it was sent, in Unix seconds.
  • X-TokenMeter-Signature: v1= followed by the hex HMAC-SHA256 of <timestamp>.<raw body>, keyed with your signing secret.

The same values also arrive under the older names X-TokenLens-Timestamp and X-TokenLens-Signature. Use the X-TokenMeter-* ones.

Check the signature, and the timestamp's age, before you trust the body. This complete receiver does both. Set TOKEN_METER_WEBHOOK_SECRET to your signing secret, run it behind your HTTPS address, and enter that address as the webhook URL:

webhook-receiver.ts
// Node 20+, no packages needed. Run: npx tsx webhook-receiver.ts
import { createServer, type IncomingMessage } from "node:http";
import { createHmac, timingSafeEqual } from "node:crypto";

const SECRET = process.env.TOKEN_METER_WEBHOOK_SECRET ?? ""; // the signing secret shown once in Token Meter
const MAX_AGE_SECONDS = 300; // refuse anything signed more than 5 minutes ago (stops replays)

function header(req: IncomingMessage, name: string): string | undefined {
  const value = req.headers[name];
  return Array.isArray(value) ? value[0] : value;
}

export function verify(rawBody: Buffer, timestamp: string | undefined, signature: string | undefined): boolean {
  if (!SECRET || !timestamp || !signature) return false;
  const sentAt = Number(timestamp);
  if (!Number.isInteger(sentAt) || Math.abs(Date.now() / 1000 - sentAt) > MAX_AGE_SECONDS) return false;
  const expected = "v1=" + createHmac("sha256", SECRET).update(`${timestamp}.`).update(rawBody).digest("hex");
  const a = Buffer.from(expected);
  const b = Buffer.from(signature);
  return a.length === b.length && timingSafeEqual(a, b);
}

createServer((req, res) => {
  if (req.method !== "POST") {
    res.writeHead(405).end();
    return;
  }
  const chunks: Buffer[] = [];
  req.on("data", (chunk: Buffer) => chunks.push(chunk));
  req.on("end", () => {
    const rawBody = Buffer.concat(chunks);
    if (!verify(rawBody, header(req, "x-tokenmeter-timestamp"), header(req, "x-tokenmeter-signature"))) {
      res.writeHead(401).end();
      return;
    }
    const payload = JSON.parse(rawBody.toString("utf8"));
    const v = payload.violation;
    // Open your ticket here. Use v.id to ignore a violation you have already handled.
    console.log(payload.type, v.id, v.severity, v.kind, v.reason);
    res.writeHead(204).end(); // any 2xx within 5 seconds counts as delivered
  });
}).listen(Number(process.env.PORT ?? 8080));
  • Any 2xx answer counts as delivered. Each attempt times out after 5 seconds.
  • A failed delivery is tried again on the next runs, a minute apart, up to three attempts in all. Each attempt is signed with a fresh timestamp. Use violation.id to ignore one you already handled.
  • Redirects are not followed. The URL is checked again before every send.
  • To stop sending, open Detection & remediation, tick Remove the configured webhook and choose Save.

Automatic credential revocation

Revocation runs only on detected violations. It needs Allow automatic credential revocation on for the workspace, and the policy or provider control that raised the violation must also have opted in. What gets revoked depends on where the usage was seen:

  • Ingest (SDK, OpenTelemetry): the Token Meter ingest key that reported the usage. It is revoked at once, which also stops that app's Router and preflight calls.
  • Provider usage report: the provider API key that made the call, using your connected admin key. OpenAI keys are deleted from their project. Anthropic keys are set to inactive. Other providers' keys are reported as unsupported; use their own access controls, or the provider-side policies below.

Revocation cannot be undone

A revoked ingest key cannot be restored. To bring the app back, create or rotate a key on Governance › API keys and roll it out.

Provider-side enforcement

Token Meter cannot block traffic that never reaches it. Provider-side enforcement on Governance › Rules turns your workspace-wide policies (those with no team or environment scope) into an AWS Organizations SCP for Bedrock and an Azure Policy for Azure OpenAI. Review them before you apply them: wildcard ARNs and Azure aliases can match more than the exact model names.

Budgets

A budget is a monthly spend limit on tracked calls: calls sent through the SDK or the Router. It can cover all tracked calls, or one customer, feature, action, team, environment, provider, model, product or plan. Token Meter warns you as spend nears the limit. A workspace-wide budget can also stop Router calls once the limit is reached. You manage budgets on Governance › Budgets.

Before you start: you need to be an Owner or Admin. Create your notification channels first (see Notification channels), so you can tick them when you create the budget. You can change them later with Edit. On the Free plan you can set one advisory, workspace-wide budget. Scoped budgets, router enforcement, alert rules, notification channels and audit export need a paid plan.

Create a budget

  1. Open Governance › Budgets and choose New budget.
  2. Enter a Name, for example Core Engineering Monthly Ceiling.
  3. Pick what it Applies to. All tracked calls (SDK and router) is the workspace-wide budget.
  4. For any other scope, enter the Scope target value exactly as it appears in your usage tags, for example a team slug or a customer reference. Leave it blank to cover every value of that scope.
  5. Enter the Budget / month (USD).
  6. Pick the Enforcement mode. Advisory: alert on observed spend only warns. Enforced: router traffic only, quality-gated downgrade or reject also stops Router calls (see Enforced budgets). Enforced is only offered for the org scope.
  7. Set Trigger thresholds as percentages of the budget, separated by commas. The default is 50,80,100. Left empty, it uses 80 and 100.
  8. Leave Also alert on projected overrun (linear burn) ticked to be warned early.
  9. Under Notify via, every channel starts ticked: untick the ones that should not get this budget's alerts. To save a budget with no channel you must tick Inbox only: its alerts then show in Alerts and notify nobody, and the card says This budget notifies nobody.
  10. Choose Create budget. The budget appears as a card with its spend, cap and status.

To change where a budget's alerts go later, use Edit on its card (see below).

What a budget counts

A budget counts tracked spend only: calls sent through the SDK or the Router, including Router calls on Token Meter's keys, priced as they happen. Imported provider invoices, account reports, seats and coding-tool bills are not counted toward any budget or its alerts. The same tracked figure is used everywhere: the budget card, the Overview's Monthly budget card, the alert check and the plan meter.

  • Invoices and reports arrive one to three days late, so a budget on them would jump and alert late.
  • The Router needs a figure that is current to the call to hold a cap.
  • A team, feature or model budget cannot be read from an invoice, which has no such breakdown.

The Overview's All AI spend includes those bills, so it can be higher than the budget's spend. A workspace-wide budget card shows the difference as "Imported bills add $X this month and aren't counted".

What happens as spend grows

Token Meter checks budgets every 60 seconds. It compares the cap with tracked spend so far this calendar month (UTC): SDK and Router calls, not imported bills (see What a budget counts).

  • Each threshold fires once a month: a Critical alert at 100% or more, a Warning below that.
  • The projection alert is a Warning. It fires when spend so far, spread evenly over the whole month, would end above the budget.
  • Each card shows spend against the cap, its channels and a status: Over cap at 100% or more, Near cap from its lowest threshold under 100% (80% if it has none), or Silenced. A budget on track shows no status. The spend, percentage, bar and status all use one figure: observed spend, or for an enforced budget the larger of observed spend and the Router's count (see below).
  • With five or more budgets, Needs attention lists those that are Near cap or Over cap. With more than one budget, the summary line above the cards counts those at risk (not yet over the cap, but projected to end the month over it).
  • Edit on a card changes its name, monthly amount, enforcement mode, thresholds, the projection alert and the channels under Notify via; choose Save changes. If a card says This budget notifies nobody (it was saved with Inbox only), this is where you add a channel; the chip links straight to this form. Each save is written to the audit log as budget.updated.
  • A budget or alert rule with no channel and no Inbox only choice (for example one made during onboarding without a channel) sends its alerts to the workspace owners' email, with a line saying why. Its card says No alert channels: alerts email the workspace owners.
  • The card's menu (the … button) has Silence, which stops checking and enforcing the budget until you choose Enable. A workspace-wide budget also has Enforce on router or Make advisory. Delete removes the budget.

Business-unit budgets also appear here, with the scope business unit. You set them on the Business units page (under More breakdowns on Analytics › Spend), not with New budget. They alert at 80% and 100% and on projected overrun. They start with the channels that were enabled when the unit's budget was first set. To change them, use Edit on the budget's card here. See Business units.

Enforced budgets

An enforced budget caps traffic that goes through the Router. Only one workspace-wide budget can be enforced at a time. Token Meter refuses a second with "Only one enabled workspace-wide budget can be enforced at a time."

The Router keeps its own count of router spend against the cap. The card shows it as "Router spend this month: …, including reserved". The count covers the whole month: a budget created or enforced mid-month starts from the router spend already made this month, not from zero. Before each Router call, the Router sets aside the call's worst-case estimated cost:

  1. If the call fits in what is left, it goes ahead.
  2. If not, the Router may switch to the Fallback model of the routing policy that matched (on Router › Rules). It does so only when Improvements has a current model-downgrade recommendation for that pair of models (and team) that passed its quality check, the fallback is cheaper, and your policies allow it. Tiered calls are never downgraded.
  3. Otherwise the call is refused with HTTP 402 and monthly_budget_exceeded. downgrade_available is true when an approved fallback existed but did not fit either.
JSON
{
  "error": {
    "message": "This workspace is over its monthly budget. Raise it under Budgets, or wait for the next month.",
    "type": "insufficient_quota",
    "code": "monthly_budget_exceeded"
  },
  "error_code": "monthly_budget_exceeded",
  "message": "This workspace is over its monthly budget. Raise it under Budgets, or wait for the next month.",
  "type": "error",
  "downgrade_available": false
}

If the Router cannot read the budget, it refuses the call with 503 monthly_budget_unavailable rather than risk spending past it.

Only Router traffic can be stopped

SDK-reported calls made straight to a provider still count toward the budget and its alerts, but cannot be blocked this way. Imported bills never count toward a budget (see What a budget counts).

Alerts and alert rules

Once it has a rule or an alert, Alerts has two tabs. Active alerts lists everything rules and budgets have raised. Rules is where you decide what raises an alert and where it goes.

Create a rule

  1. Open Alerts and choose New rule (while there are no rules and no alerts yet, Create an alert).
  2. Enter a Name and pick a Kind (see the table).
  3. Fill in the fields that kind uses. Each field label says which kind it is for.
  4. Under Notify via, tick the channels to alert.
  5. Choose Create rule.

Rules are checked every 60 seconds. Each rule's row has Edit, Silence or Enable, and Delete.

KindFires whenSeverity
ThresholdSpend in the Scope and Scope value, optionally limited to a Provider and Model ID, reaches Threshold amount USD within the UTC day or month (Window).Warning
Provider spikeToday's spend so far, for one provider or all, reaches Spike ratio times yesterday's total, scaled to the part of today that has passed (UTC). Days under Spike floor USD are ignored. With no spend yesterday, any spend above the floor fires. Scope and model are ignored.Critical
Anomaly (runaway trace)One trace makes far more calls, or costs far more, than usual for its action. This check runs even without a rule; the rule picks the channels and can override MAD multiplier (6), Median floor multiplier (2) and Min calls (5). An action needs 30 traces of history first.Critical
Agent key quietAn agent key has sent nothing for 3 days.Warning
Renewal coming up (60/30 days)A licence or contract renews in 60 days or in 30 days.Info at 60 days, Warning at 30
Governance violation (detected)A detected violation meets Alert at severity.From the violation
Shadow AI signal detectedA Shadow AI finding is open.From the finding
Audit trail integrity check failedThe background check finds an audit log entry that was changed or is missing. Without this rule, the alert goes to every enabled channel.Critical
Audit trail purge blockedExpired audit records can't be deleted yet (see Data retention and audit log). Without this rule, the alert shows on Alerts and in the Inbox but is sent nowhere.Warning

The last six kinds only choose where those alerts go. Create them with Scope org (the audit and Shadow AI kinds set it for you), leave the amounts empty, and keep one rule per kind (with several, only one is used).

Threshold, budget and provider-spike alerts close by themselves when the condition clears. A Shadow AI alert closes when its finding is handled. An alert never fires twice while it is open. Dedup window (minutes) (60 by default) is how long the same condition must wait, after its alert closes, before it can fire again.

Active alerts

The table lists status, severity, subject, the rule or budget, when it fired and, for anomalies, a link to the trace. Filter by severity, status, rule and provider over 7, 30 or 90 days. Your plan may keep less history.

Notification channels

A channel is a place alerts are sent: one or more email addresses, a Slack channel or a Discord channel. Rules and budgets send to the channels ticked on them. You manage channels on Settings › Notifications.

Before you start: you need to be an Owner or Admin in the workspace. For Slack or Discord, get a webhook URL (a private web address that posts into one channel) first:

  • Slack: in Slack's app settings (api.slack.com/apps), create or open an app, turn on Incoming Webhooks, choose Add New Webhook to Workspace, pick the channel and copy the URL. It starts with https://hooks.slack.com/.
  • Discord: in the server, open Server Settings › Integrations › Webhooks, choose New Webhook, pick the channel and choose Copy Webhook URL. It starts with https://discord.com/api/webhooks/.

Add a channel

  1. Open Settings › Notifications and choose Add channel.
  2. Enter a Name, for example #ai-spend or Finance.
  3. Pick the Type: email, slack_webhook or discord_webhook.
  4. For email, fill in Email addresses, comma-separated. For Slack or Discord, paste the URL into Webhook URL for Slack or Discord.
  5. Choose Add channel. The channel appears in the table as Enabled.
  6. Choose Send test on the channel's row. A message labelled as a test goes out the same way real alerts do. Within a minute, Last delivery shows Delivered or Failed with the error. You can send one test per channel per minute.
  7. Tick the channel on a rule or a budget.

Channels added here are not checked when you save them, so Send test is how you confirm one works. (The budget step in onboarding is different: it confirms its email or Slack channel with a 6-digit code.)

Webhook URLs are stored encrypted and never shown again. Governance › Budgets also has an Add channel shortcut for email and Slack. There is no general-purpose webhook channel; for governance violations, use the ticket webhook.

Delivery

  • Every 60 seconds, each open alert raised in the last 24 hours is sent to every channel on its rule or budget that has not had it yet. A rule or budget with no channel sends to the workspace owners' email instead, unless it is a budget saved with Inbox only.
  • Slack and Discord get the alert's subject and an Open Monitors link. Shadow AI alerts also get a Review finding link.
  • Email arrives with the subject "Token Meter alert: …". The body repeats the subject, then lists what fired (the rule or budget, scope, window or month, spend against the threshold or budget, and when it fired in UTC), then the same links.
  • A failed channel is tried again after one minute and again after two, three attempts in all. An alert that closes before it is delivered is not sent.
  • A silenced channel gets nothing. Use Silence and Enable to pause a channel without deleting it.

Delete on a channel's row asks first and says how many budgets and rules use the channel. Deleting it removes it from all of them, so they stop notifying there. A channel you add again later is a new channel: tick it on the budgets and rules that need it.

A budget alert email looks like this:

Example alert email
Subject: Token Meter alert: Core Engineering: 80% of month budget ($2,500.00) reached

Core Engineering: 80% of month budget ($2,500.00) reached

Budget: Core Engineering
Scope: whole workspace
Month: 2026-11 (UTC)
Spend this month: $2,012.40
Budget: $2,500.00 (alert at 80%)
Fired: 2026-11-14 09:30 UTC

Open Monitors: https://timewastevc.com/monitors

The Last delivery column shows "Never", "Delivered" with the time, or "Failed" with the time and the error (an HTTP status or network error, never the URL). Settings warns when a channel's last delivery failed.

Inbox

Inbox gathers fired alerts, governance violations and Shadow AI findings in one list. It is read-only: each item links to the page where you handle it.

Inbox is one list, most severe first. Filter by All, Alerts, Policy violations or Shadow AI. Closed alerts, resolved or dismissed violations, and sanctioned or dismissed findings are hidden until you choose Show resolved.

The Inbox reads the latest 100 alerts (from the last 30 days) and the latest 100 violations, and says when either hit that limit or a source failed to load.

Shadow AI

Shadow AI (the link at the foot of Governance › Rules) finds AI use that skips your metered paths. While there are no sources and no findings yet, the page shows only Connect a source.

  • Findings: worked out every hour from invoices, identity, governance policy and the sources below. For example: provider spend with no metered usage, usage by someone outside the workspace, a model no policy allows, self-declared personal use, SSO app sign-ins, vendor-reported activity, untracked AI calls in your traces, and CASB traffic. Open a finding to assign it and Acknowledge, Sanction or Dismiss it. Export CSV downloads them.
  • Network egress (link): traffic to known AI hosts seen by OpenTelemetry client spans, Netskope or a Zscaler NSS feed. Only host names and counts are stored, never URLs or content.
  • Manage connections (or Add a source): connect Okta, Microsoft Entra ID, Cursor, Claude Enterprise, Netskope and Microsoft Defender for Cloud Apps with their read credentials, or create a Zscaler feed token (shown once). Each panel says which permission it needs. Sync now queues a refresh; otherwise sources refresh every hour.
  • Directories (link): sync your people, departments and job titles from Okta or Microsoft Entra ID.

A finding is evidence to review, not a verdict. A sign-in, seat or company account does not by itself prove unapproved use. To hear about new findings, choose Configure alert recipients and create a Shadow AI signal detected rule.

Data retention and audit log

Governance › Activity log is a tamper-evident record of model calls, policy changes and key events. Entries are only ever added, and each one is chained to the one before by a hash, so a changed entry shows up.

  • Search by actor, model, action or resource. Filter by action type, provider, model and date range. Open an entry for its details.
  • Export CSV and Export JSONL download the matching records.
  • Verify chain rechecks every record's hash now. The chain is also checked in the background every 5 minutes. A break raises a Critical alert, shown on Alerts and in the Inbox. It goes to the channels on an Audit trail integrity check failed rule, or, with no such rule, to every enabled channel.

Changes to workspace settings are recorded separately. The Workspace settings changes link on Activity log opens them (Owner, CTO or CFO).

Retention (the link on Governance › Activity log) sets how long audit records are kept:

  1. Open Governance › Activity log, choose Retention, and enter Retention days, between 90 and 36,500. The default is 2,555 days (seven years).
  2. To stop all deletion, tick Place on legal hold and fill in the Hold reason.
  3. Choose Save policy.

Expired records are deleted only after an outside checkpoint confirms them. Until that outside anchoring is turned on for your workspace, records are kept and never deleted; the page says so.

Errors your app sees

When the Router refuses a call for a governance or budget reason, it answers with this JSON shape. Read the code from error_code (or error.code). Extra fields, such as violations or downgrade_available, sit at the top level. The Router errors list has every other code.

HTTP statuserror_codeWhat it means
401invalid_keyThe key is unknown or malformed. Use a tl_live_… key from Governance › API keys.
403key_revokedThe key was revoked or has expired. Create a new one on Governance › API keys.
400request_blocked_by_governance_policyA policy blocked the call. The violations array says which policy and why.
400model_blocked_by_governance_policyOnly model rules were broken: this model is not allowed.
402monthly_budget_exceededThe enforced budget has no room for this call. downgrade_available says whether an approved fallback existed.
503governance_policies_unavailableThe Router could not read your policies, so it refused rather than skip the check. Retry shortly.
503monthly_budget_unavailableThe Router could not read the enforced budget, so it refused rather than overspend. Retry shortly.

Troubleshooting

What you seeWhat to do
A budget or rule fires but nobody hears about itCheck that the card or rule has channels (not This budget notifies nobody), that the channel is not silenced, and that its Last delivery did not fail. Use Send test on Settings › Notifications to check the channel. To add a channel to a budget, use Edit on its card and tick it under Notify via.
Last delivery shows Failed with an HTTP statusThe email address or webhook URL is wrong, or the Slack or Discord webhook was removed. Channels cannot be edited: add a new channel with the right address, use Send test, tick it on your rules and budgets (Edit on a budget card), then delete the old one.
A detected violation shows "Alert: below threshold / pending"Its severity is below Alert at severity, or the once-a-minute job has not reached it yet.
Detected violations alert but reach no oneCreate an enabled, workspace-wide Governance violation (detected) rule with a channel ticked.
Webhook status failed or "webhook URL refused"The URL must be a public https:// address that answers 2xx within 5 seconds, without a redirect.
Your webhook receiver rejects every requestCompute the HMAC over the raw body exactly as received, before any JSON parsing. Check that the secret is the latest one: saving a new URL makes a new secret. Check your server's clock if the timestamp check fails.
Revocation shows disabledTurn on Allow automatic credential revocation in Detection & remediation.
Revocation shows unsupported or failedOnly OpenAI and Anthropic provider keys can be revoked, only with their admin key connected, and only when the violation names a key.
A team-scoped policy never matchesYour calls carry no team tag, or the tag differs from the team's slug.
Router returns 402 monthly_budget_exceededRaise the enforced budget, make it advisory, or approve a cheaper fallback.
Router returns 503 monthly_budget_unavailable or 503 governance_policies_unavailableThe Router could not read the budget or your policies, so it refused the call. Retry; it never lets the call through unchecked.
Calls fail with 403 key_revokedThe key was revoked (perhaps automatically, after a detected violation) or has expired. Create a new key on Governance › API keys.
"Router enforcement is available only for workspace-wide budgets"Only budgets with scope org can be enforced.
"Only one enabled workspace-wide budget can be enforced at a time."Make the other enforced budget advisory, or silence it, first.
"A budget for that scope already exists."Each scope and value can have one budget. Edit the existing one, or delete it first.
"already has 2 live keys"Revoke the older key with that name before you rotate or create another.
A provider control says "no usage feed connected"Connect that provider's admin key on Settings › Connections so its usage is reported.