1. What the ai guardrail templates library gives you
A preset is a named starting point that drops a completePolicy
(one or more ordered rules) into the create modal. The presets are
authored server-side, so the console picker, the
Test sandbox, and these docs all
describe the exact same behavior — there is one source of truth.
Every preset is a seed, not a lock. Once you apply one, you own the
copy: rename it, add or delete rules, change a rule’s
action or
stage, retune a detector. Nothing
about the original template constrains your edits.
Applying a preset, like all guardrail authoring, is a console action
under your own workspace session, and creating or editing a guardrail
requires Developer+ in the workspace. Only the final
/v1/* relay
call uses an sk-orca-... key.2. Preset categories
The picker groups presets into eight categories. Each maps to a common control you’d otherwise build by hand:PII — redact or block personal data
PII — redact or block personal data
Detect and mask (or block) emails, phones, SSNs, cards, IPs and more.
Start with PII Shield for one-rule
masking, or a strict blocker when PII must never reach the provider.
Secrets — keep credentials out of prompts
Secrets — keep credentials out of prompts
Block AWS / OpenAI / GitHub keys, PEM private keys, cloud tokens and
crypto-wallet addresses before they leave the gateway. See
Block secrets.
Compliance — regulated-data rails
Compliance — regulated-data rails
PCI card blocks, EU/UK identifier blocks, healthcare-identifier
blocks, and an observe-only
compliance logger that
records PII occurrences without changing traffic.
Brand — denylists and brand safety
Brand — denylists and brand safety
Keyword denylists for profanity, competitor mentions, and
region-specific banned terms — block or mask. See
Brand safety and
Sensitive words.
Safety — injection, jailbreak, self-harm
Safety — injection, jailbreak, self-harm
Keyword/regex rails for prompt-injection phrases, jailbreak / role-play
patterns, system-prompt leak detection, and self-harm denylists. See
Prompt injection.
Cost — size and length caps
Cost — size and length caps
max_chars caps on the request prompt and the model response to bound
cost and latency. See Cost guardrails.Agent — agentic content filters
Agent — agentic content filters
URL filters, markdown-image blocks (image-exfil defense), shell-injection
patterns, and SQL-injection-in-output filters for agent flows. See
Agentic guardrails.
Code security — secrets, licenses, risky APIs
Code security — secrets, licenses, risky APIs
.env / secret-file assignment blocks, strong-copyleft license
flags (GPL / AGPL / LGPL / SSPL) on requests and model output, and a
non-blocking advisory that annotates prompts referencing high-risk
sinks (eval, os.system, pickle.loads). See
Code security.3. Apply a preset as a seed
Every step here is a console action. The relay key shows up only in the final request.Open the template picker
In the console, open Guardrails and click the New guardrail
split-button. The picker opens grouped by the eight categories above.
Pick a preset
Choose one — e.g. PII Shield from the PII category. It seeds a
complete policy (here, a single masking
pii rule). The picker shows
each preset’s description so you know what it does before you apply it.Name it and edit freely
Give it a name (≤ 64 chars). The seeded rules are now yours — add,
delete, or retune any of them. A preset is a seed, not a lock.
Test before you attach
Open the Test tab, paste a sample, pick a stage, and run the
policy locally — no upstream call, no quota. Prove it does what you
expect before any key points at it.
Attach a key
Edit an API key and pick the guardrail from the Guardrail dropdown
(sets
guardrail_id on the key), or mark it the workspace
default. See Attach to a key
and Account default.4. One concrete example: seed, then enforce
Apply the PII Shield preset. It seeds exactly one rule:[EMAIL] before forwarding. A request
carrying a card number is rejected with HTTP 400
guardrail_blocked — which costs no quota (an input block fires
before metering) and is marked skip-retry. See the
guardrail_blocked error.
5. After you apply — the rest is the engine
A preset is just a fast way to author rules. Everything downstream is the normal guardrail engine:| You get | Where |
|---|---|
| Per-rule actions | Actions |
| Test + eval | Testing & eval |
| What fired | Matches feed |
| Roll back a change | Versioning |
Every create, update, and delete on a guardrail — including the moment
you apply a preset and save — writes a versioned history row. You can
diff any two versions and revert to an earlier one, so editing a
seeded policy is never a one-way door. See
Versioning.
6. Where to go next
PII Shield
The one-click PII-masking preset, start to finish.
Block secrets
The Secrets Blocker preset — catch keys and credentials in the request.
Agentic guardrails
URL, markdown-image, shell, and SQL filters for agent flows.
Guardrails reference
The complete engine — every rule type, field, and route.
