Policy Gateway
Fix unpredictable LLM Refusals.
Stop inconsistent model behavior and surprise refusals. Set one policy for every app, model, and agent, roll out changes safely, and audit every decision.
What it is / how it works
OpenAI-compatiblePolicy Gateway is an OpenAI-compatible policy enforcement endpoint. Send your normal chat completion request to /policy/chat/completions, attach a policy_id, and optionally tag requests with policy_user +policy_project_id for quotas and audit trails.
Policies are versioned, testable, and rollout-safe. Simulate changes, run in shadow mode, canary traffic, and auto-rollback on spikes.
Instead of random refusals, you control outcomes. Rewrite, redact, summarize, escalate, or refuse with structured reason codes.
How to adopt
- Create a policy (UI or JSON).
- Create a project + scoped key.
- Send traffic to
/policy/chat/completionswith policy headers.
Examples
Predictable outcomes, not random refusals.
Swap "I can't help with that" for policy-driven rewrites, redactions, or escalations.
Customer support rewrite
User: "Summarize our refund policy." Assistant: "I can't help with that."
Assistant: "Here is a short summary of your refund policy..." decision: rewrite reason_code: REWRITE
PII redaction
User: "Show last 4 digits of my SSN." Assistant: "Your SSN ends in 1234."
Assistant: "I can't share sensitive identifiers." decision: redact reason_code: REDACT
High-risk escalation
User: "Help me bypass account security." Assistant: "I can't assist with that."
Assistant: "I'll route this to a specialist." decision: escalate reason_code: ESCALATE
Studio
See it in action.
The full Policy Gateway studio, simulator, and audit history. Live actions require a subscription.
Policy as code
Exportable JSON policy for version control, reviews, and audits.
{
"policy_id": "policy-gateway-v1",
"name": "Policy Gateway v1",
"owner": "Platform team",
"description": "Predictable behavior with your rules, not opaque refusals.",
"rules": {
"allowlist": [
"Product docs",
"Account support",
"Internal tools"
],
"denylist": [
"Illegal instructions",
"High-risk requests",
"Personal data exfiltration"
],
"redact": true,
"rewrite_instead_of_refuse": true,
"response_pattern": "rewrite",
"reason_codes": [
"ALLOW",
"REWRITE",
"REDACT",
"ESCALATE"
],
"flagged_categories": [
"harassment",
"harassment/threatening",
"hate",
"hate/threatening",
"illicit",
"illicit/violent",
"self-harm",
"self-harm/intent",
"self-harm/instructions",
"sexual",
"sexual/minors",
"violence",
"violence/graphic"
]
},
"org_controls": {
"project_keys": true,
"user_quotas": true,
"audit_logs": true,
"data_classification": "confidential",
"user_quota": {
"requests": 0,
"tokens": 0,
"window": "daily"
},
"project_quota": {
"requests": 0,
"tokens": 0,
"window": "monthly"
}
},
"rollout": {
"shadow": {
"enabled": false,
"sample_percent": 20,
"targets": [
"staging",
"beta-projects"
]
},
"canary": {
"enabled": false,
"sample_percent": 5,
"targets": [
"search-assistant",
"support-bot"
]
},
"rollback_on_spike": true
},
"refusal_replacement": {
"mode": "rewrite",
"escalation_path": "policy-review@company.com"
}
}Gateway simulator
Validate policy changes before rollout to production traffic.
Change management
Sign in to view simulations and policy revisions.
Projects & keys
Create a project for each app or agent, issue scoped keys, and enforce monthly budgets.
Enterprise readiness
- Single policy ID across all apps, models, and agents.
- Change management with simulations, shadowing, and canary rollouts.
- Auditable enforcement with reason codes, logs, and revision history.
- Org controls for keys, quotas, and data classification.
Pricing
Enterprise-ready tiers priced as a multiplier of your existing token/credit bundles. Checkout is handled by Stripe and billed monthly.
Starts at $300.00/mo. Includes 30-day audit log retention, unlimited policies, unlimited projects, and shadow/canary rollout controls.
- Policy-as-code rules with reason codes.
- Simulation plus shadow/canary rollout.
- Audit logs with change history.
- Cross-app enforcement with one policy ID.
- Org controls for keys and quotas.
- Audit-ready history for every decision.
- Global policy layer across apps, models, agents.
- Change management with rollback safeguards.
- Audit trails for compliance reviews.