Inference API
Protect a request with LLM Firewall
Evaluate a supported chat request before the selected model receives it.
Attach the policy
Pass the firewall slug as a top-level request field. QDivZero resolves the policy for the account and evaluates the user input before inference.
firewall.py
1response = client.chat.completions.create(
2 model="your-serving-name",
3 messages=[{"role": "user", "content": "..."}],
4 extra_body={"firewall": "customer-input"},
5)Decision order
LLM Firewall evaluates first. If the request continues, QDivZero exposes the configured tools and calls the selected backend. A blocked request never reaches the model.