LLM guardrails
Inspect what goes into a model, what comes out and what tools return, with one guardrail policy applied to every key that runs under it.
Guardrails at the gateway
LLM guardrails are checks that inspect text on its way to or from a model and decide whether the request may proceed. Run in each application, they drift apart and are easy to skip; run at the gateway, one policy covers every key and every model, and the verdicts are recorded in one place.
Inferbase inspects text at three check stages, the prompt, the response and tool results, with two checks: unsafe content against fourteen hazard categories, and prompt injection. Each check at each stage is set to Off, Log only or Block, so a policy can watch before it enforces.
What is inspected
Unsafe content
Classified against fourteen hazard categories, including violent crimes, hate, self-harm, privacy and specialized advice; you choose which categories act.
Prompt injection
Text written to hijack the model, in a prompt or in a tool result, detected by a classifier with a threshold you set. Free.
Three stages
Prompts before any model sees them, responses before they are returned, and tool results before the model reads them.
Conversation history
Earlier user messages and tool results in a request are checked once and their verdicts kept, so long conversations do not cost more per turn.
From watching to blocking
Off, Log only, Block
Start with Log only to see what would have been blocked, then switch to Block. A blocked request gets a 403 naming the categories.
Request conditions
Apply a policy to every request, or only to requests with tools, tool results, structured output or a given task.
Enforced from the top
An organization configuration can enforce a guardrail policy so no project or key can turn it off.
On the record
Every inspected request records which checks ran, at which stage, the verdicts and whether anything acted.
FAQ: LLM guardrails
Checks that inspect text going to or coming from a language model, and stop or flag a request when the text is unsafe or is an attempt to manipulate the model. At a gateway they apply to every application and model under one policy.
Only when the response stage is set to Block: the answer is then held until the check passes, so a blocked answer is never sent. With the response stage on Log only, the answer streams as usual and the verdict is recorded after it.
No. The checks classify text and decide whether the request proceeds; neither rewrites nor redacts what was sent or returned.
The unsafe content check is a call to a guard model and is billed at that model’s price, a few hundred tokens for a short prompt. The prompt injection check is free. The cost of the checks is shown on each request.
Put intelligence in the middle.
Start on the free plan with 5,000 requests a month, no card required.