LLM guardrails with audit logs and rollouts
AI gateway guardrails for LLMs with audit logs, shadow/canary rollouts, and policy-as-code enforcement.
Enterprise teams already buy AI gateways for quotas, policies, and governance. Policy Gateway brings those same controls to LLM requests.
Use guardrails with audit logs and rollout controls so every decision is predictable, reviewable, and safe to ship.
LLM guardrails with audit logs and rollouts
LLM guardrails with audit logs and rollouts are AI gateway controls that enforce policy-as-code rules, record decisions, and let you safely roll changes out with shadow and canary traffic.
- Audit-ready logs make every allow, rewrite, redact, or refusal explainable.
- Shadow and canary modes let you validate changes before enforcing them.
- Governance features (projects, quotas, reason codes) align LLMs with enterprise policy.
- 01Send chat completions to the Policy Gateway AI endpoint instead of the base model endpoint.
- 02Attach a policy_id plus optional policy_user and policy_project_id for audit trails and quotas.
- 03Enable shadow/canary rollouts to test policy changes against live traffic safely.
curl https://api.abliteration.ai/policy/chat/completions \
-H "Authorization: Bearer $POLICY_KEY" \
-H "Content-Type: application/json" \
-H "X-Policy-User: user-12345" \
-H "X-Policy-Project: support-bot" \
-d '{
"model": "abliterated-model",
"messages": [{"role":"user","content":"Summarize our refund policy."}],
"policy_id": "support-guardrails"
}'{
"policy_id": "support-guardrails",
"name": "Support guardrails",
"owner": "Platform team",
"description": "Audit-friendly guardrails with safe rollouts.",
"rules": {
"allowlist": ["product docs", "account support", "refunds"],
"denylist": ["credential theft", "account takeover"],
"flagged_categories": ["self-harm/intent", "violence/graphic", "sexual/minors"],
"response_pattern": "rewrite",
"rewrite_instead_of_refuse": true,
"redact": true,
"reason_codes": ["ALLOW", "REWRITE", "REDACT", "ESCALATE"]
},
"org_controls": {
"project_keys": true,
"user_quotas": true,
"audit_logs": true,
"data_classification": "confidential",
"user_quota": { "requests": 200, "tokens": 20000, "window": "daily" },
"project_quota": { "requests": 20000, "tokens": 2000000, "window": "monthly" }
},
"rollout": {
"shadow": { "enabled": true, "sample_percent": 10, "targets": ["support-bot"] },
"canary": { "enabled": true, "sample_percent": 5, "targets": ["support-bot"] },
"rollback_on_spike": true
},
"refusal_replacement": { "mode": "rewrite", "escalation_path": "policy-review@company.com" }
}Assistant: "I can't help with that."
Assistant: "Here is a short summary of your refund policy..." decision: rewrite reason_code: REWRITE audit_tags: policy_id=support-guardrails project=support-bot
Run the Policy Gateway simulator
Preview guardrail decisions, reason codes, and audit tags before you ship.
Run a simulationFrequently asked questions.
Is Policy Gateway an AI gateway?
Yes. It is an AI gateway layer that enforces policy-as-code, quotas, and audit logs across LLM traffic.
Do rollouts affect latency?
Shadow mode evaluates policies without blocking responses, while enforced rollouts apply the decision inline.
Can I export audit logs?
Yes. Export to Splunk HEC, Datadog Logs, Elastic, Amazon S3, or Azure Monitor / Log Analytics on enterprise plans.