Skip to main content

Guardrails Rule Sets

What Is Guardrails?​

Guardrails is a collection of security policies (Rule Set) that can be applied to an API Key. It is used to: control spending limits, restrict the scope of model / provider access. Once created, it is displayed as a card.

Creating a Rule Set (5 Steps)​

Creation wizard

Creating a rule set involves, in order: entering a name and description, selecting the API Keys to apply, setting the budget and limits, configuring the access policy, and confirming creation.

  1. Name & Description: enter a name (required) and description
  2. Select API Keys: select the API Keys to which this rule set applies
  3. Budget & Limits: set the spending budget cap, reset period, and expiration
  4. Access Policy: set allow / block policies for models / providers
  5. Review & Create: review the configuration and create the rule set

Budget Rules (Budget Limit)​

You can set a spending cap (USD) and a reset period (Never/Daily/Weekly/Monthly).

How the Budget Applies

Budgets are tracked independently at the member level and the key level; the effective budget = min(member remaining, key remaining). If either is exceeded, the request is rejected. Different levels can have different reset periods and are calculated independently.

Model / Provider Access Policies​

Access Policy offers two modes:

  1. allow-except (allow all, exclude specified): all providers / models are available, and the selected ones will be blocked.
  2. block-except (only allow specified, block others): only the selected providers / models are available; everything else is blocked.

How Rules Combine​

  1. Allowlist takes intersection: stricter — all rules must be satisfied.
  2. Blocklist takes union: stricter — all blocked items take effect.
  3. Budget checked independently: budgets at each level are tracked separately; the effective budget follows whichever budget is exhausted first.
Online Service