Integrate, configure, and deploy DFENS.
DFENS is an application firewall for LLM traffic, the engine built in the
ai-firewall repository. It inspects prompts, model responses, and
tool-result content against declarative rules. Start with
DFENS Cloud — sign up and get an endpoint
in minutes, nothing to deploy. Running it yourself, on your own hardware or in your
VPC, is also available as an Enterprise-tier deployment, covered by the rest of
this section — but Cloud is the fastest path for almost everyone. Same rule engine,
same request and response schemas, either way.
The self-hosted container image is distributed through a private registry to
approved Enterprise customers and design partners; it is not on any public registry
yet. Request access
to be issued a registry credential and an image reference; the examples below use
REGISTRY/ai-firewall:<tag> as a placeholder for it.
Documentation sections
DFENS Cloud
What signup gives you, the X-AI-Firewall-Key header,
Cloud-specific error responses, and your customer portal. The fastest way
to a working endpoint — sign up on portal.dfens.ai.
API integration
Two integration paths: the transparent reverse proxy and the in-app
/v1/inspect endpoint. Request and response schemas, block
behaviour, and streaming semantics. Applies to Cloud and self-hosted alike.
Claude clients
Point Claude Code at DFENS with two environment variables, or deploy Claude Desktop in third-party inference mode across a fleet — MDM configuration keys and the credential-helper gotcha.
04 · Configure — Enterprise onlyConfiguration
Enterprise self-hosted only. The YAML schema, environment-variable overrides, upstream auth modes, providers, audit, and metrics, with the defaults that ship in the image.
05 · Deploy — Enterprise onlyDeployment
Enterprise self-hosted only. From a single docker run to
Docker Compose to a hardened Kubernetes manifest set. Probes, state, and
the network isolation the proxy requires.
OWASP LLM Top 10
What the default rule set detects, mapped to the 2025 OWASP LLM Top 10, on the main site.
How it fits into your stack
There are two ways to put DFENS in the path of a model call, and they share one rule engine and one audit log:
- Reverse proxy. DFENS speaks the OpenAI and Anthropic wire formats (plus Azure OpenAI, AWS Bedrock, and Google Gemini/Vertex on their native routes). Point your SDK's base URL at DFENS and every request, response, and tool call is inspected transparently. No code changes.
- In-app inspection. When you can't sit a proxy in the network
path, call
POST /v1/inspectfrom your own code with a prompt, a response, or a tool result, and act on theallow/denyverdict it returns.
Secure the data plane on two layers. DFENS can require callers to
present a client token (the X-AI-Firewall-Key header, see
client authentication), and it's
still meant to run on a trusted network segment (private network, or a Kubernetes
NetworkPolicy). Treat these as defense-in-depth: turn on the client token and
keep the listener off untrusted networks. Client auth is opt-in, so if you haven't
configured a token the proxy accepts any caller that can reach it.
Start with DFENS Cloud: sign up at portal.dfens.ai and send your first blocked request in minutes, no deployment required. Need it inside your own boundary instead? That's the Enterprise path — read Deployment and Configuration to get a self-hosted instance running.