Dashboard

Enforcement

The Enforcement page is where you configure and monitor spend limits for your users. It has three panels — tier templates, per-user overrides, and an enforcement log.

Budget enforcement requires a Growth plan. If you're on Free or Starter, this page shows an upgrade prompt.

Tier templates

A tier template defines a spend limit that applies automatically to every user on a given tier. Create one template per tier — free, pro, enterprise, or any label you use — and the SDK enforces it for every user who passes that tier tag.

The table shows:

  • Tier — the tier label, must match what you pass as tier in your SDK calls exactly
  • Limit — the spend cap in USD per window
  • Window — daily, weekly, or monthly
  • Total spend (period) — aggregate spend across all users on this tier in the current window
  • Total calls — aggregate call count across all users on this tier in the current window
  • Action — what happens when a user hits the limit: Warn, Block, or Dry run
  • Status — Active or Disabled

Per-user overrides

A per-user override sets a spend limit for a specific user ID. It takes precedence over any matching tier template — the tier template is ignored entirely for that user.

The table shows the same columns as tier templates plus a progress bar showing how much of the current window's limit this user has consumed.

Use overrides to:

  • Give a specific user a higher limit than their tier allows
  • Cap a specific user below their tier limit
  • Apply enforcement to a user when you're not using tier templates at all

Enforcement log

A feed of every enforcement event — blocked calls, warnings, and dry-run hits — ordered most recent first. Each row shows:

  • Time — when the event fired
  • User ID — which user triggered it
  • Action — Blocked, Warned, or Dry run
  • Spend at time — the user's counter value when the event fired
  • Limit — the configured limit that was reached
  • Window — the window type for this budget

Actions explained

WarnThe call proceeds. onBudgetWarning fires in the SDK. An enforcement event is logged here. Recommended default.
BlockThe call does not proceed. LLMBudgetExceededError is thrown in the SDK. Must be caught in your application code.
Dry runThe call proceeds. A console warning is logged in the SDK. No error thrown. Use this while validating your config.

Creating a budget

Click + New template or + New override to open the configuration modal. Fields:

  • Tier / User ID — the tier label or exact user ID to apply this limit to
  • Spend limit — maximum USD spend per window
  • Window — daily, weekly, or monthly. Monthly is the most common.
  • Action — Warn is the default. Switch to Block only after adding error handling in your code.
  • Alert threshold — fire onBudgetWarning at this percentage of the limit. Default 80%.

Start with Warn, not Block. Warn fires the callback and logs the event without affecting your users. Switch to Block once you've added LLMBudgetExceededError handling in your application. See Handling blocks.


Next: Call log →