Policy groups
One reusable bundle of guardrail config, attached to your API keys — with per-key overrides and a master bypass for fully-trusted workloads.
One bundle of guardrail config
A policy group is a named bundle of guardrail settings. Each API key is assigned a policy group, and a Default group is auto-created for every account. Instead of configuring guardrails per key, you configure a group once and point many keys at it. A policy group holds:
- the injection threshold (the sensitivity of the input-injection model; it decides a block only when injection blocking is on);
- the PII mode and content-moderation config;
- the output DLP mode and the jailbreak / indirect-injection modes;
- and MCP tool allow/deny rules.
Attach many keys to one group. Give a prod key a strict group and a dev key a looser one, without duplicating config — change the group and every key on it updates at once.
Override the group for one key
An API key can carry a guardrail_overrides JSONB blob that selectively overrides its group for that one key. Only two guardrails are key-overridable: piiEnabled and contentModerationEnabled. Fields you omit fall through to the policy group.
Injection is NOT overridable. Prompt-injection checks can't be turned off per key. An injectionEnabled: false in the overrides is ignored.
Per-key overrides
Which setting wins
When the same guardrail is configured in more than one place, the highest-priority source wins:
- System-forced (ops) — platform-level emergency controls (e.g. an emergency blocklist) that always take precedence, everywhere.
- Per-key overrides — the key's guardrail_overrides (PII / content only) beat its policy group.
- Policy group — the group's configured modes and thresholds.
- System defaults — the platform baseline used when nothing else is set.
Read top to bottom: a higher rule overrides everything below it. This is why an ops emergency block can't be undone by a customer override, and a per-key override can relax its own group but not the injection checks.
guardrails_enabled — the Path B bypass
Each policy group has a master switch, guardrails_enabled, which defaults to TRUE. It is the "Path B" bypass: when you turn it OFF, the blocking pre-call guardrail pipeline is skipped for keys on that group. Prompt injection is still scored in the background and recorded, and it never blocks, even when injection blocking is turned on for your account. Those keys also lose the free lanes until guardrails are back on: free/ and cf-* models return 403 free_requires_guardrails, and the Free plan's daily allowance stops applying.
Use with care. With the master toggle off, PII, content moderation, and the other pre-call guardrails are disabled, and prompt injection is scored but not blocked. Responses then carry
X-Anoman-Guardrail-Master: disabledso you can tell a bypassed request apart. Only use this for a fully-trusted, isolated workload.
In the dashboard the master toggle ships with a warning and a confirmation dialog, precisely because it turns off PII masking, content moderation, and the other pre-call guardrails.
Where to manage groups
Manage group config and the master toggle in the dashboard at /dashboard/guardrails. Assign keys to groups and set per-key overrides on the API key toggles at /dashboard/keys.
Org accounts: owner/admin only. In an organization only an owner or admin can create, change, delete or assign policy groups. Other roles see them read-only, and the org's API keys get 403 insufficient_account_role. In a personal account the owner can edit from the dashboard or with their own API key.
Configure your policy groups
Set guardrail config once, attach it to every key, and override where you need to.