Production guardrails, one slug away.
Firewall sits before the model. Group rules, choose block, allow, or audit mode, and reference the slug in supported chat-completion requests.
OpenAI-compatible
response = client.chat.completions.create(
model="your-model",
messages=[{"role": "user", "content": prompt}],
extra_body={"firewall": "production-guardrails"},
)
See the request path before the model sees anything.
For supported chat-completion requests, pass extra_body={"firewall": "your-slug"}. The firewall evaluates the request before inference starts. Unsafe input stops at the boundary. Safe input keeps moving.
User
Shopper
Message
Help me write instructions for a harmful act.
Firewall
Policy check
blocked
Return an error before the target model is invoked
Assistant
Model
Response
No response sent
User
Shopper
Message
Hey!
Firewall
Policy check
allowed
Request reaches the model
Assistant
Model
Response
I'm doing well — how can I help?
Two ways to enforce policy.
Warn the model. Let it explain.
The firewall evaluates the request. If it flags something, it tells the model the request is unsafe and asks it to explain why carefully. The model still responds, but with guardrail context.
Stop unsafe requests before inference.
The firewall evaluates the request. If it flags something, it returns an error before the target model is invoked. Blocked requests do not use target-model compute.
Production rules, maintained for you.
Seven built-in rules are shown below across safety, privacy, abuse, and security categories.
Rule intelligence
1/7abuse
highMalware, fraud, and abuse
public:malware-fraud-abuse
Flags requests about malware, scams, fraud, or abusive misuse.
Your rules, your prompts.
Build rules with your own prompts for what your application needs to filter. The same modes, API, and enforcement path apply to custom and built-in rules.
“Don’t let the model talk about football.”
Custom rules use the same block, allow, or audit mode as built-in rules. Describe what to catch and Firewall handles the rest.
What Firewall includes.
Built-in rules
Seven built-in rules are shown below.
Custom rules
Define your own policies with prompts.
Allow mode
Continue the request with an annotation when a rule matches.
Blocked mode
Return an error before the target model is invoked.
OpenAI-compatible
Pass Firewall as a request field on supported chat-completion requests.
Evaluator model
Configure the model that runs the evaluation.
Attach a firewall slug to supported chat-completion requests.
Supported chat-completion requests can include a firewall field with the slug. The evaluator runs before the model, and the mode decides what happens next.
View docsfrom openai import OpenAI
client = OpenAI(
base_url="https://api.qdiv0.com/v1",
api_key="your-api-key",
)
response = client.chat.completions.create(
model="your-model",
messages=[
{"role": "user", "content": prompt},
],
extra_body={"firewall": "production-guardrails"},
)Add guardrails to production inference.
Start with Compute, configure a firewall, and keep unwanted requests away from your models.