Getting started Community Training Tutorials Documentation APIs, AI & Tools
F5 AI Guardrails Endpoint
Policy Name |
F5 Guardrails Policy |
Summary |
Evaluates LLM prompts and responses against F5 AI Guardrails, blocking, flagging, or redacting flagged content |
Category |
LLM |
First Omni Gateway version available |
v1.14.0 |
Release Notes |
|
Returned Status Codes |
200 - OK: Content blocked by F5 AI Guardrails. The response is a native content-filter response for the caller’s LLM format. |
503 - Service Unavailable: F5 scan call failed or returned no verdict (only when fail-open is disabled) |
The F5 Guardrails policy provides content moderation for LLMs by evaluating prompts and responses against F5 AI Guardrails. The policy calls the F5 (POST /backend/v1/scans) API and enforces the returned verdict at the gateway before the request reaches the upstream LLM (request phase) or before the response is returned to the client (response phase).
Which F5 scanners run and how they behave (harmful content, prompt injection, PII and other sensitive data, data leakage, and so on) is owned by your F5 project configuration, not the policy. The policy is the enforcement point that turns an F5 verdict into a gateway action:
Allow: Cleared content is forwarded unchanged.
Flag: Flagged content is allowed but a policy violation is recorded (audit).
Redact: Sensitive content is masked in place using F5’s redaction, then forwarded.
Reject: Blocked content is rejected. The client receives a native content-filter response for its LLM format (OpenAI, Anthropic, or Gemini) with HTTP status 200.
The policy operates in two independent phases:
Request phase: Sends the whole request body to F5 with scanDirection: request. Rejected prompts never reach the LLM.
Response phase: Sends the whole LLM response body to F5 with scanDirection: response before returning it to the client. This response phase is off by default.
Every scan emits observability headers, a scan ID for correlation with the F5 console, a per-call metric, and records a policy violation for the Flag or Reject outcomes.
Before configuring this policy, you need:
F5 AI Guardrails access (SaaS tenant or a self-hosted deployment).
An F5 AI Guardrails endpoint URL, for example, https://us1.calypsoai.app.
An F5 API token issued from the F5 console.
(Optional) An F5 project ID or friendly ID whose F5 scanner configuration the scan should use.
If you connect to F5 SaaS, ensure the Omni Gateway can reach the F5 host outbound.
The policy reads the x-input-format header, which the LLM proxy sets, to identify the caller’s LLM format: openai, anthropic, or gemini. If the header is absent, the policy uses openai. Traffic with any other format value, or a non-JSON body, passes through unscanned.
When you apply the policy from the UI, the following parameters are displayed:
| Element | Required | Description |
|---|---|---|
F5 AI Guardrails Endpoint |
Yes |
F5 AI Guardrails base URL, for example, |
F5 API Token |
Yes |
F5 AI Guardrails API token. Enter the raw token without a |
F5 Project |
No |
F5 project ID or friendly ID. When set, it’s sent as the |
Moderate Request |
No |
When enabled (default), the policy evaluates the user prompt against F5 AI Guardrails ( |
Moderate Response |
No |
When enabled, the policy evaluates the LLM response ( Streaming responses ( |
| Element | Required | Description |
|---|---|---|
Apply Redaction |
No |
When enabled (default), a |
Flag Only (Audit Mode) |
No |
When enabled, the scan carries |
Disabled Scanners |
No |
F5 scanner IDs to disable, sent as the |
Force-Enabled Scanners |
No |
F5 scanner IDs to force-enable, sent as the |
Request-Phase Scanner Overrides |
No |
Per-phase F5 scanner selection for the request (prompt) scan, with optional |
Response-Phase Scanner Overrides |
No |
Per-phase F5 scanner selection for the response (completion) scan. Same shape as Request-Phase Scanner Overrides. See Per-Phase Scanner Selection. |
Verbose |
No |
When enabled, the policy requests more detailed scanner results from F5. The extra detail enriches the reason header and debug logs. Default: disabled. |
API Timeout (ms) |
No |
Per-request timeout for each F5 scan call in milliseconds. Must be between |
Fail Open |
No |
Determines behavior when the F5 scan call fails, times out, or returns no verdict:
|
The F5 Guardrails policy integrates with F5 AI Guardrails to evaluate LLM prompts and responses.
The policy supports independent evaluation for request and response:
Request Phase (when Moderate Request is enabled):
The policy resolves the caller’s LLM format from the x-input-format header. Traffic in an unsupported format, or with a non-JSON or empty body, passes through unscanned.
The policy sends the whole request body to POST {endpoint}/backend/v1/scans with scanDirection: request.
The policy enforces the returned outcome. See Outcomes and Actions.
If the prompt passes (cleared or flagged), the policy forwards the request to the upstream LLM. On redacted, it forwards a masked version. On blocked, it returns a native content-filter response with HTTP 200.
Response Phase (when Moderate Response is enabled):
The policy buffers the LLM response.
The policy sends the whole response body to F5 with scanDirection: response.
The policy enforces the returned outcome. See Outcomes and Actions.
If the response passes, the policy forwards it unchanged. On redacted, the body is rewritten with the masked body. On blocked, the response is rewritten to a native content-filter response with HTTP 200.
Streaming responses (text/event-stream) are buffered and scanned when Moderate Response is enabled. The client doesn’t receive the response until the scan completes.
|
When both phases scan, the client-visible response headers reflect the response-phase decision. They reflect the request-phase decision only when the response isn’t scanned.
The policy enforces the global result.outcome returned by F5:
| F5 Outcome | Action | Effect |
|---|---|---|
|
Allow |
Content is forwarded unchanged. No policy violation recorded. |
|
Flag |
Traffic continues, a policy violation is recorded, and the failed F5 scanner names populate the reason header. This is the outcome for audit (non-blocking) F5 scanners and for every blockable F5 scanner when Flag Only is enabled. |
|
Redact |
When Apply Redaction is enabled (default), the whole request or response body is replaced with the masked body that F5 returns, traffic continues, and a policy violation is recorded. If F5 returns no masked body, the policy fails closed and rejects the content with the reason |
|
Reject |
The request phase returns a native content-filter response instead of calling the LLM; the response phase rewrites the LLM response to a native content-filter response. Both use HTTP |
|
Indeterminate |
An empty or |
Every non-cleared outcome records a policy violation and adds the failed F5 scanner names to the reason header.
The disabled and forceEnabled F5 scanner lists sent on each scan are resolved per phase, so the request (prompt) and response (completion) phases can target different F5 scanner sets:
The request phase uses Request-Phase Scanner Overrides when set, otherwise the global Disabled Scanners and Force-Enabled Scanners lists.
The response phase uses response-phase scanner overrides with the same global fallback.
Each list falls back independently. An explicitly empty per-phase array ([]) replaces (clears) the global list for that phase; an unset array falls back to the global list.
When neither per-phase override is set, the global lists apply to both phases. If a per-phase override is set for a phase whose moderation is disabled, the override can never take effect, and the policy logs a startup warning.
moderateRequest and applyRedaction default to true, so the prompt is scanned, sensitive data is masked in place on a redacted verdict, and blocked content returns a native content-filter response. moderateResponse defaults to false. Add it to also scan the LLM response.
- policyRef:
name: f5-guardrails-policy-v1-0-impl
namespace: default
config:
f5Endpoint: https://us1.calypsoai.app
f5ApiToken: "${F5_GUARDRAILS_TOKEN}"
f5Project: "<your-f5-project-id>"
No request is ever blocked. Every F5 scanner hit surfaces as flag with a policy violation and reason header. Use this to measure impact before switching to enforcement.
- policyRef:
name: f5-guardrails-policy-v1-0-impl
namespace: default
config:
f5Endpoint: https://us1.calypsoai.app
f5ApiToken: "${F5_GUARDRAILS_TOKEN}"
f5Project: "<your-f5-project-id>"
advancedConfiguration:
flagOnly: true
applyRedaction: false
Only the prompt is scanned, one F5 scanner is disabled for this route, and if F5 is unreachable the request proceeds unscanned (with the reason header emitted).
- policyRef:
name: f5-guardrails-policy-v1-0-impl
namespace: default
config:
f5Endpoint: https://eu1.calypsoai.app
f5ApiToken: "${F5_GUARDRAILS_TOKEN}"
f5Project: "prod-chat"
moderateRequest: true
moderateResponse: false
advancedConfiguration:
disabledScanners: ["01983d0c-f1cc-700a-ab56-6600efc7dfb9"]
apiTimeoutMs: 8000
failOpen: true
The request scan and response scan target independent F5 scanner sets. The request phase clears the global disable list and force-enables an F5 scanner; the response phase keeps the global disable and adds another F5 scanner.
- policyRef:
name: f5-guardrails-policy-v1-0-impl
namespace: default
config:
f5Endpoint: https://us1.calypsoai.app
f5ApiToken: "${F5_GUARDRAILS_TOKEN}"
f5Project: "prod-chat"
advancedConfiguration:
disabledScanners: ["01983d0c-f1cc-700a-ab56-6600efc7dfb9"]
requestScanners:
disabledScanners: []
forceEnabledScanners: ["019f3a1b-2c3d-4e5f-6071-8293a4b5c6d7"]
responseScanners:
forceEnabledScanners: ["01a2b3c4-d5e6-7089-abcd-ef0123456789"]