Skip to main content
A guardrail is a reusable policy that an owner or admin assigns to a user or an API key. Defines budget, allowed models and providers, ZDR per group, prompt injection and PII detection, and custom content patterns. Managed from /dashboard/guardrails or via the REST API.

Components

  • Budget — USD limit per period (daily/weekly/monthly). When the period spend hits the limit, the guardrail blocks until the next reset.
  • Allowed models — allowlist by model id. Empty = all.
  • Allowed providers — allowlist by provider id (openai, anthropic, …).
  • ZDR per group — independent toggle per group. Same concept as the org-level setting but applied per guardrail.
  • Prompt injection detection — regex for common patterns (ignore previous instructions, reveal system prompt).
  • PII detectionoff / redact / block. Detects email, phone, RFC, CURP, credit cards, IPv4.
  • Custom patterns — array of { name, pattern, action }. Case-insensitive regex, action redact or block.

Combining multiple guardrails

When several apply to the same request:

Block format

The message describes the high-level reason; it does not expose internal config or individual guardrail names (prevents policy doxing to users without admin permission).

REST API

Example creation