is_default, that the gateway falls
back to whenever a key has no explicit attachment.
This page covers the default ai guardrail: how to set it, how resolution
works, and the one invariant worth memorizing — one default per
workspace. For the full engine reference, see the
Guardrails reference.
Everything here is a console action on the hosted gateway
(
api.orcarouter.ai), run under your own session. Only the final /v1/*
call uses an sk-orca-... relay key. Promoting or demoting a default
guardrail requires Developer+ in the workspace.1. Why set a default ai guardrail
Per-key attachment is precise but easy to forget — issue a new key, skip the dropdown, and that key ships with zero screening. A workspace default closes that gap:No-attachment keys inherit it
Any key whose
guardrail_id is unset (0/null) is screened by the
default automatically — including keys created after you set it.Edit once, shift the whole workspace
The default lives in the gateway, not on each key. Edit it and every
inheriting key shifts on the next call — no redeploy, no SDK change.
2. Promote a guardrail to the default
In the console, open Guardrails, edit the guardrail you want as the floor, and toggle Set as workspace default. Save.Create or pick a guardrail
Author a policy as usual — e.g. the
PII Shield preset, a single
pii
rule that masks at the both stage.Mark it default and save
Turn on Set as workspace default and save. The guardrail’s
is_default flag flips on.3. One default per workspace — promotion is atomic
This is the invariant: at most one guardrail per workspace carriesis_default. You never have to manually un-set the old one.
When you promote a new guardrail to default, the gateway demotes the
previous default in the same transaction — the promote and the demote
either both land or neither does. There is never a window where two
guardrails are both the default, and never a window where none is.
4. How resolution uses the default
For any request, the gateway resolves exactly one guardrail (or none) in this fixed order:| Order | What applies |
|---|---|
| 1 | The key’s explicit guardrail_id — if it exists and is enabled. |
| 2 | The workspace’s enabled is_default guardrail (key had no attachment). |
| 3 | None — the request is byte-identical to a workspace with no policy. |
Fail-open by design. If default resolution hits a transient error,
the gateway degrades to no enforcement rather than failing the request.
Safety degrades; availability is preserved.
5. Worked example
Say your workspace has two guardrails and three keys:pii-shield— marked workspace default, enabled.strict-block— blocks credit cards, not default.- Key
A— no attachment. KeyB— attached tostrict-block. KeyC— attached to a guardrail you later disabled.
Key A (no attachment) → inherits the default
Key A (no attachment) → inherits the default
guardrail_id is unset, so resolution falls through to the enabled
is_default guardrail pii-shield. The email is masked to [EMAIL]
before the model sees it.Key B (attached) → uses its own policy
Key B (attached) → uses its own policy
The explicit attachment wins.
strict-block applies; the default is
never consulted.Key C (attached but disabled) → no enforcement
Key C (attached but disabled) → no enforcement
The attachment exists but its guardrail is disabled, so resolution
returns none — it does not drop through to
pii-shield. The
request is unscreened.strict-block to default and save. In one transaction
strict-block.is_default becomes true and pii-shield.is_default
becomes false. Key A immediately inherits strict-block on its next
call — without any change to the key itself.
6. Confirming the request hits the default
Send a request with an unattached key and check the Matches feed — a match recorded under your default guardrail confirms the fallback fired:[EMAIL] before forwarding. If it blocks, the call returns HTTP 400
guardrail_blocked — which costs no quota and is marked skip-retry. See
the guardrail_blocked error
for the full response shape.
7. Where to go next
Attach to a single key
When one key needs a different policy than the workspace floor.
Create your first guardrail
The end-to-end loop — create, test, attach, send.
Resolution & scope
How keys, policies, and workspaces compose.
Versioning
Every promotion writes a history row — diff and revert.
is_default flipped and who did
it. For the complete engine, read the
Guardrails reference.