Guardrails
Guardrails applies validation rules and external provider checks to every request that passes through the AI Gateway. Rules run before prompts reach a model; a failing rule blocks the request.
::::note Read this if you administer the platform AI Gateway. This tab is plan-gated: if it appears locked in the nav, your plan does not include guardrails. ::::

Add a guardrail rule
Open Settings → Guardrails ("Protect your AI gateway from PII leaks, prompt injections, secrets exposure, and other threats.").
The Rules section shows how many rules are currently configured. Press New Rule to add one. When no rules exist, the section shows "No guardrail rules" with a Create Rule prompt.
::::warning Deleting a rule is permanent. The confirmation reads: "This rule will be permanently removed. Requests will no longer be checked against it." Review active rules before removing any. ::::
Connect an external provider
The External Providers section connects third-party guardrail services via Generic HTTP API. Press Add Provider to configure one.
Deleting an external provider opens a separate Delete External Provider confirmation dialog.
Next steps
- Token Saving: compress prompts before they reach providers
- Request Tracing: inspect requests that passed or were blocked by guardrails
- Settings overview: how platform settings apply to projects