Once AI applications go to production, they handle real user data and — in the case of agents — call external tools on their own. Things can go wrong fast:
A customer support chatbot leaks a user’s credit card number because PII wasn’t stripped from the context.
A coding agent runs rm -rf / through an MCP tool after hallucinating a shell command — and nothing stopped it.
A healthcare assistant makes up drug dosage numbers. The response reaches the patient unchecked.
An internal Q&A bot gets jailbroken through prompt injection, leaking confidential company data.
Guardrails prevent these scenarios. They sit between your application and the LLM (or MCP tool), inspecting and — when needed — blocking or rewriting data before it causes damage. You can attach them to LLM requests (check the prompt going in, check the response coming out) and to MCP tool calls (check the arguments before the tool runs, check the results after it returns).
Looks at the data, blocks the request if something is wrong. Doesn’t touch the data itself. E.g., a content moderation guardrail sees hate speech in the prompt and blocks the request outright.
LLM Input Validation can run in parallel with the model request (see below). LLM Output Validation and MCP Pre/Post Tool validation run synchronously in the request path before the response or tool result is released.
Mutate
Looks at the data and rewrites it. Can also block. E.g., a PII guardrail rewrites ”My SSN is 123-45-6789”to”My SSN is REDACTED” and lets the request through.
Runs sequentially by priority (lower = first)
Request Traces vs. this table: Traces show each guardrail as its own span with start/end times. LLM Input Validation spans often overlap the model span because validation runs alongside the in-flight model request. Output and MCP guardrail spans typically appear after the model or tool span finishes — that ordering reflects synchronous evaluation, not a contradiction with the execution model above.
This decides what happens when a guardrail catches a violation — and also what happens if the guardrail itself has a problem (like a timeout or a provider outage).
Strategy
On Violation
On Guardrail Error
Enforce
Block
Block
Enforce But Ignore On Error
Block
Let through (graceful degradation)
Audit
Let through (log only)
Let through
How to roll out safely:
Start with Audit so you can see what guardrails would catch without affecting users.
Once things look right, switch to Enforce But Ignore On Error — you get protection, but a guardrail provider outage won’t take your app down.
Where guardrails run depends on whether you’re making an LLM call or invoking an MCP tool.
LLM Requests
MCP Tool Invocations
LLM requests have two hooks — Input (before the model sees the prompt) and Output (after the model responds):
LLM Input
Runs before the prompt reaches the LLM:
PII masking and redaction
Prompt injection detection
Content moderation
LLM Output
Runs after the LLM responds:
Hallucination detection
Secrets detection
Content filtering
LLM Request Guardrail Flow
Here’s the order of operations when a request hits the AI Gateway:
Input Mutation guardrails run first and block until they finish (e.g., redacting PII from the prompt).
Input Validation kicks off in the background — it checks for things like prompt injection while the model request is already in flight.
The model request starts with the mutated prompt.
If Input Validation fails while the model is still running, the AI Gateway cancels the model request right away so you don’t pay for it.
Once the model responds, Output Mutation guardrails process the response (e.g., stripping secrets).
Output Validation checks the final result. If it fails, the response is blocked — though model costs have already been incurred at this point.
The clean response goes back to the client.
Hook
Execution
What Happens on Failure
Input Validation
Async (parallel with model request)
Model request cancelled
Input Mutation
Sync (before model request)
Request blocked
Output Mutation
Sync (after model response)
Response blocked
Output Validation
Sync (after output mutation)
Response rejected
Streaming (stream: true) and LLM output guardrails: Output guardrails are not applied when the response is streamed ("stream": true). This is because output guardrails need the complete response text to evaluate, but streaming sends the response in chunks as they are generated. If you need output guardrails to run, set "stream": false in your request. Input guardrails work the same way regardless of streaming mode — they always run before the request is sent to the model. Guardrails are also not applied on text-to-speech, speech-to-text, or realtime requests. See the FAQ for more details.
MCP tool calls have two hooks — Pre Tool (before the tool runs) and Post Tool (after it returns):
MCP Pre Tool
Runs before the tool is called:
SQL injection prevention
Parameter validation
Permission checks (Cedar/OPA policies)
MCP Post Tool
Runs after the tool returns:
Code safety checks
Secrets detection in outputs
PII redaction from results
MCP Tool Guardrail Flow
The flow is straightforward:
Pre Tool guardrails all run before the tool is called. If any of them fail, the tool never executes.
The tool runs only after all pre-tool guardrails pass.
Post Tool guardrails check (and optionally rewrite) the tool’s output.
The validated result goes back to the model.
Hook
Execution
What Happens on Failure
MCP Pre Tool
Sync (before tool invocation)
Tool doesn’t run
MCP Post Tool
Sync (after tool returns)
Result withheld from model
Guardrails run on every tool call separately. If an agent calls five tools in a row, each one gets its own guardrail checks.
MCP hooks matter most in agentic setups where the model decides which tools to call on its own. Use Pre Tool to stop bad actions before they happen (e.g., blocking a DROP TABLE query), and Post Tool to clean up results before the model sees them (e.g., redacting secrets from a database response).
Guardrails add processing time — but the AI Gateway is designed to keep that impact small.
LLM Requests
MCP Tool Invocations
Input Validation runs in parallel with the model request, so in the happy path, it adds no extra wait time before you see the first token.
Input Mutation runs before the model request, so its processing time is added directly.
When Input Validation fails, the model request gets cancelled immediately — you don’t pay for a response you were going to throw away.
Execution Flow Examples
All Guardrails Pass
Input validation runs in parallel with the model request. Output guardrails process the response before it’s returned.
Input Validation Failure
Input validation fails while the model is running — the model request gets cancelled immediately to save costs.
Output Validation Failure
The model finishes, but output validation fails — the response is rejected. Model costs are already incurred at this point.
All MCP guardrails run synchronously — pre-tool guardrails block before the tool executes, and post-tool guardrails block after.
Pre-tool guardrail latency adds directly to the tool call time since the tool cannot start until all pre-tool checks pass.
When a pre-tool guardrail fails, the tool never executes — you avoid the cost and side effects of a bad tool call entirely.
You can track the latency impact of each guardrail in AI Gateway → Monitor → Request Traces. Each guardrail span shows its execution time, result, scope, and which entity it was applied on.
Gateway policies attach guardrails to matching traffic. You can also add more guardrails on a single request with a header. The header is additive: those extra guardrails run together with the policies, and the policies still run.
Add extra guardrails on one request
Pass the X-TFY-GUARDRAILS header to add LLM input or output guardrails for that request. Handy for testing, or when one request needs an extra check. Matching gateway policies still run. MCP tool hooks come from the policy, not this header.
First register your guardrails in AI Gateway → Guardrails, then set up guardrail policies in AI Gateway → Policies → Guardrails to apply them automatically based on who’s making the request, which model they’re calling, or which MCP tool is being used. This is the way to go for org-wide enforcement.For a step-by-step walkthrough, see the Getting Started guide. For the full policy guide, see Configure Guardrail Policies.
Ready to use out of the box — no external credentials needed.These integrations run on TrueFoundry-managed infrastructure: you configure them in the AI Gateway; TrueFoundry operates the guardrail execution path (no third-party API keys required for the built-ins listed here). If you need a specific vendor (for example OpenAI Moderations, Azure Content Safety, Bedrock Guardrails, or Google Model Armor), use an integration from External Providers or Custom Guardrails.Among TrueFoundry guardrails, these guardrails use the following services under the hood:
Detects harmful content across four categories: Hate (including harassment), Self-Harm, Sexual, and Violence (including illicit activity). Each category has a configurable score threshold.
Detects and optionally redacts personally identifiable information (PII) and protected health information (PHI) such as names, addresses, SSNs, and medical record numbers.
Detects jailbreak attempts and prompt injection attacks designed to manipulate LLM behavior.
These three guardrails are only available on TrueFoundry SaaS. They are not available on self-hosted deployments. In case of non-SaaS (self-hosted) deployments, you can use the following alternatives:
If the built-in and provider integrations don’t cover your use case, you can write your own. Build a custom guardrail with Guardrails.AI, a plain Python function, or any framework you prefer, and plug it into the AI Gateway.
Custom Guardrails
Build and integrate your own guardrail using the template repo, or start from the reference integrations above.
How do I control which messages guardrails evaluate?
By default, guardrails look at all messages in the conversation. Use the X-TFY-GUARDRAILS-SCOPE header to narrow that:
all (default): Checks the full conversation history
last: Checks only the most recent message
positive integer (e.g. 10): Checks the last N messages
Use a last-N window when a single request can append several new turns at once (for example tool results followed by a user message in an agent loop). Checking only last would miss the new-but-not-final messages in that request. Pure one-message-per-request chat can use last.MCP tool pre/post guardrails always scan the full tool arguments or result — scope does not apply there. Oversized text is still split into character-limited chunks for providers with per-request limits.
curl -X POST "{GATEWAY_BASE_URL}/chat/completions" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -H 'X-TFY-GUARDRAILS: {"llm_input_guardrails":["my-group/pii-redaction"]}' \ -H "X-TFY-GUARDRAILS-SCOPE: 10" \ -d '{ "model": "openai/gpt-4o", "messages": [ {"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "Hello, how can you help me today?"} ] }'
What happens if a guardrail service is down?
Depends on the enforcement strategy you picked:
Enforce: Request gets blocked.
Enforce But Ignore On Error: Request goes through anyway. This is the safest default — you stay protected when guardrails work, but a provider outage won’t break your app.
Audit: Request always goes through.
How can I monitor guardrail execution?
Go to AI Gateway → Monitor → Request Traces. You’ll see:
Which guardrails ran on each hook
Whether they passed or failed, and how long they took
What they found (secrets, SQL issues, unsafe patterns, etc.)
What mutations were applied
Traces are logged for both successful and blocked requests.
Do output guardrails work with streaming responses?
No. Output guardrails are skipped when the response is streamed ("stream": true). Output guardrails need the complete response text to evaluate, but streaming sends tokens to the client as they are generated — so there is no full response to check before delivery begins.What you can do:
Set "stream": false if you need output guardrails to run. This ensures the AI Gateway receives the full response, evaluates it against your output guardrails, and only then returns it to the client.
Handle checks client-side — assemble the full streamed response on the client and run your own output validation after the stream completes.
Use input-only guardrails with streaming — input guardrails always run regardless of streaming mode, so you still get protection on the prompt side.
# Output guardrails WILL run:response = client.chat.completions.create( model="my-model", messages=[{"role": "user", "content": "Hello"}], stream=False # output guardrails are applied)# Output guardrails will NOT run:response = client.chat.completions.create( model="my-model", messages=[{"role": "user", "content": "Hello"}], stream=True # output guardrails are skipped)
Are system prompts evaluated by guardrails?
No. System prompts are excluded from guardrails by default — the AI Gateway strips them before sending content to any guardrail, so they are never inspected, blocked, or redacted.The one exception is CrowdStrike AIDR, which sees the system prompt for analysis but never modifies it.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"TrueFoundry Docs","description":"TrueFoundry documentation — enterprise-grade AI Gateway combining LLM, MCP, and Agent Gateways to connect, monitor, and govern agentic AI applications across providers from a unified control plane.","colors":{"primary":"#4f46e5","light":"#4f46e5","dark":"#4f46e5"},"logo":{"light":"https://mintcdn.com/truefoundry/e2uUimEwX30qkWxc/logo/light.svg?fit=max\u0026auto=format\u0026n=e2uUimEwX30qkWxc\u0026q=85\u0026s=6068d83664aeda0239bec2422657dd20","dark":"https://mintcdn.com/truefoundry/e2uUimEwX30qkWxc/logo/dark.svg?fit=max\u0026auto=format\u0026n=e2uUimEwX30qkWxc\u0026q=85\u0026s=c1cb26554a546d84500b40f7057bece8"},"favicon":"https://mintcdn.com/truefoundry/6bbtTt95c1iCcyph/favicon.svg?fit=max\u0026auto=format\u0026n=6bbtTt95c1iCcyph\u0026q=85\u0026s=f55bde34214b38034126d05b08ea16c7","appearance":{"default":"light"},"background":{"decoration":"grid"},"navbar":{"links":[{"href":"https://www.truefoundry.com/book-demo","label":"Book Demo"},{"href":"https://www.truefoundry.com/blog","label":"Blog"}],"primary":{"type":"button","label":"Sign Up","href":"https://www.truefoundry.com/register"}},"footer":{"socials":{"x":"https://twitter.com/truefoundry","linkedin":"https://in.linkedin.com/company/truefoundry"}},"seo":{"metatags":{"og:type":"website","og:site_name":"TrueFoundry Docs","og:image":"https://assets.production.truefoundry.com/logo.svg","og:description":"TrueFoundry offers an enterprise-grade AI Gateway combining LLM, MCP, and Agent Gateways—empowering businesses to connect, monitor, and govern agentic AI applications across providers from a unified control plane.","description":"TrueFoundry offers an enterprise-grade AI Gateway combining LLM, MCP, and Agent Gateways—empowering businesses to connect, monitor, and govern agentic AI applications across providers from a unified control plane."}},"icons":{"library":"fontawesome"},"styling":{"codeblocks":"dark","latex":true},"contextual":{"options":["copy","view","chatgpt","claude","mcp","cursor","vscode"],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"truefoundry","hasAudioNarration":false,"actualSubdomain":"truefoundry","customDomains":["www.truefoundry.com"],"gitSource":{"type":"github","owner":"truefoundry","repo":"docs-mintlify","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af4bda75cc09d51b1310a4a","clientVersion":"0.0.4111","searchFilterCounts":[{"language":"default","tag":"AI Gateway","count":251},{"language":"default","tag":"API Reference","count":202},{"language":"default","tag":"Platform","count":196},{"language":"default","tag":"Integrations","count":131},{"language":"default","tag":"LLM Gateway","count":118},{"language":"default","tag":"AI Deployment","count":109},{"language":"default","tag":"Integrate Models","count":50},{"language":"default","tag":"Observability","count":47},{"language":"default","tag":"Guardrails and Security","count":46},{"language":"default","tag":"MCP Servers","count":43}]},"assistantConfig":{"enableAskAiButton":true,"enableAskAiSearchBar":true,"deflection":{"enabled":true,"email":"support@truefoundry.com","showHelpButton":true}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":".line-highlight{background:rgb(var(--primary-light)/.7)!important}.tfy-cat-anchor{scroll-margin-top:6rem;margin-block:1.75rem}.line-highlight:before{background:rgb(var(--primary-light)/.7)!important}.line-highlight:after{background:rgb(var(--primary-light)/.7)!important}"}],"page":{"pagePath":"docs/ai-gateway/guardrails-overview","slug":"/docs/ai-gateway/guardrails-overview","pageMetadata":{"title":"AI Gateway Guardrails Overview","sidebarTitle":"Overview","description":"Learn about guardrails for ensuring safety, compliance, and quality in LLM interactions and MCP tool invocations.","href":"/docs/ai-gateway/guardrails-overview"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Learn about guardrails for ensuring safety, compliance, and quality in LLM interactions and MCP tool invocations.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Accordion,AccordionGroup,Card,CardGroup,CodeBlock,Columns,Frame,Heading,Mermaid,Note,OptimizedImage,Tab,Table,Tabs,Tip,Warning}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!AccordionGroup)_missingMdxReference(`AccordionGroup`,true);if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Columns)_missingMdxReference(`Columns`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Mermaid)_missingMdxReference(`Mermaid`,true);if(!Note)_missingMdxReference(`Note`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`why-guardrails`,children:`Why Guardrails?`}),`\n`,_jsx(_components.p,{children:`Once AI applications go to production, they handle real user data and — in the case of agents — call external tools on their own. Things can go wrong fast:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`A customer support chatbot`}),` leaks a user’s credit card number because PII wasn’t stripped from the context.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`A coding agent`}),` runs `,_jsx(_components.code,{children:`rm -rf /`}),` through an MCP tool after hallucinating a shell command — and nothing stopped it.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`A healthcare assistant`}),` makes up drug dosage numbers. The response reaches the patient unchecked.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`An internal Q\u0026A bot`}),` gets jailbroken through prompt injection, leaking confidential company data.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Guardrails prevent these scenarios. They sit between your application and the LLM (or MCP tool), inspecting and — when needed — blocking or rewriting data before it causes damage. You can attach them to `,_jsx(_components.strong,{children:`LLM requests`}),` (check the prompt going in, check the response coming out) and to `,_jsx(_components.strong,{children:`MCP tool calls`}),` (check the arguments before the tool runs, check the results after it returns).`]}),`\n`,_jsx(Heading,{level:`2`,id:`how-a-truefoundry-guardrail-works`,children:`How a TrueFoundry Guardrail Works`}),`\n`,_jsxs(_components.p,{children:[`Each guardrail has two settings you configure: what it `,_jsx(_components.em,{children:`does`}),` with the data, and how strictly it `,_jsx(_components.em,{children:`enforces`}),` its decisions.`]}),`\n`,_jsx(Heading,{level:`3`,id:`operation-mode`,children:`Operation Mode`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Mode`}),_jsx(_components.th,{children:`Behavior`}),_jsx(_components.th,{children:`Execution`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Validate`})}),_jsxs(_components.td,{children:[`Looks at the data, blocks the request if something is wrong. Doesn’t touch the data itself. `,_jsx(`br`,{}),` `,_jsx(_components.code,{children:`E.g., a content moderation guardrail sees hate speech in the prompt and blocks the request outright.`})]}),_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`LLM Input Validation`}),` can run `,_jsx(_components.strong,{children:`in parallel with the model request`}),` (see below). `,_jsx(_components.strong,{children:`LLM Output Validation`}),` and `,_jsx(_components.strong,{children:`MCP Pre/Post Tool`}),` validation run `,_jsx(_components.strong,{children:`synchronously`}),` in the request path before the response or tool result is released.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Mutate`})}),_jsxs(_components.td,{children:[`Looks at the data `,_jsx(_components.em,{children:`and`}),` rewrites it. Can also block. `,_jsx(`br`,{}),` `,_jsx(_components.code,{children:`E.g., a PII guardrail rewrites `}),`”My SSN is 123-45-6789”`,_jsx(_components.code,{children:`to`}),`”My SSN is REDACTED”`,_jsx(_components.code,{children:` and lets the request through.`})]}),_jsxs(_components.td,{children:[`Runs `,_jsx(_components.strong,{children:`sequentially`}),` by priority (lower = first)`]})]})]})]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Request Traces vs. this table:`}),` Traces show each guardrail as its own span with start/end times. `,_jsx(_components.strong,{children:`LLM Input Validation`}),` spans often overlap the model span because validation runs alongside the in-flight model request. `,_jsx(_components.strong,{children:`Output`}),` and `,_jsx(_components.strong,{children:`MCP`}),` guardrail spans typically appear `,_jsx(_components.strong,{children:`after`}),` the model or tool span finishes — that ordering reflects synchronous evaluation, not a contradiction with the execution model above.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`enforcement-strategy`,children:`Enforcement Strategy`}),`\n`,_jsxs(_components.p,{children:[`This decides what happens when a guardrail catches a violation — and also what happens if the guardrail `,_jsx(_components.em,{children:`itself`}),` has a problem (like a timeout or a provider outage).`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Strategy`}),_jsx(_components.th,{children:`On Violation`}),_jsx(_components.th,{children:`On Guardrail Error`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Enforce`})}),_jsx(_components.td,{children:`Block`}),_jsx(_components.td,{children:`Block`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Enforce But Ignore On Error`})}),_jsx(_components.td,{children:`Block`}),_jsx(_components.td,{children:`Let through (graceful degradation)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Audit`})}),_jsx(_components.td,{children:`Let through (log only)`}),_jsx(_components.td,{children:`Let through`})]})]})]}),`\n`,_jsxs(Tip,{children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`How to roll out safely`}),`:`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Start with `,_jsx(_components.strong,{children:`Audit`}),` so you can see what guardrails would catch without affecting users.`]}),`\n`,_jsxs(_components.li,{children:[`Once things look right, switch to `,_jsx(_components.strong,{children:`Enforce But Ignore On Error`}),` — you get protection, but a guardrail provider outage won’t take your app down.`]}),`\n`,_jsxs(_components.li,{children:[`Move to `,_jsx(_components.strong,{children:`Enforce`}),` when you need strict compliance.`]}),`\n`]})]}),`\n`,_jsx(Heading,{level:`2`,id:`how-truefoundry-ai-gateway-runs-guardrails`,children:`How TrueFoundry AI Gateway Runs Guardrails`}),`\n`,_jsx(_components.p,{children:`Where guardrails run depends on whether you’re making an LLM call or invoking an MCP tool.`}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`LLM Requests`,id:`llm-requests`,children:[_jsxs(_components.p,{children:[`LLM requests have two hooks — `,_jsx(_components.strong,{children:`Input`}),` (before the model sees the prompt) and `,_jsx(_components.strong,{children:`Output`}),` (after the model responds):`]}),_jsxs(CardGroup,{cols:2,children:[_jsxs(Card,{title:`LLM Input`,icon:`arrow-right-to-bracket`,children:[_jsxs(_components.p,{children:[`Runs `,_jsx(_components.strong,{children:`before`}),` the prompt reaches the LLM:`]}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`PII masking and redaction`}),`\n`,_jsx(_components.li,{children:`Prompt injection detection`}),`\n`,_jsx(_components.li,{children:`Content moderation`}),`\n`]})]}),_jsxs(Card,{title:`LLM Output`,icon:`arrow-right-from-bracket`,children:[_jsxs(_components.p,{children:[`Runs `,_jsx(_components.strong,{children:`after`}),` the LLM responds:`]}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Hallucination detection`}),`\n`,_jsx(_components.li,{children:`Secrets detection`}),`\n`,_jsx(_components.li,{children:`Content filtering`}),`\n`]})]})]}),_jsx(Frame,{caption:`LLM Request Guardrail Flow`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/truefoundry/Fc6z3zZxeYI2aatT/images/llm_guardrails_flow.png?fit=max\u0026auto=format\u0026n=Fc6z3zZxeYI2aatT\u0026q=85\u0026s=ae40c961eed9a85488d594f74528777a`,alt:`Diagram showing the flow of LLM requests through input and output guardrails`,\"data-og-width\":`958`,width:`958`,\"data-og-height\":`481`,height:`481`,\"data-path\":`images/llm_guardrails_flow.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/truefoundry/Fc6z3zZxeYI2aatT/images/llm_guardrails_flow.png?w=280\u0026fit=max\u0026auto=format\u0026n=Fc6z3zZxeYI2aatT\u0026q=85\u0026s=1e297dbc359af5781bc62c10770f0c75 280w, https://mintcdn.com/truefoundry/Fc6z3zZxeYI2aatT/images/llm_guardrails_flow.png?w=560\u0026fit=max\u0026auto=format\u0026n=Fc6z3zZxeYI2aatT\u0026q=85\u0026s=8e2762fb0ea2cee5dc0e06fdcb23a898 560w, https://mintcdn.com/truefoundry/Fc6z3zZxeYI2aatT/images/llm_guardrails_flow.png?w=840\u0026fit=max\u0026auto=format\u0026n=Fc6z3zZxeYI2aatT\u0026q=85\u0026s=ae49c4769b510df7aa1bc3b7ecd3de77 840w, https://mintcdn.com/truefoundry/Fc6z3zZxeYI2aatT/images/llm_guardrails_flow.png?w=1100\u0026fit=max\u0026auto=format\u0026n=Fc6z3zZxeYI2aatT\u0026q=85\u0026s=275d94e2a3c07cd10163f261f2b3d2e8 1100w, https://mintcdn.com/truefoundry/Fc6z3zZxeYI2aatT/images/llm_guardrails_flow.png?w=1650\u0026fit=max\u0026auto=format\u0026n=Fc6z3zZxeYI2aatT\u0026q=85\u0026s=dd09c4b6cce1390095a452d1f6416050 1650w, https://mintcdn.com/truefoundry/Fc6z3zZxeYI2aatT/images/llm_guardrails_flow.png?w=2500\u0026fit=max\u0026auto=format\u0026n=Fc6z3zZxeYI2aatT\u0026q=85\u0026s=cf249628294002808730db4291ea0b3f 2500w`})}),_jsx(_components.p,{children:`Here’s the order of operations when a request hits the AI Gateway:`}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Input Mutation`}),` guardrails run first and block until they finish (e.g., redacting PII from the prompt).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Input Validation`}),` kicks off in the background — it checks for things like prompt injection `,_jsx(_components.em,{children:`while`}),` the model request is already in flight.`]}),`\n`,_jsxs(_components.li,{children:[`The `,_jsx(_components.strong,{children:`model request starts`}),` with the mutated prompt.`]}),`\n`,_jsxs(_components.li,{children:[`If `,_jsx(_components.strong,{children:`Input Validation fails`}),` while the model is still running, the AI Gateway `,_jsx(_components.strong,{children:`cancels the model request`}),` right away so you don’t pay for it.`]}),`\n`,_jsxs(_components.li,{children:[`Once the model responds, `,_jsx(_components.strong,{children:`Output Mutation`}),` guardrails process the response (e.g., stripping secrets).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Output Validation`}),` checks the final result. If it fails, the response is blocked — though model costs have already been incurred at this point.`]}),`\n`,_jsx(_components.li,{children:`The clean response goes back to the client.`}),`\n`]}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Hook`}),_jsx(_components.th,{children:`Execution`}),_jsx(_components.th,{children:`What Happens on Failure`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Input Validation`})}),_jsx(_components.td,{children:`Async (parallel with model request)`}),_jsx(_components.td,{children:`Model request cancelled`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Input Mutation`})}),_jsx(_components.td,{children:`Sync (before model request)`}),_jsx(_components.td,{children:`Request blocked`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Output Mutation`})}),_jsx(_components.td,{children:`Sync (after model response)`}),_jsx(_components.td,{children:`Response blocked`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Output Validation`})}),_jsx(_components.td,{children:`Sync (after output mutation)`}),_jsx(_components.td,{children:`Response rejected`})]})]})]}),_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsxs(_components.strong,{children:[`Streaming (`,_jsx(_components.code,{children:`stream: true`}),`) and LLM output guardrails:`]}),` Output guardrails are `,_jsx(_components.strong,{children:`not applied`}),` when the response is streamed (`,_jsx(_components.code,{children:`\"stream\": true`}),`). This is because output guardrails need the complete response text to evaluate, but streaming sends the response in chunks as they are generated. If you need output guardrails to run, set `,_jsx(_components.code,{children:`\"stream\": false`}),` in your request. Input guardrails work the same way regardless of streaming mode — they always run before the request is sent to the model. Guardrails are also not applied on text-to-speech, speech-to-text, or realtime requests. See the `,_jsx(_components.a,{href:`#faq`,children:`FAQ`}),` for more details.`]})})]}),_jsxs(Tab,{title:`MCP Tool Invocations`,id:`mcp-tool-invocations`,children:[_jsxs(_components.p,{children:[`MCP tool calls have two hooks — `,_jsx(_components.strong,{children:`Pre Tool`}),` (before the tool runs) and `,_jsx(_components.strong,{children:`Post Tool`}),` (after it returns):`]}),_jsxs(CardGroup,{cols:2,children:[_jsxs(Card,{title:`MCP Pre Tool`,icon:`screwdriver-wrench`,children:[_jsxs(_components.p,{children:[`Runs `,_jsx(_components.strong,{children:`before`}),` the tool is called:`]}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`SQL injection prevention`}),`\n`,_jsx(_components.li,{children:`Parameter validation`}),`\n`,_jsx(_components.li,{children:`Permission checks (Cedar/OPA policies)`}),`\n`]})]}),_jsxs(Card,{title:`MCP Post Tool`,icon:`check-double`,children:[_jsxs(_components.p,{children:[`Runs `,_jsx(_components.strong,{children:`after`}),` the tool returns:`]}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Code safety checks`}),`\n`,_jsx(_components.li,{children:`Secrets detection in outputs`}),`\n`,_jsx(_components.li,{children:`PII redaction from results`}),`\n`]})]})]}),_jsx(Frame,{caption:`MCP Tool Guardrail Flow`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/truefoundry/Fc6z3zZxeYI2aatT/images/mcp_guardrails_flow.png?fit=max\u0026auto=format\u0026n=Fc6z3zZxeYI2aatT\u0026q=85\u0026s=af6c9d29abcfa2bb6bd4b73d39fbf129`,alt:`Diagram showing the flow of MCP tool invocations through pre and post tool guardrails`,\"data-og-width\":`958`,width:`958`,\"data-og-height\":`491`,height:`491`,\"data-path\":`images/mcp_guardrails_flow.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/truefoundry/Fc6z3zZxeYI2aatT/images/mcp_guardrails_flow.png?w=280\u0026fit=max\u0026auto=format\u0026n=Fc6z3zZxeYI2aatT\u0026q=85\u0026s=0b07854a47e75af36e844273e9e178fb 280w, https://mintcdn.com/truefoundry/Fc6z3zZxeYI2aatT/images/mcp_guardrails_flow.png?w=560\u0026fit=max\u0026auto=format\u0026n=Fc6z3zZxeYI2aatT\u0026q=85\u0026s=e6d1712258adc50b20bae698b3f38a1e 560w, https://mintcdn.com/truefoundry/Fc6z3zZxeYI2aatT/images/mcp_guardrails_flow.png?w=840\u0026fit=max\u0026auto=format\u0026n=Fc6z3zZxeYI2aatT\u0026q=85\u0026s=3fa953453996f6fac45b5a2b6580c5d8 840w, https://mintcdn.com/truefoundry/Fc6z3zZxeYI2aatT/images/mcp_guardrails_flow.png?w=1100\u0026fit=max\u0026auto=format\u0026n=Fc6z3zZxeYI2aatT\u0026q=85\u0026s=a7afb7c290b72dc1c6f7b04e24b7b065 1100w, https://mintcdn.com/truefoundry/Fc6z3zZxeYI2aatT/images/mcp_guardrails_flow.png?w=1650\u0026fit=max\u0026auto=format\u0026n=Fc6z3zZxeYI2aatT\u0026q=85\u0026s=3379cc3ec347e1e981a6410335b3eeee 1650w, https://mintcdn.com/truefoundry/Fc6z3zZxeYI2aatT/images/mcp_guardrails_flow.png?w=2500\u0026fit=max\u0026auto=format\u0026n=Fc6z3zZxeYI2aatT\u0026q=85\u0026s=903a1b174a44281d4cb6b9bba2164f22 2500w`})}),_jsx(_components.p,{children:`The flow is straightforward:`}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Pre Tool`}),` guardrails all run before the tool is called. If any of them fail, the tool never executes.`]}),`\n`,_jsxs(_components.li,{children:[`The `,_jsx(_components.strong,{children:`tool runs`}),` only after all pre-tool guardrails pass.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Post Tool`}),` guardrails check (and optionally rewrite) the tool’s output.`]}),`\n`,_jsx(_components.li,{children:`The validated result goes back to the model.`}),`\n`]}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Hook`}),_jsx(_components.th,{children:`Execution`}),_jsx(_components.th,{children:`What Happens on Failure`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`MCP Pre Tool`})}),_jsx(_components.td,{children:`Sync (before tool invocation)`}),_jsx(_components.td,{children:`Tool doesn’t run`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`MCP Post Tool`})}),_jsx(_components.td,{children:`Sync (after tool returns)`}),_jsx(_components.td,{children:`Result withheld from model`})]})]})]}),_jsx(Note,{children:_jsxs(_components.p,{children:[`Guardrails run on `,_jsx(_components.strong,{children:`every tool call separately`}),`. If an agent calls five tools in a row, each one gets its own guardrail checks.`]})}),_jsx(Tip,{children:_jsxs(_components.p,{children:[`MCP hooks matter most in agentic setups where the model decides which tools to call on its own. Use `,_jsx(_components.strong,{children:`Pre Tool`}),` to stop bad actions before they happen (e.g., blocking a `,_jsx(_components.code,{children:`DROP TABLE`}),` query), and `,_jsx(_components.strong,{children:`Post Tool`}),` to clean up results before the model sees them (e.g., redacting secrets from a database response).`]})})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`latency-impact-of-guardrails`,children:`Latency Impact of Guardrails`}),`\n`,_jsx(_components.p,{children:`Guardrails add processing time — but the AI Gateway is designed to keep that impact small.`}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`LLM Requests`,id:`llm-requests-2`,children:[_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Input Validation runs in parallel`}),` with the model request, so in the happy path, it adds no extra wait time before you see the first token.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Input Mutation runs before`}),` the model request, so its processing time is added directly.`]}),`\n`,_jsxs(_components.li,{children:[`When `,_jsx(_components.strong,{children:`Input Validation fails`}),`, the model request gets cancelled immediately — you don’t pay for a response you were going to throw away.`]}),`\n`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Execution Flow Examples`})}),_jsxs(AccordionGroup,{children:[_jsxs(Accordion,{title:`All Guardrails Pass`,id:`all-guardrails-pass`,children:[_jsx(_components.p,{children:`Input validation runs in parallel with the model request. Output guardrails process the response before it’s returned.`}),_jsx(Mermaid,{chart:`gantt\n title All Guardrails Pass\n dateFormat X\n axisFormat \n section Input\n Input Mutation :done, 0, 2\n section Parallel Execution\n Input Validation ✓ :done, 2, 5\n Model Request :active, 2, 8\n section Output\n Output Mutation :done, 8, 10\n Output Validation ✓ :done, 10, 12`})]}),_jsxs(Accordion,{title:`Input Validation Failure`,id:`input-validation-failure`,children:[_jsxs(_components.p,{children:[`Input validation fails while the model is running — the model request gets `,_jsx(_components.strong,{children:`cancelled immediately`}),` to save costs.`]}),_jsx(Mermaid,{chart:`gantt\n title Input Validation Failure — Model Request Cancelled\n dateFormat X\n axisFormat \n section Input\n Input Mutation :done, 0, 2\n section Parallel Execution\n Input Validation ✗ :crit, 2, 5\n Model Request (cancelled) :crit, 2, 5`})]}),_jsxs(Accordion,{title:`Output Validation Failure`,id:`output-validation-failure`,children:[_jsx(_components.p,{children:`The model finishes, but output validation fails — the response is rejected. Model costs are already incurred at this point.`}),_jsx(Mermaid,{chart:`gantt\n title Output Validation Failure — Response Rejected\n dateFormat X\n axisFormat \n section Input\n Input Mutation :done, 0, 2\n section Parallel Execution\n Input Validation ✓ :done, 2, 5\n Model Request :active, 2, 8\n section Output\n Output Mutation :done, 8, 10\n Output Validation ✗ :crit, 10, 12`})]})]})]}),_jsx(Tab,{title:`MCP Tool Invocations`,id:`mcp-tool-invocations-2`,children:_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`All MCP guardrails run synchronously`}),` — pre-tool guardrails block before the tool executes, and post-tool guardrails block after.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Pre-tool guardrail latency adds directly`}),` to the tool call time since the tool cannot start until all pre-tool checks pass.`]}),`\n`,_jsxs(_components.li,{children:[`When a `,_jsx(_components.strong,{children:`pre-tool guardrail fails`}),`, the tool never executes — you avoid the cost and side effects of a bad tool call entirely.`]}),`\n`]})})]}),`\n`,_jsxs(_components.p,{children:[`You can track the latency impact of each guardrail in `,_jsx(_components.strong,{children:`AI Gateway → Monitor → Request Traces`}),`. Each guardrail span shows its execution time, result, scope, and which entity it was applied on.`]}),`\n`,_jsx(Frame,{caption:`Guardrail latency visible in Request Traces`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/truefoundry/r1of9DsUNzanZ7Rp/images/trace-guardrail.png?fit=max\u0026auto=format\u0026n=r1of9DsUNzanZ7Rp\u0026q=85\u0026s=a0b4bd00c9da0eb3ca2ab1263414fd18`,alt:`Request Traces view showing a selected Guardrail span with latency, result, scope, input, and output details`,\"data-og-width\":`1918`,width:`1918`,\"data-og-height\":`1035`,height:`1035`,\"data-path\":`images/trace-guardrail.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/truefoundry/r1of9DsUNzanZ7Rp/images/trace-guardrail.png?w=280\u0026fit=max\u0026auto=format\u0026n=r1of9DsUNzanZ7Rp\u0026q=85\u0026s=617fe41d42c210653206b99da2b8bd6d 280w, https://mintcdn.com/truefoundry/r1of9DsUNzanZ7Rp/images/trace-guardrail.png?w=560\u0026fit=max\u0026auto=format\u0026n=r1of9DsUNzanZ7Rp\u0026q=85\u0026s=7a814b0add0ad5c6eb749b466bf03f49 560w, https://mintcdn.com/truefoundry/r1of9DsUNzanZ7Rp/images/trace-guardrail.png?w=840\u0026fit=max\u0026auto=format\u0026n=r1of9DsUNzanZ7Rp\u0026q=85\u0026s=ad4784469d16d2ee2896918aa31ae0e9 840w, https://mintcdn.com/truefoundry/r1of9DsUNzanZ7Rp/images/trace-guardrail.png?w=1100\u0026fit=max\u0026auto=format\u0026n=r1of9DsUNzanZ7Rp\u0026q=85\u0026s=d96c984e071f9539f075efcc1bed2fad 1100w, https://mintcdn.com/truefoundry/r1of9DsUNzanZ7Rp/images/trace-guardrail.png?w=1650\u0026fit=max\u0026auto=format\u0026n=r1of9DsUNzanZ7Rp\u0026q=85\u0026s=22ea1c30b3e1b026645396a68d89e757 1650w, https://mintcdn.com/truefoundry/r1of9DsUNzanZ7Rp/images/trace-guardrail.png?w=2500\u0026fit=max\u0026auto=format\u0026n=r1of9DsUNzanZ7Rp\u0026q=85\u0026s=bfc2ee86f2ee57496426ddea6efcfeeb 2500w`})}),`\n`,_jsx(Heading,{level:`2`,id:`how-to-apply-guardrails`,children:`How to Apply Guardrails`}),`\n`,_jsx(_components.p,{children:`Gateway policies attach guardrails to matching traffic. You can also add more guardrails on a single request with a header. The header is additive: those extra guardrails run together with the policies, and the policies still run.`}),`\n`,_jsxs(AccordionGroup,{children:[_jsxs(Accordion,{title:`Add extra guardrails on one request`,id:`add-extra-guardrails-on-one-request`,children:[_jsxs(_components.p,{children:[`Pass the `,_jsx(_components.code,{children:`X-TFY-GUARDRAILS`}),` header to add LLM input or output guardrails for that request. Handy for testing, or when one request needs an extra check. Matching gateway policies still run. MCP tool hooks come from the policy, not this header.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"llm_input_guardrails\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"my-group/pii-redaction\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"llm_output_guardrails\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"my-group/secrets-detection\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),_jsxs(Accordion,{title:`Gateway-Level via Policies`,id:`gateway-level-via-policies`,children:[_jsxs(_components.p,{children:[`First register your guardrails in `,_jsx(_components.strong,{children:`AI Gateway → Guardrails`}),`, then set up guardrail policies in `,_jsx(_components.strong,{children:`AI Gateway → Policies → Guardrails`}),` to apply them automatically based on who’s making the request, which model they’re calling, or which MCP tool is being used. This is the way to go for org-wide enforcement.`]}),_jsxs(_components.p,{children:[`For a step-by-step walkthrough, see the `,_jsx(_components.a,{href:`/docs/ai-gateway/guardrails-getting-started`,children:`Getting Started`}),` guide. For the full policy guide, see `,_jsx(_components.a,{href:`/docs/ai-gateway/guardrails-configuration`,children:`Configure Guardrail Policies`}),`.`]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`supported-guardrails`,children:`Supported Guardrails`}),`\n`,_jsx(_components.p,{children:`The AI Gateway ships with built-in guardrails and integrates with a range of external providers — all managed through a single interface.`}),`\n`,_jsx(Heading,{level:`3`,id:`truefoundry-built-in-guardrails`,children:`TrueFoundry Built-in Guardrails`}),`\n`,_jsx(_components.p,{children:`Ready to use out of the box — no external credentials needed.`}),`\n`,_jsxs(_components.p,{children:[`These integrations run on `,_jsx(_components.strong,{children:`TrueFoundry-managed`}),` infrastructure: you configure them in the AI Gateway; TrueFoundry operates the guardrail execution path (no third-party API keys required for the built-ins listed here). If you need a `,_jsx(_components.strong,{children:`specific vendor`}),` (for example OpenAI Moderations, Azure Content Safety, Bedrock Guardrails, or Google Model Armor), use an integration from `,_jsx(_components.a,{href:`#external-providers`,children:`External Providers`}),` or `,_jsx(_components.a,{href:`/docs/ai-gateway/custom-guardrails`,children:`Custom Guardrails`}),`.`]}),`\n`,_jsx(_components.p,{children:`Among TrueFoundry guardrails, these guardrails use the following services under the hood:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Guardrail`}),_jsx(_components.th,{children:`Underlying Service`}),_jsx(_components.th,{children:`What It Does`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.a,{href:`/docs/ai-gateway/tfy-content-moderation`,children:`Content Moderation`})}),_jsx(_components.td,{children:`OpenAI Moderation`}),_jsx(_components.td,{children:`Detects harmful content across four categories: Hate (including harassment), Self-Harm, Sexual, and Violence (including illicit activity). Each category has a configurable score threshold.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.a,{href:`/docs/ai-gateway/tfy-pii`,children:`PII / PHI Detection`})}),_jsx(_components.td,{children:`Azure AI Language — PII Detection`}),_jsx(_components.td,{children:`Detects and optionally redacts personally identifiable information (PII) and protected health information (PHI) such as names, addresses, SSNs, and medical record numbers.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.a,{href:`/docs/ai-gateway/tfy-prompt-injection`,children:`Prompt Injection`})}),_jsx(_components.td,{children:`Azure AI Content Safety — Prompt Shield`}),_jsx(_components.td,{children:`Detects jailbreak attempts and prompt injection attacks designed to manipulate LLM behavior.`})]})]})]}),`\n`,_jsxs(Warning,{children:[_jsxs(_components.p,{children:[`These three guardrails are `,_jsx(_components.strong,{children:`only available on TrueFoundry SaaS`}),`. They are not available on self-hosted deployments. In case of non-SaaS (self-hosted) deployments, you can use the following alternatives:`]}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Instead of`}),_jsx(_components.th,{children:`Consider Using`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Content Moderation`}),_jsxs(_components.td,{children:[_jsx(_components.a,{href:`/docs/ai-gateway/openai-moderations`,children:`OpenAI Moderations`}),`, `,_jsx(_components.a,{href:`/docs/ai-gateway/bedrock-guardrails`,children:`AWS Bedrock Guardrails`}),`, `,_jsx(_components.a,{href:`/docs/ai-gateway/enkrypt-ai`,children:`Enkrypt AI`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`PII / PHI Detection`}),_jsxs(_components.td,{children:[_jsx(_components.a,{href:`/docs/ai-gateway/azure-pii`,children:`Azure PII`}),` (bring your own key), `,_jsx(_components.a,{href:`/docs/ai-gateway/crowstrike`,children:`CrowdStrike`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Prompt Injection`}),_jsxs(_components.td,{children:[_jsx(_components.a,{href:`/docs/ai-gateway/azure-prompt-shield`,children:`Azure Prompt Shield`}),` (bring your own key), `,_jsx(_components.a,{href:`/docs/ai-gateway/palo-alto-airs`,children:`Palo Alto Prisma AIRS`})]})]})]})]})]}),`\n`,_jsxs(Columns,{cols:3,children:[_jsx(Card,{title:`Secrets Detection`,href:`/docs/ai-gateway/secrets-detection`,icon:`key`,children:_jsx(_components.p,{children:`Catches and redacts credentials like AWS keys, API keys, JWT tokens, and private keys.`})}),_jsx(Card,{title:`Code Safety Linter`,href:`/docs/ai-gateway/code-safety-linter`,icon:`code`,children:_jsx(_components.p,{children:`Flags unsafe code patterns — eval, exec, os.system, subprocess calls, dangerous shell commands.`})}),_jsx(Card,{title:`SQL Sanitizer`,href:`/docs/ai-gateway/sql-sanitizer`,icon:`database`,children:_jsx(_components.p,{children:`Catches risky SQL: DROP, TRUNCATE, DELETE/UPDATE without WHERE, string interpolation.`})}),_jsx(Card,{title:`Regex Pattern Matching`,href:`/docs/ai-gateway/regex-pattern-matching`,icon:`brackets-curly`,children:_jsx(_components.p,{children:`Matches and redacts sensitive patterns (PII, payment cards, credentials) using built-in or custom regex.`})}),_jsx(Card,{title:`Prompt Injection`,href:`/docs/ai-gateway/tfy-prompt-injection`,icon:`shield`,children:_jsx(_components.p,{children:`Detects prompt injection attacks and jailbreak attempts using model-based analysis.`})}),_jsx(Card,{title:`PII Detection`,href:`/docs/ai-gateway/tfy-pii`,icon:`user-shield`,children:_jsx(_components.p,{children:`Finds and redacts personally identifiable information with configurable entity categories.`})}),_jsx(Card,{title:`Content Moderation`,href:`/docs/ai-gateway/tfy-content-moderation`,icon:`ban`,children:_jsx(_components.p,{children:`Blocks harmful content across hate, self-harm, sexual, and violence categories with adjustable thresholds.`})}),_jsx(Card,{title:`Cedar Guardrails`,href:`/docs/ai-gateway/cedar-guardrails`,icon:`shield`,children:_jsx(_components.p,{children:`Fine-grained access control for MCP tools using Cedar policy language with default-deny security.`})}),_jsx(Card,{title:`OPA Guardrails`,href:`/docs/ai-gateway/opa-guardrails`,icon:`shield`,children:_jsx(_components.p,{children:`Fine-grained access control with full policy lifecycle management using Open Policy Agent.`})})]}),`\n`,_jsx(Heading,{level:`3`,id:`external-providers`,children:`External Providers`}),`\n`,_jsx(_components.p,{children:`We also integrate with third-party guardrail providers. Don’t see yours? Reach out — we’re happy to add it.`}),`\n`,_jsxs(Columns,{cols:3,children:[_jsx(Card,{title:`Akto`,href:`/docs/ai-gateway/akto`,children:_jsx(_components.p,{children:`LLM security, prompt injection detection, and policy violation monitoring with native streaming support.`})}),_jsx(Card,{title:`AWS Bedrock Guardrail`,href:`/docs/ai-gateway/bedrock-guardrails`,children:_jsx(_components.p,{children:`AWS Bedrock’s guardrail capabilities for AI models.`})}),_jsx(Card,{title:`Azure Content Safety`,href:`/docs/ai-gateway/azure-content-safety`,children:_jsx(_components.p,{children:`Azure Content Safety for detecting harmful or inappropriate content.`})}),_jsx(Card,{title:`Azure PII`,href:`/docs/ai-gateway/azure-pii`,children:_jsx(_components.p,{children:`Azure’s PII detection service for identifying and redacting personal data.`})}),_jsx(Card,{title:`Azure Prompt Shield`,href:`/docs/ai-gateway/azure-prompt-shield`,children:_jsx(_components.p,{children:`Azure Prompt Shield for blocking prompt injection and jailbreak attempts.`})}),_jsx(Card,{title:`CrowdStrike`,href:`/docs/ai-gateway/crowdstrike`,children:_jsx(_components.p,{children:`API-based security — content moderation, prompt injection detection, toxicity analysis. (Formerly Pangea, acquired by CrowdStrike in 2025.)`})}),_jsx(Card,{title:`Cisco AI Defense`,href:`/docs/ai-gateway/cisco-ai-defense`,children:_jsx(_components.p,{children:`Inspect LLM prompts and responses for security, safety, privacy, and relevance violations.`})}),_jsx(Card,{title:`Enkrypt AI`,href:`/docs/ai-gateway/enkrypt-ai`,children:_jsx(_components.p,{children:`Advanced moderation and compliance — toxicity, bias, and sensitive data detection.`})}),_jsx(Card,{title:`F5 AI Security`,href:`/docs/ai-gateway/f5-calypsoai`,children:_jsx(_components.p,{children:`Scan LLM prompts and responses for prompt injection, jailbreak, PII, and policy violations.`})}),_jsx(Card,{title:`Fiddler`,href:`/docs/ai-gateway/fiddler`,children:_jsx(_components.p,{children:`Fiddler-Safety and Fiddler-Response-Faithfulness guardrails.`})}),_jsx(Card,{title:`Google Model Armor`,href:`/docs/ai-gateway/google-model-armor`,children:_jsx(_components.p,{children:`Google Cloud Model Armor for prompt injection, harmful content, PII, and malicious URI detection.`})}),_jsx(Card,{title:`GraySwan Cygnal`,href:`/docs/ai-gateway/grayswan-cygnal`,children:_jsx(_components.p,{children:`Policy violation detection and content safety monitoring powered by GraySwan Cygnal.`})}),_jsx(Card,{title:`HiddenLayer`,href:`/docs/ai-gateway/hiddenlayer`,children:_jsx(_components.p,{children:`HiddenLayer AIDR for prompt injection, PII, and policy violations with project-policy-driven redaction.`})}),_jsx(Card,{title:`Fireworks`,href:`/docs/ai-gateway/fireworks`,children:_jsx(_components.p,{children:`Fireworks-hosted safety models (gpt-oss-safeguard with your policy, or Llama Guard) classify prompts and responses.`})}),_jsx(Card,{title:`OpenAI Moderations`,href:`/docs/ai-gateway/openai-moderations`,children:_jsx(_components.p,{children:`OpenAI’s moderation API for detecting violence, hate speech, harassment, and other policy violations.`})}),_jsx(Card,{title:`Palo Alto Prisma AIRS`,href:`/docs/ai-gateway/palo-alto-airs`,children:_jsx(_components.p,{children:`Palo Alto AI Risk for content safety and threat detection.`})}),_jsx(Card,{title:`Patronus AI`,href:`/docs/ai-gateway/patronus`,children:_jsx(_components.p,{children:`Hallucination detection, prompt injection, PII leakage, toxicity, and bias evaluators.`})}),_jsx(Card,{title:`Pillar Security`,href:`/docs/ai-gateway/pillar-security`,children:_jsx(_components.p,{children:`Pillar Security guardrails for LLM application protection.`})}),_jsx(Card,{title:`Straiker`,href:`/docs/ai-gateway/straiker`,children:_jsx(_components.p,{children:`Checks LLM prompts and responses against the agent controls you set in the Straiker console.`})}),_jsx(Card,{title:`TrojAI`,href:`/docs/ai-gateway/trojai`,children:_jsx(_components.p,{children:`LLM security testing and runtime guardrails from TrojAI.`})}),_jsx(Card,{title:`Zscaler AI Guard`,href:`/docs/ai-gateway/zscaler-ai-guard`,children:_jsx(_components.p,{children:`Blocks or masks prompts, model responses, and MCP tool calls.`})})]}),`\n`,_jsx(Heading,{level:`3`,id:`custom-guardrail-wrappers`,children:`Custom guardrail wrappers`}),`\n`,_jsxs(Accordion,{title:`External Providers`,id:`external-providers`,children:[_jsx(_components.p,{children:`We also integrate with third-party guardrail providers. Don’t see yours? Reach out — we’re happy to add it.`}),_jsxs(Columns,{cols:3,children:[_jsx(Card,{title:`OpenAI Moderations`,href:`/docs/ai-gateway/openai-moderations`,icon:`https://mintcdn.com/truefoundry/K8S_TzlM7gJ0ObVU/images/logos/openai-logo.png?fit=max\u0026auto=format\u0026n=K8S_TzlM7gJ0ObVU\u0026q=85\u0026s=44b94ca95acd038cce1de8e6059815c9`,\"data-og-width\":`225`,width:`225`,\"data-og-height\":`224`,height:`224`,\"data-path\":`images/logos/openai-logo.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/truefoundry/K8S_TzlM7gJ0ObVU/images/logos/openai-logo.png?w=280\u0026fit=max\u0026auto=format\u0026n=K8S_TzlM7gJ0ObVU\u0026q=85\u0026s=820a79492de31e5f55128989e8907345 280w, https://mintcdn.com/truefoundry/K8S_TzlM7gJ0ObVU/images/logos/openai-logo.png?w=560\u0026fit=max\u0026auto=format\u0026n=K8S_TzlM7gJ0ObVU\u0026q=85\u0026s=12765d3d896acad60a0d4e376eaa0c9b 560w, https://mintcdn.com/truefoundry/K8S_TzlM7gJ0ObVU/images/logos/openai-logo.png?w=840\u0026fit=max\u0026auto=format\u0026n=K8S_TzlM7gJ0ObVU\u0026q=85\u0026s=23abc4a4bb5af42047f8faa8f9328fbc 840w, https://mintcdn.com/truefoundry/K8S_TzlM7gJ0ObVU/images/logos/openai-logo.png?w=1100\u0026fit=max\u0026auto=format\u0026n=K8S_TzlM7gJ0ObVU\u0026q=85\u0026s=d33cacfefd8cfd118e20ffe3e640d275 1100w, https://mintcdn.com/truefoundry/K8S_TzlM7gJ0ObVU/images/logos/openai-logo.png?w=1650\u0026fit=max\u0026auto=format\u0026n=K8S_TzlM7gJ0ObVU\u0026q=85\u0026s=7379d21320f9c0df9f2d7bf6daaa7f5d 1650w, https://mintcdn.com/truefoundry/K8S_TzlM7gJ0ObVU/images/logos/openai-logo.png?w=2500\u0026fit=max\u0026auto=format\u0026n=K8S_TzlM7gJ0ObVU\u0026q=85\u0026s=22802d45a43b20c7015d99f787370a68 2500w`}),_jsx(Card,{title:`AWS Bedrock Guardrail`,href:`/docs/ai-gateway/bedrock-guardrails`,icon:`aws`}),_jsx(Card,{title:`Azure PII`,href:`/docs/ai-gateway/azure-pii`,icon:`https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/azure.svg?fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=ded2b250c899674386ce1e2dd178ae26`,\"data-og-width\":`25`,width:`25`,\"data-og-height\":`24`,height:`24`,\"data-path\":`images/logos/azure.svg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/azure.svg?w=280\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=e2d44b3a9186050fb85291d9e8bc77d7 280w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/azure.svg?w=560\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=44ed06450353c2808768abc6738b4ab0 560w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/azure.svg?w=840\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=68f8561a539f42a8e2921879284b2c01 840w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/azure.svg?w=1100\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=87e1e7a0499711158f4c8e286ab58b24 1100w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/azure.svg?w=1650\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=0b4a3c3a75dd315fe230b06dcfed70d5 1650w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/azure.svg?w=2500\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=69c8133d16e45b2299419c32c3948410 2500w`}),_jsx(Card,{title:`Azure Content Safety`,href:`/docs/ai-gateway/azure-content-safety`,icon:`https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/azure.svg?fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=ded2b250c899674386ce1e2dd178ae26`,\"data-og-width\":`25`,width:`25`,\"data-og-height\":`24`,height:`24`,\"data-path\":`images/logos/azure.svg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/azure.svg?w=280\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=e2d44b3a9186050fb85291d9e8bc77d7 280w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/azure.svg?w=560\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=44ed06450353c2808768abc6738b4ab0 560w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/azure.svg?w=840\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=68f8561a539f42a8e2921879284b2c01 840w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/azure.svg?w=1100\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=87e1e7a0499711158f4c8e286ab58b24 1100w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/azure.svg?w=1650\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=0b4a3c3a75dd315fe230b06dcfed70d5 1650w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/azure.svg?w=2500\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=69c8133d16e45b2299419c32c3948410 2500w`}),_jsx(Card,{title:`Azure Prompt Shield`,href:`/docs/ai-gateway/azure-prompt-shield`,icon:`https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/azure.svg?fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=ded2b250c899674386ce1e2dd178ae26`,\"data-og-width\":`25`,width:`25`,\"data-og-height\":`24`,height:`24`,\"data-path\":`images/logos/azure.svg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/azure.svg?w=280\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=e2d44b3a9186050fb85291d9e8bc77d7 280w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/azure.svg?w=560\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=44ed06450353c2808768abc6738b4ab0 560w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/azure.svg?w=840\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=68f8561a539f42a8e2921879284b2c01 840w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/azure.svg?w=1100\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=87e1e7a0499711158f4c8e286ab58b24 1100w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/azure.svg?w=1650\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=0b4a3c3a75dd315fe230b06dcfed70d5 1650w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/azure.svg?w=2500\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=69c8133d16e45b2299419c32c3948410 2500w`}),_jsx(Card,{title:`Enkrypt AI`,href:`/docs/ai-gateway/enkrypt-ai`,icon:`https://mintcdn.com/truefoundry/K8S_TzlM7gJ0ObVU/images/logos/enkryptai-logo.jpg?fit=max\u0026auto=format\u0026n=K8S_TzlM7gJ0ObVU\u0026q=85\u0026s=2bcca85abdbac3a5299d93965ba837bb`,\"data-og-width\":`200`,width:`200`,\"data-og-height\":`200`,height:`200`,\"data-path\":`images/logos/enkryptai-logo.jpg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/truefoundry/K8S_TzlM7gJ0ObVU/images/logos/enkryptai-logo.jpg?w=280\u0026fit=max\u0026auto=format\u0026n=K8S_TzlM7gJ0ObVU\u0026q=85\u0026s=a5ecc5592b3e9e41f01327b159e5ec14 280w, https://mintcdn.com/truefoundry/K8S_TzlM7gJ0ObVU/images/logos/enkryptai-logo.jpg?w=560\u0026fit=max\u0026auto=format\u0026n=K8S_TzlM7gJ0ObVU\u0026q=85\u0026s=b3cce0e677f5bd5d20ed7a9327997d91 560w, https://mintcdn.com/truefoundry/K8S_TzlM7gJ0ObVU/images/logos/enkryptai-logo.jpg?w=840\u0026fit=max\u0026auto=format\u0026n=K8S_TzlM7gJ0ObVU\u0026q=85\u0026s=16a41effbc837952406a3ff6db5a0082 840w, https://mintcdn.com/truefoundry/K8S_TzlM7gJ0ObVU/images/logos/enkryptai-logo.jpg?w=1100\u0026fit=max\u0026auto=format\u0026n=K8S_TzlM7gJ0ObVU\u0026q=85\u0026s=36c711786811dac1209ce684001209e6 1100w, https://mintcdn.com/truefoundry/K8S_TzlM7gJ0ObVU/images/logos/enkryptai-logo.jpg?w=1650\u0026fit=max\u0026auto=format\u0026n=K8S_TzlM7gJ0ObVU\u0026q=85\u0026s=b247d41131f1882305a87d9bc160b228 1650w, https://mintcdn.com/truefoundry/K8S_TzlM7gJ0ObVU/images/logos/enkryptai-logo.jpg?w=2500\u0026fit=max\u0026auto=format\u0026n=K8S_TzlM7gJ0ObVU\u0026q=85\u0026s=59c370352c2040114b53835d687c7960 2500w`}),_jsx(Card,{title:`Palo Alto Prisma AIRS`,href:`/docs/ai-gateway/palo-alto-airs`,icon:`https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/palo-alto-prisma-airs.svg?fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=64e5f315ca630839962d29e972a73525`,\"data-og-width\":`48`,width:`48`,\"data-og-height\":`48`,height:`48`,\"data-path\":`images/logos/palo-alto-prisma-airs.svg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/palo-alto-prisma-airs.svg?w=280\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=89fd815a780c52cc61ab0dd0210120dd 280w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/palo-alto-prisma-airs.svg?w=560\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=960a18ce2b3936fa4021c4aeffc3e7e0 560w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/palo-alto-prisma-airs.svg?w=840\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=3870170a424cac9551739b2b1e9cb513 840w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/palo-alto-prisma-airs.svg?w=1100\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=f0b681e2acd3ec23dd9e31f71605c35f 1100w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/palo-alto-prisma-airs.svg?w=1650\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=52d9a7af1993a29bae17e64cb07c2174 1650w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/palo-alto-prisma-airs.svg?w=2500\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=650a5a66588bae0fb5878d50ab6d1df7 2500w`}),_jsx(Card,{title:`Fiddler`,href:`/docs/ai-gateway/fiddler`,icon:`https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/fiddler.svg?fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=ca08e95fa0af61b391d9d2c45618f438`,\"data-og-width\":`32`,width:`32`,\"data-og-height\":`32`,height:`32`,\"data-path\":`images/logos/fiddler.svg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/fiddler.svg?w=280\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=ec6d5eaf2baf227ea148e74fe6998bfc 280w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/fiddler.svg?w=560\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=c0dd2b2f332e797d188b3789ea392fc8 560w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/fiddler.svg?w=840\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=6d67f382e4d97850ee1f637585474ac7 840w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/fiddler.svg?w=1100\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=fa3e8ba611e95bf5d382b83777307bce 1100w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/fiddler.svg?w=1650\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=f8aaf05491bc4d9e30cb30380475319b 1650w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/fiddler.svg?w=2500\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=11a2ea9b7fa81178a4700dc047717a78 2500w`}),_jsx(Card,{title:`CrowdStrike`,href:`/docs/ai-gateway/crowdstrike`,icon:`https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/crowdstrike-aidr-logo.svg?fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=6748fe20ee67b20ab9e7e5a908521b40`,\"data-og-width\":`144`,width:`144`,\"data-og-height\":`144`,height:`144`,\"data-path\":`images/logos/crowdstrike-aidr-logo.svg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/crowdstrike-aidr-logo.svg?w=280\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=87ad664306712f8a8867192df1c4b44c 280w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/crowdstrike-aidr-logo.svg?w=560\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=036a4cbd46ac2da96359183e50fb89ad 560w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/crowdstrike-aidr-logo.svg?w=840\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=8bace011dd19345e50849f9711664069 840w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/crowdstrike-aidr-logo.svg?w=1100\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=acf2115d013049de47a6b20b1f84b698 1100w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/crowdstrike-aidr-logo.svg?w=1650\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=2a3364c9ef0ac223bde2516e874655f8 1650w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/crowdstrike-aidr-logo.svg?w=2500\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=8201fbc37cb91347919f18682a9517c7 2500w`}),_jsx(Card,{title:`Cisco AI Defense`,href:`/docs/ai-gateway/cisco-ai-defense`,icon:`https://mintcdn.com/truefoundry/K8S_TzlM7gJ0ObVU/images/logos/cisco_ai_defense_logo.webp?fit=max\u0026auto=format\u0026n=K8S_TzlM7gJ0ObVU\u0026q=85\u0026s=c6b6d4671c8e777dcf346af7d2978d15`,\"data-og-width\":`2400`,width:`2400`,\"data-og-height\":`1271`,height:`1271`,\"data-path\":`images/logos/cisco_ai_defense_logo.webp`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/truefoundry/K8S_TzlM7gJ0ObVU/images/logos/cisco_ai_defense_logo.webp?w=280\u0026fit=max\u0026auto=format\u0026n=K8S_TzlM7gJ0ObVU\u0026q=85\u0026s=be97e1c3a2448a584f86c193b7630212 280w, https://mintcdn.com/truefoundry/K8S_TzlM7gJ0ObVU/images/logos/cisco_ai_defense_logo.webp?w=560\u0026fit=max\u0026auto=format\u0026n=K8S_TzlM7gJ0ObVU\u0026q=85\u0026s=3019b4032256d90858fde38ab75202c0 560w, https://mintcdn.com/truefoundry/K8S_TzlM7gJ0ObVU/images/logos/cisco_ai_defense_logo.webp?w=840\u0026fit=max\u0026auto=format\u0026n=K8S_TzlM7gJ0ObVU\u0026q=85\u0026s=dd9729c03f09fd8cfa8dd80f28632c71 840w, https://mintcdn.com/truefoundry/K8S_TzlM7gJ0ObVU/images/logos/cisco_ai_defense_logo.webp?w=1100\u0026fit=max\u0026auto=format\u0026n=K8S_TzlM7gJ0ObVU\u0026q=85\u0026s=9dd2b4d30c5d80943e0a081a79d49645 1100w, https://mintcdn.com/truefoundry/K8S_TzlM7gJ0ObVU/images/logos/cisco_ai_defense_logo.webp?w=1650\u0026fit=max\u0026auto=format\u0026n=K8S_TzlM7gJ0ObVU\u0026q=85\u0026s=e12b56bcf38da555e2c845084465d0bf 1650w, https://mintcdn.com/truefoundry/K8S_TzlM7gJ0ObVU/images/logos/cisco_ai_defense_logo.webp?w=2500\u0026fit=max\u0026auto=format\u0026n=K8S_TzlM7gJ0ObVU\u0026q=85\u0026s=366ec9ac3b9d8a264a87f67b2755213d 2500w`}),_jsx(Card,{title:`Cato Networks`,href:`/docs/ai-gateway/cato-networks`,icon:`https://assets.production.truefoundry.com/cato.png`}),_jsx(Card,{title:`Zscaler AI Guard`,href:`/docs/ai-gateway/zscaler-ai-guard`,icon:`https://assets.production.truefoundry.com/zscaler.svg`}),_jsx(Card,{title:`F5 AI Security`,href:`/docs/ai-gateway/f5-calypsoai`,icon:`shield`}),_jsx(Card,{title:`Patronus AI`,href:`/docs/ai-gateway/patronus`,icon:`https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/patronus.svg?fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=f946bcda67e1f69de9655cfc656bd0a4`,\"data-og-width\":`256`,width:`256`,\"data-og-height\":`256`,height:`256`,\"data-path\":`images/logos/patronus.svg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/patronus.svg?w=280\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=45ec1e4575960c1dcc0ed87fa767d8af 280w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/patronus.svg?w=560\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=29916e4b64a501e81fead81e50f2c13e 560w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/patronus.svg?w=840\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=de64547a083b7b496ffd5b63880d1a14 840w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/patronus.svg?w=1100\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=95c2c3b94b00d0eab9ee92d071c361cc 1100w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/patronus.svg?w=1650\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=0dafe007c87d88c45ef1a99929800590 1650w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/patronus.svg?w=2500\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=0885190073a790d316006e1fcc77e379 2500w`}),_jsx(Card,{title:`Google Model Armor`,href:`/docs/ai-gateway/google-model-armor`,icon:`https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/google-cloud.svg?fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=ad7cc33cbbea932ee6600c365d08192f`,\"data-og-width\":`31`,width:`31`,\"data-og-height\":`24`,height:`24`,\"data-path\":`images/logos/google-cloud.svg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/google-cloud.svg?w=280\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=7311cdbab72bb23d5ace392a2c485dac 280w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/google-cloud.svg?w=560\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=230208f0a2d127408ade54d55f2a2fc0 560w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/google-cloud.svg?w=840\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=9a9c4435d5aec315f245f6e99eafcfe0 840w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/google-cloud.svg?w=1100\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=f175c3c957a813571f07e60084f72ad6 1100w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/google-cloud.svg?w=1650\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=d094093fb51aa8aee933ef29803c9b48 1650w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/google-cloud.svg?w=2500\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=c3a1ac91b5b0f1d9776d0c3c058fcae7 2500w`}),_jsx(Card,{title:`Gray Swan Cygnal`,href:`/docs/ai-gateway/grayswan-cygnal`,icon:`https://mintcdn.com/truefoundry/XaN85Bg_UlClqkkQ/images/logos/grayswan.png?fit=max\u0026auto=format\u0026n=XaN85Bg_UlClqkkQ\u0026q=85\u0026s=6401405d627292127d4f99070722333c`,\"data-og-width\":`48`,width:`48`,\"data-og-height\":`48`,height:`48`,\"data-path\":`images/logos/grayswan.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/truefoundry/XaN85Bg_UlClqkkQ/images/logos/grayswan.png?w=280\u0026fit=max\u0026auto=format\u0026n=XaN85Bg_UlClqkkQ\u0026q=85\u0026s=85aa38190f6c18ee7306668ee8f6d34b 280w, https://mintcdn.com/truefoundry/XaN85Bg_UlClqkkQ/images/logos/grayswan.png?w=560\u0026fit=max\u0026auto=format\u0026n=XaN85Bg_UlClqkkQ\u0026q=85\u0026s=cada1c1e8f00c959cb6eb00b4e2e165a 560w, https://mintcdn.com/truefoundry/XaN85Bg_UlClqkkQ/images/logos/grayswan.png?w=840\u0026fit=max\u0026auto=format\u0026n=XaN85Bg_UlClqkkQ\u0026q=85\u0026s=48a63755d1c0b7cb5d08750574ac96b7 840w, https://mintcdn.com/truefoundry/XaN85Bg_UlClqkkQ/images/logos/grayswan.png?w=1100\u0026fit=max\u0026auto=format\u0026n=XaN85Bg_UlClqkkQ\u0026q=85\u0026s=f0718629c582a6b8fddf52c7cfbd66d0 1100w, https://mintcdn.com/truefoundry/XaN85Bg_UlClqkkQ/images/logos/grayswan.png?w=1650\u0026fit=max\u0026auto=format\u0026n=XaN85Bg_UlClqkkQ\u0026q=85\u0026s=b9453fe5506b7dcac1e4fe4c7ab3f26f 1650w, https://mintcdn.com/truefoundry/XaN85Bg_UlClqkkQ/images/logos/grayswan.png?w=2500\u0026fit=max\u0026auto=format\u0026n=XaN85Bg_UlClqkkQ\u0026q=85\u0026s=4357057b321a66966902b16e484a29eb 2500w`}),_jsx(Card,{title:`HiddenLayer`,href:`/docs/ai-gateway/hiddenlayer`,icon:`https://mintcdn.com/truefoundry/iJYYtwPGFNv4ig6c/images/hiddenlayerlogo.jpg?fit=max\u0026auto=format\u0026n=iJYYtwPGFNv4ig6c\u0026q=85\u0026s=3462fd6fb74641d488b1d0fa1c7fc42f`,\"data-og-width\":`200`,width:`200`,\"data-og-height\":`200`,height:`200`,\"data-path\":`images/hiddenlayerlogo.jpg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/truefoundry/iJYYtwPGFNv4ig6c/images/hiddenlayerlogo.jpg?w=280\u0026fit=max\u0026auto=format\u0026n=iJYYtwPGFNv4ig6c\u0026q=85\u0026s=a8ae175ebb6b36213167147479cb1f60 280w, https://mintcdn.com/truefoundry/iJYYtwPGFNv4ig6c/images/hiddenlayerlogo.jpg?w=560\u0026fit=max\u0026auto=format\u0026n=iJYYtwPGFNv4ig6c\u0026q=85\u0026s=c7608c44505fde5fc5cd6eaaaaa22050 560w, https://mintcdn.com/truefoundry/iJYYtwPGFNv4ig6c/images/hiddenlayerlogo.jpg?w=840\u0026fit=max\u0026auto=format\u0026n=iJYYtwPGFNv4ig6c\u0026q=85\u0026s=0d0a2f48a63beedcdadd36569e468944 840w, https://mintcdn.com/truefoundry/iJYYtwPGFNv4ig6c/images/hiddenlayerlogo.jpg?w=1100\u0026fit=max\u0026auto=format\u0026n=iJYYtwPGFNv4ig6c\u0026q=85\u0026s=01dbbbae58e35503a12a87c2bac5d429 1100w, https://mintcdn.com/truefoundry/iJYYtwPGFNv4ig6c/images/hiddenlayerlogo.jpg?w=1650\u0026fit=max\u0026auto=format\u0026n=iJYYtwPGFNv4ig6c\u0026q=85\u0026s=fc14cc7e68840afa8f2bee27725bd62c 1650w, https://mintcdn.com/truefoundry/iJYYtwPGFNv4ig6c/images/hiddenlayerlogo.jpg?w=2500\u0026fit=max\u0026auto=format\u0026n=iJYYtwPGFNv4ig6c\u0026q=85\u0026s=974800c04aae1458c3d8d311d5cfea92 2500w`}),_jsx(Card,{title:`Fireworks`,href:`/docs/ai-gateway/fireworks`,icon:`https://assets.production.truefoundry.com/fireworks.svg`}),_jsx(Card,{title:`Akto`,href:`/docs/ai-gateway/akto`,icon:`https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/akto.svg?fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=5cb8a2848026cd6f6cea1501946cbac0`,\"data-og-width\":`126`,width:`126`,\"data-og-height\":`142`,height:`142`,\"data-path\":`images/logos/akto.svg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/akto.svg?w=280\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=fd063120693c66ee5ba322d745fdd4c5 280w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/akto.svg?w=560\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=b6b12794f4ca54de867956774bcf8e84 560w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/akto.svg?w=840\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=3c26ba0668e2b0952a3f0398aac9a68e 840w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/akto.svg?w=1100\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=e6618163ca0cdb65dbbb223e862d4d03 1100w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/akto.svg?w=1650\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=67585c74b552d695610522bef3aeb609 1650w, https://mintcdn.com/truefoundry/LxYFR_SoGzU_yGju/images/logos/akto.svg?w=2500\u0026fit=max\u0026auto=format\u0026n=LxYFR_SoGzU_yGju\u0026q=85\u0026s=1d4791a97b549bc92b83aa5177fa63fc 2500w`}),_jsx(Card,{title:`TrojAI`,href:`/docs/ai-gateway/trojai`,icon:`https://mintcdn.com/truefoundry/F13QmGM2hXnqvjxa/images/logos/TrojAI-logo.svg?fit=max\u0026auto=format\u0026n=F13QmGM2hXnqvjxa\u0026q=85\u0026s=a5e9c14ecd712c436fbc6ab00807f78e`,\"data-og-width\":`293`,width:`293`,\"data-og-height\":`293`,height:`293`,\"data-path\":`images/logos/TrojAI-logo.svg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/truefoundry/F13QmGM2hXnqvjxa/images/logos/TrojAI-logo.svg?w=280\u0026fit=max\u0026auto=format\u0026n=F13QmGM2hXnqvjxa\u0026q=85\u0026s=f6ab6586f962c061d1d4e3e84001504e 280w, https://mintcdn.com/truefoundry/F13QmGM2hXnqvjxa/images/logos/TrojAI-logo.svg?w=560\u0026fit=max\u0026auto=format\u0026n=F13QmGM2hXnqvjxa\u0026q=85\u0026s=725748651e15ca12df3a7aa38f540f61 560w, https://mintcdn.com/truefoundry/F13QmGM2hXnqvjxa/images/logos/TrojAI-logo.svg?w=840\u0026fit=max\u0026auto=format\u0026n=F13QmGM2hXnqvjxa\u0026q=85\u0026s=cfd3631d14d48528a33d615d4337b113 840w, https://mintcdn.com/truefoundry/F13QmGM2hXnqvjxa/images/logos/TrojAI-logo.svg?w=1100\u0026fit=max\u0026auto=format\u0026n=F13QmGM2hXnqvjxa\u0026q=85\u0026s=98548ed31b664a5a9462030afa9c7eea 1100w, https://mintcdn.com/truefoundry/F13QmGM2hXnqvjxa/images/logos/TrojAI-logo.svg?w=1650\u0026fit=max\u0026auto=format\u0026n=F13QmGM2hXnqvjxa\u0026q=85\u0026s=7bfc5a26647e5a89abd8fa5ecdcd6727 1650w, https://mintcdn.com/truefoundry/F13QmGM2hXnqvjxa/images/logos/TrojAI-logo.svg?w=2500\u0026fit=max\u0026auto=format\u0026n=F13QmGM2hXnqvjxa\u0026q=85\u0026s=94dad3b3a85e58e3770adc192c48b4be 2500w`}),_jsx(Card,{title:`Noma Security`,href:`/docs/ai-gateway/noma-security`,icon:`https://mintcdn.com/truefoundry/-ctHRGigJCuJ0066/images/NomaLogo.png?fit=max\u0026auto=format\u0026n=-ctHRGigJCuJ0066\u0026q=85\u0026s=750a37604cff880a0a44492de7c7a5c9`,\"data-og-width\":`325`,width:`325`,\"data-og-height\":`326`,height:`326`,\"data-path\":`images/NomaLogo.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/truefoundry/-ctHRGigJCuJ0066/images/NomaLogo.png?w=280\u0026fit=max\u0026auto=format\u0026n=-ctHRGigJCuJ0066\u0026q=85\u0026s=3f6b5467b2d6b6d08c3b7387eb608ff0 280w, https://mintcdn.com/truefoundry/-ctHRGigJCuJ0066/images/NomaLogo.png?w=560\u0026fit=max\u0026auto=format\u0026n=-ctHRGigJCuJ0066\u0026q=85\u0026s=3490586479f1b1670981510a1558f264 560w, https://mintcdn.com/truefoundry/-ctHRGigJCuJ0066/images/NomaLogo.png?w=840\u0026fit=max\u0026auto=format\u0026n=-ctHRGigJCuJ0066\u0026q=85\u0026s=9fc167b6d6e00cc9d6e141db50a58972 840w, https://mintcdn.com/truefoundry/-ctHRGigJCuJ0066/images/NomaLogo.png?w=1100\u0026fit=max\u0026auto=format\u0026n=-ctHRGigJCuJ0066\u0026q=85\u0026s=32498656dbe2e7ac174d6e8ce5896f20 1100w, https://mintcdn.com/truefoundry/-ctHRGigJCuJ0066/images/NomaLogo.png?w=1650\u0026fit=max\u0026auto=format\u0026n=-ctHRGigJCuJ0066\u0026q=85\u0026s=afe87c26ce9578356277c36f2fc310fa 1650w, https://mintcdn.com/truefoundry/-ctHRGigJCuJ0066/images/NomaLogo.png?w=2500\u0026fit=max\u0026auto=format\u0026n=-ctHRGigJCuJ0066\u0026q=85\u0026s=4504e427ea6a59a7ca25cbc7b553e6ae 2500w`}),_jsx(Card,{title:`Pillar Security`,href:`/docs/ai-gateway/pillar-security`,icon:`https://mintcdn.com/truefoundry/R_V1ebyRBji0TgDT/images/logos/pillar-security.png?fit=max\u0026auto=format\u0026n=R_V1ebyRBji0TgDT\u0026q=85\u0026s=d995b991ddf4dce5044d586fe239cb56`,\"data-og-width\":`256`,width:`256`,\"data-og-height\":`256`,height:`256`,\"data-path\":`images/logos/pillar-security.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/truefoundry/R_V1ebyRBji0TgDT/images/logos/pillar-security.png?w=280\u0026fit=max\u0026auto=format\u0026n=R_V1ebyRBji0TgDT\u0026q=85\u0026s=d55cb8f75f00376ad370bcc7859f5c15 280w, https://mintcdn.com/truefoundry/R_V1ebyRBji0TgDT/images/logos/pillar-security.png?w=560\u0026fit=max\u0026auto=format\u0026n=R_V1ebyRBji0TgDT\u0026q=85\u0026s=02504b0ff71ad447b8ebbe38a99b3523 560w, https://mintcdn.com/truefoundry/R_V1ebyRBji0TgDT/images/logos/pillar-security.png?w=840\u0026fit=max\u0026auto=format\u0026n=R_V1ebyRBji0TgDT\u0026q=85\u0026s=d2bd051bddd1a90d3e8440a2e23c5e9c 840w, https://mintcdn.com/truefoundry/R_V1ebyRBji0TgDT/images/logos/pillar-security.png?w=1100\u0026fit=max\u0026auto=format\u0026n=R_V1ebyRBji0TgDT\u0026q=85\u0026s=ec8424b71f191f20b42f12ab9a6a68af 1100w, https://mintcdn.com/truefoundry/R_V1ebyRBji0TgDT/images/logos/pillar-security.png?w=1650\u0026fit=max\u0026auto=format\u0026n=R_V1ebyRBji0TgDT\u0026q=85\u0026s=e1279a2bc2f4924c609582e26d3838cf 1650w, https://mintcdn.com/truefoundry/R_V1ebyRBji0TgDT/images/logos/pillar-security.png?w=2500\u0026fit=max\u0026auto=format\u0026n=R_V1ebyRBji0TgDT\u0026q=85\u0026s=02cfe76c6018f2b77894be01561377bd 2500w`}),_jsx(Card,{title:`Straiker`,href:`/docs/ai-gateway/straiker`,icon:`https://mintcdn.com/truefoundry/dUBg86MjdRNS0Jma/images/icons/straiker-logo.jpg?fit=max\u0026auto=format\u0026n=dUBg86MjdRNS0Jma\u0026q=85\u0026s=555a97fb2cdeccbbee7b4224e2e9dec8`,\"data-og-width\":`200`,width:`200`,\"data-og-height\":`200`,height:`200`,\"data-path\":`images/icons/straiker-logo.jpg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/truefoundry/dUBg86MjdRNS0Jma/images/icons/straiker-logo.jpg?w=280\u0026fit=max\u0026auto=format\u0026n=dUBg86MjdRNS0Jma\u0026q=85\u0026s=beb90d64af5776ae57455a38c101f04c 280w, https://mintcdn.com/truefoundry/dUBg86MjdRNS0Jma/images/icons/straiker-logo.jpg?w=560\u0026fit=max\u0026auto=format\u0026n=dUBg86MjdRNS0Jma\u0026q=85\u0026s=b9dce39027f95dd8ed8d34fad7672646 560w, https://mintcdn.com/truefoundry/dUBg86MjdRNS0Jma/images/icons/straiker-logo.jpg?w=840\u0026fit=max\u0026auto=format\u0026n=dUBg86MjdRNS0Jma\u0026q=85\u0026s=9e389c392b9be6dd9a4558a8dd4c93c4 840w, https://mintcdn.com/truefoundry/dUBg86MjdRNS0Jma/images/icons/straiker-logo.jpg?w=1100\u0026fit=max\u0026auto=format\u0026n=dUBg86MjdRNS0Jma\u0026q=85\u0026s=61a79a125c654b05041f7aa62df75e78 1100w, https://mintcdn.com/truefoundry/dUBg86MjdRNS0Jma/images/icons/straiker-logo.jpg?w=1650\u0026fit=max\u0026auto=format\u0026n=dUBg86MjdRNS0Jma\u0026q=85\u0026s=6f87b129af81a27f43b5e66167902cce 1650w, https://mintcdn.com/truefoundry/dUBg86MjdRNS0Jma/images/icons/straiker-logo.jpg?w=2500\u0026fit=max\u0026auto=format\u0026n=dUBg86MjdRNS0Jma\u0026q=85\u0026s=d72ba9539f9174f3e2c05906e6281408 2500w`})]})]}),`\n`,_jsxs(Columns,{cols:2,children:[_jsx(Card,{title:`Arthur AI`,href:`/docs/ai-gateway/arthur-ai`,children:_jsx(_components.p,{children:`Arthur GenAI Engine stateless validation for prompt injection, toxicity, and hallucination—validate-only SaaS.`})}),_jsx(Card,{title:`DeepKeep`,href:`/docs/ai-gateway/deepkeep`,children:_jsx(_components.p,{children:`DeepKeep AI Firewall for PII replace, secret-key blocking, prompt-injection defense, and toxic-language filtering.`})}),_jsx(Card,{title:`Guardrails AI`,href:`/docs/ai-gateway/guardrails-ai`,children:_jsx(_components.p,{children:`Hub validators for PII, secrets, toxicity, and profanity—local heuristics in the wrapper pod.`})}),_jsx(Card,{title:`Lasso Security`,href:`/docs/ai-gateway/lasso-security`,children:_jsxs(_components.p,{children:[`Lasso API v3 `,_jsx(_components.code,{children:`classify`}),` and `,_jsx(_components.code,{children:`classifix`}),` for validate and mutate (PII masking)—policy in the Lasso console.`]})}),_jsx(Card,{title:`NVIDIA NeMo`,href:`/docs/ai-gateway/nvidia-nemo`,children:_jsxs(_components.p,{children:[`NeMo `,_jsx(_components.code,{children:`self_check_input`}),` / `,_jsx(_components.code,{children:`self_check_output`}),` for jailbreak and output safety (judge LLM via your gateway).`]})}),_jsx(Card,{title:`Verra`,href:`/docs/ai-gateway/verra`,children:_jsx(_components.p,{children:`Managed AI governance for regulated industries—validate and mutate with PII/secrets redaction and compliant audit trail.`})})]}),`\n`,_jsx(Heading,{level:`3`,id:`bring-your-own-guardrail-/-plugin`,children:`Bring Your Own Guardrail / Plugin`}),`\n`,_jsx(_components.p,{children:`If the built-in and provider integrations don’t cover your use case, you can write your own. Build a custom guardrail with Guardrails.AI, a plain Python function, or any framework you prefer, and plug it into the AI Gateway.`}),`\n`,_jsx(Card,{title:`Custom Guardrails`,href:`/docs/ai-gateway/custom-guardrails`,icon:`plug`,children:_jsxs(_components.p,{children:[`Build and integrate your own guardrail using the template repo, or start from the `,_jsx(_components.a,{href:`/docs/ai-gateway/custom-guardrails#reference-integrations-deployable-wrappers`,children:`reference integrations`}),` above.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`faq`,children:`FAQ`}),`\n`,_jsxs(AccordionGroup,{children:[_jsxs(Accordion,{title:`How do I control which messages guardrails evaluate?`,id:`how-do-i-control-which-messages-guardrails-evaluate`,children:[_jsxs(_components.p,{children:[`By default, guardrails look at `,_jsx(_components.strong,{children:`all messages`}),` in the conversation. Use the `,_jsx(_components.code,{children:`X-TFY-GUARDRAILS-SCOPE`}),` header to narrow that:`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`all`})}),` (default): Checks the full conversation history`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`last`})}),`: Checks only the most recent message`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`positive integer`}),` (e.g. `,_jsx(_components.code,{children:`10`}),`): Checks the last N messages`]}),`\n`]}),_jsxs(_components.p,{children:[`Use a last-N window when a single request can append several new turns at once (for example tool results followed by a user message in an agent loop). Checking only `,_jsx(_components.code,{children:`last`}),` would miss the new-but-not-final messages in that request. Pure one-message-per-request chat can use `,_jsx(_components.code,{children:`last`}),`.`]}),_jsx(_components.p,{children:`MCP tool pre/post guardrails always scan the full tool arguments or result — scope does not apply there. Oversized text is still split into character-limited chunks for providers with per-request limits.`}),_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`12`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"{GATEWAY_BASE_URL}/chat/completions\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer YOUR_API_KEY\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` 'X-TFY-GUARDRAILS: {\"llm_input_guardrails\":[\"my-group/pii-redaction\"]}'`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"X-TFY-GUARDRAILS-SCOPE: 10\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"model\": \"openai/gpt-4o\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"messages\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` {\"role\": \"system\", \"content\": \"You are a helpful assistant.\"},`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` {\"role\": \"user\", \"content\": \"Hello, how can you help me today?\"}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})})]}),_jsxs(Accordion,{title:`What happens if a guardrail service is down?`,id:`what-happens-if-a-guardrail-service-is-down`,children:[_jsx(_components.p,{children:`Depends on the enforcement strategy you picked:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Enforce`}),`: Request gets blocked.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Enforce But Ignore On Error`}),`: Request goes through anyway. This is the safest default — you stay protected when guardrails work, but a provider outage won’t break your app.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Audit`}),`: Request always goes through.`]}),`\n`]})]}),_jsxs(Accordion,{title:`How can I monitor guardrail execution?`,id:`how-can-i-monitor-guardrail-execution`,children:[_jsxs(_components.p,{children:[`Go to `,_jsx(_components.strong,{children:`AI Gateway → Monitor → Request Traces`}),`. You’ll see:`]}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Which guardrails ran on each hook`}),`\n`,_jsx(_components.li,{children:`Whether they passed or failed, and how long they took`}),`\n`,_jsx(_components.li,{children:`What they found (secrets, SQL issues, unsafe patterns, etc.)`}),`\n`,_jsx(_components.li,{children:`What mutations were applied`}),`\n`]}),_jsx(_components.p,{children:`Traces are logged for both successful and blocked requests.`})]}),_jsxs(Accordion,{title:`Do output guardrails work with streaming responses?`,id:`do-output-guardrails-work-with-streaming-responses`,children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`No.`}),` Output guardrails are `,_jsx(_components.strong,{children:`skipped`}),` when the response is streamed (`,_jsx(_components.code,{children:`\"stream\": true`}),`). Output guardrails need the complete response text to evaluate, but streaming sends tokens to the client as they are generated — so there is no full response to check before delivery begins.`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`What you can do:`})}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[`Set `,_jsx(_components.code,{children:`\"stream\": false`})]}),` if you need output guardrails to run. This ensures the AI Gateway receives the full response, evaluates it against your output guardrails, and only then returns it to the client.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Handle checks client-side`}),` — assemble the full streamed response on the client and run your own output validation after the stream completes.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Use input-only guardrails with streaming`}),` — input guardrails always run regardless of streaming mode, so you still get protection on the prompt side.`]}),`\n`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`13`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`13`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:`# Output guardrails WILL run:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`response = client.chat.completions.create(`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` model`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"my-model\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` messages`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=[{`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"role\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"content\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"Hello\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`}],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` stream`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`False`}),_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:` # output guardrails are applied`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:`# Output guardrails will NOT run:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`response = client.chat.completions.create(`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` model`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"my-model\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` messages`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=[{`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"role\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"content\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"Hello\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`}],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` stream`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:` # output guardrails are skipped`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})})]}),_jsxs(Accordion,{title:`Are system prompts evaluated by guardrails?`,id:`are-system-prompts-evaluated-by-guardrails`,children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`No.`}),` System prompts are excluded from guardrails by default — the AI Gateway strips them before sending content to any guardrail, so they are never inspected, blocked, or redacted.`]}),_jsxs(_components.p,{children:[`The one exception is `,_jsx(_components.a,{href:`/docs/ai-gateway/crowdstrike`,children:`CrowdStrike AIDR`}),`, which sees the system prompt for analysis but never modifies it.`]})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"dark","config":{},"pageMetadata":{"title":"AI Gateway Guardrails Overview","sidebarTitle":"Overview","description":"Learn about guardrails for ensuring safety, compliance, and quality in LLM interactions and MCP tool invocations.","href":"/docs/ai-gateway/guardrails-overview"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Why Guardrails?","slug":"why-guardrails","depth":2,"children":[]},{"title":"How a TrueFoundry Guardrail Works","slug":"how-a-truefoundry-guardrail-works","depth":2,"children":[{"title":"Operation Mode","slug":"operation-mode","depth":3,"children":[]},{"title":"Enforcement Strategy","slug":"enforcement-strategy","depth":3,"children":[]}]},{"title":"How TrueFoundry AI Gateway Runs Guardrails","slug":"how-truefoundry-ai-gateway-runs-guardrails","depth":2,"children":[]},{"title":"Latency Impact of Guardrails","slug":"latency-impact-of-guardrails","depth":2,"children":[]},{"title":"How to Apply Guardrails","slug":"how-to-apply-guardrails","depth":2,"children":[]},{"title":"Supported Guardrails","slug":"supported-guardrails","depth":2,"children":[{"title":"TrueFoundry Built-in Guardrails","slug":"truefoundry-built-in-guardrails","depth":3,"children":[]},{"title":"External Providers","slug":"external-providers","depth":3,"children":[]},{"title":"Custom guardrail wrappers","slug":"custom-guardrail-wrappers","depth":3,"children":[]},{"title":"Bring Your Own Guardrail / Plugin","slug":"bring-your-own-guardrail-/-plugin","depth":3,"children":[]}]},{"title":"FAQ","slug":"faq","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/truefoundry/9e0085f7ed271180/scripts.js"],"subdomain":"truefoundry","siteName":"TrueFoundry Docs","title":"AI Gateway Guardrails Overview - TrueFoundry Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-10T14:22:17.992Z","originalFileLocation":"docs/ai-gateway/guardrails-overview.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Learn about guardrails for ensuring safety, compliance, and quality in LLM interactions and MCP tool invocations.\">\u003cmeta data-mint-head name=\"application-name\" content=\"TrueFoundry Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"AI Gateway Guardrails Overview - TrueFoundry Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"TrueFoundry offers an enterprise-grade AI Gateway combining LLM, MCP, and Agent Gateways—empowering businesses to connect, monitor, and govern agentic AI applications across providers from a unified control plane.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"TrueFoundry Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://www.truefoundry.com/docs/ai-gateway/guardrails-overview\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://assets.production.truefoundry.com/logo.svg\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"AI Gateway Guardrails Overview - TrueFoundry Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"TrueFoundry offers an enterprise-grade AI Gateway combining LLM, MCP, and Agent Gateways—empowering businesses to connect, monitor, and govern agentic AI applications across providers from a unified control plane.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://assets.production.truefoundry.com/logo.svg\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"TrueFoundry Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4f46e5\">\u003clink data-mint-head rel=\"canonical\" href=\"https://www.truefoundry.com/docs/ai-gateway/guardrails-overview\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/ai-gateway/guardrails-overview.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://www.truefoundry.com/#organization\",\"name\":\"TrueFoundry Docs\",\"url\":\"https://www.truefoundry.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/truefoundry/e2uUimEwX30qkWxc/logo/light.svg?fit=max\u0026auto=format\u0026n=e2uUimEwX30qkWxc\u0026q=85\u0026s=6068d83664aeda0239bec2422657dd20\"}},{\"@type\":\"WebSite\",\"@id\":\"https://www.truefoundry.com#website\",\"name\":\"TrueFoundry Docs\",\"url\":\"https://www.truefoundry.com\",\"publisher\":{\"@id\":\"https://www.truefoundry.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://www.truefoundry.com/docs/ai-gateway/guardrails-overview#webpage\",\"url\":\"https://www.truefoundry.com/docs/ai-gateway/guardrails-overview\",\"name\":\"AI Gateway Guardrails Overview\",\"description\":\"Learn about guardrails for ensuring safety, compliance, and quality in LLM interactions and MCP tool invocations.\",\"dateModified\":\"2026-11-10T14:22:17.992Z\",\"isPartOf\":{\"@id\":\"https://www.truefoundry.com#website\"},\"breadcrumb\":{\"@id\":\"https://www.truefoundry.com/docs/ai-gateway/guardrails-overview#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://www.truefoundry.com/docs/ai-gateway/guardrails-overview#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"TrueFoundry Docs\",\"item\":\"https://www.truefoundry.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"AI Gateway Guardrails Overview\",\"item\":\"https://www.truefoundry.com/docs/ai-gateway/guardrails-overview\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://www.truefoundry.com/docs/ai-gateway/guardrails-overview#article\",\"headline\":\"AI Gateway Guardrails Overview\",\"name\":\"AI Gateway Guardrails Overview\",\"description\":\"Learn about guardrails for ensuring safety, compliance, and quality in LLM interactions and MCP tool invocations.\",\"url\":\"https://www.truefoundry.com/docs/ai-gateway/guardrails-overview\",\"mainEntityOfPage\":{\"@id\":\"https://www.truefoundry.com/docs/ai-gateway/guardrails-overview#webpage\"},\"image\":\"https://assets.production.truefoundry.com/logo.svg\",\"dateModified\":\"2026-11-10T14:22:17.992Z\",\"publisher\":{\"@id\":\"https://www.truefoundry.com/#organization\"},\"isPartOf\":{\"@id\":\"https://www.truefoundry.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"TrueFoundry Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"TrueFoundry Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/ai-gateway/guardrails-overview.md","siteName":"TrueFoundry Docs","nav":{"global":null,"tabs":[{"tab":"AI Gateway","groups":[{"group":"Get Started","pages":[{"title":"Introduction to AI Gateway","sidebarTitle":"AI Gateway Overview","href":"/docs/ai-gateway/intro-to-llm-gateway"},{"title":"Quick Start Guide: Setup \u0026 Integration","sidebarTitle":"Quick Start","href":"/docs/ai-gateway/quick-start"}]},{"group":"LLM Gateway","pages":[{"group":"Integrate Models","pages":[{"title":"TrueFoundry Managed Models","sidebarTitle":"TrueFoundry Managed Models","href":"/docs/ai-gateway/truefoundry-managed"},{"title":"Providers","sidebarTitle":"Supported Providers","href":"/docs/ai-gateway/supported-providers"},{"title":"OpenAI","sidebarTitle":"OpenAI Models","href":"/docs/ai-gateway/openai"},{"title":"Anthropic","sidebarTitle":"Anthropic","href":"/docs/ai-gateway/anthropic"},{"title":"AWS Claude Platform","sidebarTitle":"AWS Claude Platform","href":"/docs/ai-gateway/aws-claude-platform"},{"title":"AWS Bedrock","sidebarTitle":"AWS Bedrock","href":"/docs/ai-gateway/aws-bedrock"},{"title":"AWS Bedrock Mantle","sidebarTitle":"AWS Bedrock Mantle","href":"/docs/ai-gateway/aws-bedrock-mantle"},{"title":"AWS Sagemaker","sidebarTitle":"AWS Sagemaker","href":"/docs/ai-gateway/aws-sagemaker"},{"title":"Google Vertex","sidebarTitle":"Google Vertex AI","href":"/docs/ai-gateway/google-vertex"},{"title":"Google Gemini","sidebarTitle":"Google Gemini","href":"/docs/ai-gateway/google-gemini"},{"group":"Azure Models","pages":[{"title":"Choosing an Azure model integration","sidebarTitle":"Overview","href":"/docs/ai-gateway/azure-models-guide"},{"title":"Microsoft Foundry","sidebarTitle":"Microsoft Foundry","tag":"NEW","href":"/docs/ai-gateway/microsoft-foundry"},{"title":"Migrate to Microsoft Foundry","sidebarTitle":"Migrate to Microsoft Foundry","href":"/docs/ai-gateway/migrate-to-microsoft-foundry"},{"title":"Azure OpenAI","sidebarTitle":"Azure OpenAI","tag":"LEGACY","href":"/docs/ai-gateway/azure-openai"},{"title":"Azure Foundry","sidebarTitle":"Azure AI Foundry","tag":"LEGACY","href":"/docs/ai-gateway/azure-ai-foundry"},{"group":"Authentication","pages":[{"title":"Azure Entra ID Certificate Based Authentication","sidebarTitle":"Azure Certificate Auth","href":"/docs/ai-gateway/azure-entra-certificate-auth"},{"title":"Azure Entra ID Client Secret Based Authentication","sidebarTitle":"Azure Client Secret Auth","href":"/docs/ai-gateway/azure-entra-client-secret-auth"},{"title":"Azure Workload Identity Federation Authentication","sidebarTitle":"Azure Workload Identity","href":"/docs/ai-gateway/azure-entra-wif-auth"}]}]},{"title":"Databricks","sidebarTitle":"Databricks Models","href":"/docs/ai-gateway/databricks-models"},{"title":"Cohere","sidebarTitle":"Cohere Models","href":"/docs/ai-gateway/cohere"},{"title":"AI21","sidebarTitle":"AI21","href":"/docs/ai-gateway/ai21"},{"title":"Deepinfra","sidebarTitle":"Deepinfra Models","href":"/docs/ai-gateway/deepinfra"},{"title":"Groq","sidebarTitle":"Groq Models","href":"/docs/ai-gateway/groq"},{"title":"ElevenLabs","sidebarTitle":"ElevenLabs","href":"/docs/ai-gateway/elevenlabs"},{"title":"Deepgram","sidebarTitle":"Deepgram","href":"/docs/ai-gateway/deepgram"},{"title":"Cartesia","sidebarTitle":"Cartesia","href":"/docs/ai-gateway/cartesia"},{"title":"Smallest AI","sidebarTitle":"Smallest AI","href":"/docs/ai-gateway/smallest-ai"},{"title":"Mistral AI","sidebarTitle":"Mistral AI Models","href":"/docs/ai-gateway/mistral"},{"title":"Cloudera","sidebarTitle":"Cloudera Models","href":"/docs/ai-gateway/cloudera"},{"title":"OpenRouter","sidebarTitle":"OpenRouter","href":"/docs/ai-gateway/openrouter"},{"title":"Perplexity AI","sidebarTitle":"Perplexity Models","href":"/docs/ai-gateway/perplexity-ai"},{"title":"Together AI","sidebarTitle":"Together AI","href":"/docs/ai-gateway/together-ai"},{"title":"xAI","sidebarTitle":"xAI Models","href":"/docs/ai-gateway/xai"},{"title":"SambaNova","sidebarTitle":"SambaNova","href":"/docs/ai-gateway/sambanova"},{"title":"Cerebras","sidebarTitle":"Cerebras","href":"/docs/ai-gateway/cerebras"},{"title":"Wafer","sidebarTitle":"Wafer","href":"/docs/ai-gateway/wafer"},{"title":"Fireworks AI Model Provider for TrueFoundry AI Gateway","sidebarTitle":"Fireworks AI","href":"/docs/ai-gateway/fireworks-ai"},{"title":"Snowflake Cortex","sidebarTitle":"Snowflake Cortex","href":"/docs/ai-gateway/snowflake-cortex"},{"title":"Baseten","sidebarTitle":"Baseten","href":"/docs/ai-gateway/baseten"},{"title":"TypeSafe","sidebarTitle":"TypeSafe","href":"/docs/ai-gateway/typesafe"},{"group":"Custom Endpoints","root":{"title":"Custom Endpoints","sidebarTitle":"Custom Endpoints","href":"/docs/ai-gateway/custom-endpoints"},"expanded":false,"pages":[{"group":"Examples","pages":[{"title":"CoreWeave","sidebarTitle":"CoreWeave Models","href":"/docs/ai-gateway/coreweave-models"},{"title":"PipeShift","sidebarTitle":"PipeShift","href":"/docs/ai-gateway/pipeshift"},{"title":"SiliconFlow","sidebarTitle":"SiliconFlow","href":"/docs/ai-gateway/siliconflow"},{"title":"io.net","sidebarTitle":"io.net","href":"/docs/ai-gateway/io-net"},{"title":"Resemble AI","sidebarTitle":"Resemble AI","href":"/docs/ai-gateway/resemble-ai"},{"title":"Ringg.AI","sidebarTitle":"Ringg.AI","href":"/docs/ai-gateway/ringg-ai"},{"title":"Crusoe","sidebarTitle":"Crusoe","href":"/docs/ai-gateway/crusoe"},{"title":"Jev (TypeSafe)","sidebarTitle":"Jev","href":"/docs/ai-gateway/jev"},{"title":"SCX.ai","sidebarTitle":"SCX.ai","href":"/docs/ai-gateway/scx-ai"}]}]},{"title":"Self-Hosted Models","sidebarTitle":"Self-Hosted Models","href":"/docs/ai-gateway/self-hosted-models"}]},{"group":"Supported APIs","pages":[{"group":"Chat Completions","root":{"title":"Chat Completions API (/chat/completions)","sidebarTitle":"Overview","href":"/docs/ai-gateway/chat-completions-overview"},"expanded":false,"directory":"accordion","pages":[{"title":"Chat Completions API (/chat/completions)","sidebarTitle":"Overview","href":"/docs/ai-gateway/chat-completions-overview"},{"title":"Chat Completions: Multimodal","sidebarTitle":"Multimodal","href":"/docs/ai-gateway/chat-completions-multimodal"},{"title":"Chat Completions: Tools \u0026 Signatures","sidebarTitle":"Tools","href":"/docs/ai-gateway/chat-completions-tools"},{"title":"Chat Completions: Structured Outputs","sidebarTitle":"Structured Outputs","href":"/docs/ai-gateway/chat-completions-structured-outputs"},{"title":"Chat Completions: Caching \u0026 Reasoning","sidebarTitle":"Caching \u0026 Reasoning","href":"/docs/ai-gateway/chat-completions-advanced"},{"title":"Chat Completions: Extended Thinking","sidebarTitle":"Extended Thinking","href":"/docs/ai-gateway/chat-completions-extended-thinking"}]},{"title":"Embeddings API (/embeddings)","sidebarTitle":"Embeddings","href":"/docs/ai-gateway/embed"},{"title":"Batch API (/batches)","sidebarTitle":"Batch Predictions","href":"/docs/ai-gateway/batch-predictions-with-truefoundry-llm-gateway"},{"title":"Finetune API (/fine_tuning)","sidebarTitle":"Finetuning","href":"/docs/ai-gateway/finetune"},{"title":"Responses API (/responses)","sidebarTitle":"Responses API","href":"/docs/ai-gateway/responses-api"},{"title":"Image Generation API (/images/generations)","sidebarTitle":"Image Generation","href":"/docs/ai-gateway/image-generation"},{"title":"Image Edit API (/images/edits)","sidebarTitle":"Image Edit","href":"/docs/ai-gateway/image-edit"},{"title":"Image Variation API (/images/variations)","sidebarTitle":"Image Variation","href":"/docs/ai-gateway/image-variation"},{"title":"Video Generation API (/videos-proxy)","sidebarTitle":"Video Generation","href":"/docs/ai-gateway/video-generation"},{"title":"Text to Speech API","sidebarTitle":"Text to Speech","href":"/docs/ai-gateway/text-to-speech"},{"title":"Audio Translation API","sidebarTitle":"Audio Translation","href":"/docs/ai-gateway/audio-translation"},{"title":"Speech to Text API","sidebarTitle":"Speech to Text","href":"/docs/ai-gateway/audio-transcription"},{"group":"Live / Realtime API","root":{"title":"Live / Realtime API (/live)","sidebarTitle":"Overview","href":"/docs/ai-gateway/live-api"},"expanded":false,"directory":"accordion","pages":[{"title":"Live / Realtime API (/live)","sidebarTitle":"Overview","href":"/docs/ai-gateway/live-api"},{"title":"Live API: Code Snippets","sidebarTitle":"Code Snippets","href":"/docs/ai-gateway/live-api-code-snippets"},{"title":"Live API: Tool Calling","sidebarTitle":"Tool Calling","href":"/docs/ai-gateway/live-api-tool-calling"},{"title":"OpenAI Realtime with WebRTC","sidebarTitle":"WebRTC (OpenAI)","href":"/docs/ai-gateway/live-api-webrtc"},{"title":"Amazon Nova Sonic (Bedrock)","sidebarTitle":"Nova Sonic (Bedrock)","href":"/docs/ai-gateway/live-api-nova-sonic"}]},{"title":"Files API (/files)","sidebarTitle":"Files API","href":"/docs/ai-gateway/file-endpoints"},{"title":"Rerank API (/rerank)","sidebarTitle":"Rerank API","href":"/docs/ai-gateway/rerank"},{"title":"Moderation API (/moderations)","sidebarTitle":"Moderation API","href":"/docs/ai-gateway/moderation"},{"title":"Compaction API (/responses/compact)","sidebarTitle":"Compaction API","href":"/docs/ai-gateway/compaction"},{"title":"Messages API (/messages)","sidebarTitle":"Messages API","href":"/docs/ai-gateway/messages-overview"},{"title":"Decisions API (/v1/decisions, /v1/systemone)","sidebarTitle":"Decisions API","href":"/docs/ai-gateway/decisions"},{"title":"Proxy API (/proxy)","sidebarTitle":"Proxy API","href":"/docs/ai-gateway/proxy-api"}]},{"group":"Making LLM Requests","pages":[{"title":"Making Your First Request","sidebarTitle":"Making Your First Request","href":"/docs/ai-gateway/making-llm-requests-via-gateway"},{"title":"Authentication","sidebarTitle":"Authentication","href":"/docs/ai-gateway/authentication"},{"title":"Custom Metadata and Headers","sidebarTitle":"Metadata \u0026 Headers","href":"/docs/ai-gateway/request-headers"},{"title":"Native SDK Support","sidebarTitle":"Native SDK Support","href":"/docs/ai-gateway/native-sdk-support"},{"title":"Model Discovery","sidebarTitle":"Model Discovery","href":"/docs/ai-gateway/model-discovery"}]},{"group":"Set Up Your IDEs","pages":[{"title":"Set Up Your IDEs","sidebarTitle":"Overview","href":"/docs/ai-gateway/personal-setup"},{"title":"Claude Code","href":"/docs/ai-gateway/ide-setup/claude-code"},{"title":"Codex (CLI \u0026 Desktop)","href":"/docs/ai-gateway/ide-setup/codex"},{"title":"Claude Desktop","href":"/docs/ai-gateway/ide-setup/claude-desktop"},{"title":"Cursor","href":"/docs/ai-gateway/ide-setup/cursor"},{"title":"VS Code","href":"/docs/ai-gateway/ide-setup/vscode"},{"title":"GitHub Copilot CLI","href":"/docs/ai-gateway/ide-setup/copilot-cli"},{"title":"Gemini CLI","href":"/docs/ai-gateway/ide-setup/gemini-cli"},{"title":"OpenCode","href":"/docs/ai-gateway/ide-setup/opencode"},{"title":"Goose","href":"/docs/ai-gateway/ide-setup/goose"},{"title":"Qwen Code","href":"/docs/ai-gateway/ide-setup/qwen-code"},{"title":"Grok Build","href":"/docs/ai-gateway/ide-setup/grok-build"},{"title":"Pi","href":"/docs/ai-gateway/ide-setup/pi"}]},{"group":"Deploy with MDM","pages":[{"title":"Deploy coding agents with MDM","sidebarTitle":"Overview","href":"/docs/ai-gateway/mdm-setup"},{"title":"Claude Code and Claude Desktop with MDM","sidebarTitle":"Claude Code \u0026 Desktop","href":"/docs/ai-gateway/mdm/claude"},{"title":"Codex with MDM","sidebarTitle":"Codex","href":"/docs/ai-gateway/mdm/codex"},{"title":"Set up OIDC sign-in for MDM","sidebarTitle":"OIDC sign-in","href":"/docs/ai-gateway/mdm/oidc"},{"title":"MDM configuration reference","sidebarTitle":"Configuration reference","href":"/docs/ai-gateway/mdm/configuration-reference"}]},{"title":"TrueFoundry AI Gateway Playground","sidebarTitle":"AI Gateway Playground","href":"/docs/ai-gateway/playground-overview"},{"group":"Virtual Models","pages":[{"title":"Virtual Models","sidebarTitle":"Overview","href":"/docs/ai-gateway/virtual-model"},{"title":"Create a Virtual Model","sidebarTitle":"Create a Virtual Model","href":"/docs/ai-gateway/virtual-model-advanced"},{"title":"Auto Routing","sidebarTitle":"Auto Routing","href":"/docs/ai-gateway/auto-routing"}]},{"title":"Access Control","sidebarTitle":"Access Control","href":"/docs/ai-gateway/gateway-access-control"},{"group":"Policies","pages":[{"title":"Rate Limiting","sidebarTitle":"Rate Limiting","href":"/docs/ai-gateway/ratelimiting-v2"},{"title":"Rate Limiting (V1, deprecated)","sidebarTitle":"Rate Limiting (V1)","hidden":true,"href":"/docs/ai-gateway/ratelimiting"},{"title":"Budget Limiting","sidebarTitle":"Budget Limiting","href":"/docs/ai-gateway/budget-limiting-v2"},{"title":"Budget Usage Recovery","sidebarTitle":"Budget Usage Recovery","href":"/docs/ai-gateway/budget-usage-recovery"},{"title":"Budget Limiting (V1, deprecated)","sidebarTitle":"Budget Limiting (V1)","hidden":true,"href":"/docs/ai-gateway/budgetlimiting"},{"title":"Logging Configuration","sidebarTitle":"Logging Config","href":"/docs/ai-gateway/logging-config"}]},{"title":"Caching (Exact and Semantic)","sidebarTitle":"Caching (Exact and Semantic)","href":"/docs/ai-gateway/caching"},{"title":"Cost Tracking","sidebarTitle":"Cost Tracking","href":"/docs/ai-gateway/cost-tracking"},{"title":"Cost Savings","sidebarTitle":"Cost Savings","href":"/docs/ai-gateway/cost-savings"},{"group":"Extras","pages":[{"title":"Session Management","sidebarTitle":"Session Management","href":"/docs/ai-gateway/session-management"},{"title":"Log Feedback on Requests","sidebarTitle":"Log Feedback","href":"/docs/ai-gateway/feedback-for-traces"},{"title":"First Chunk Gate for Streaming","sidebarTitle":"First Chunk Gate","href":"/docs/ai-gateway/first-chunk-gate"},{"title":"Anthropic Stream Overload Fallback","sidebarTitle":"Anthropic Stream Fallback","href":"/docs/ai-gateway/anthropic-stream-overload-fallback"}]}]},{"group":"MCP Registry and Gateway","pages":[{"title":"TrueFoundry MCP Gateway","sidebarTitle":"Overview","href":"/docs/ai-gateway/mcp/mcp-overview"},{"title":"MCP Server: Getting Started","sidebarTitle":"Getting Started","href":"/docs/ai-gateway/mcp/mcp-server-getting-started"},{"title":"MCP Protocol Support","sidebarTitle":"Protocol Support","href":"/docs/ai-gateway/mcp/mcp-protocol-support"},{"group":"Authentication and Security","root":{"title":"Authentication and Security","sidebarTitle":"Authentication and Security","href":"/docs/ai-gateway/mcp/mcp-gateway-auth-security"},"pages":[{"title":"Authentication and Security","sidebarTitle":"Authentication and Security","href":"/docs/ai-gateway/mcp/mcp-gateway-auth-security"},{"title":"Auth Overrides","sidebarTitle":"Auth Overrides","href":"/docs/ai-gateway/mcp/mcp-server-auth-overrides"},{"group":"Outbound auth integrations","pages":[{"title":"Okta app setup","sidebarTitle":"Okta App Setup","href":"/docs/ai-gateway/mcp/okta-app-setup"},{"title":"Microsoft Entra app setup","sidebarTitle":"Microsoft Entra App Setup","href":"/docs/ai-gateway/mcp/entra-app-setup"},{"title":"Microsoft Entra On-Behalf-Of (OBO) for MCP","sidebarTitle":"Microsoft Entra OBO App Setup","href":"/docs/ai-gateway/mcp/mcp-server-oauth-azure-obo"},{"title":"Register an AWS Bedrock AgentCore MCP Server","sidebarTitle":"AgentCore (AWS SigV4)","href":"/docs/ai-gateway/mcp/mcp-server-agentcore-sigv4"}]}]},{"title":"MCP Troubleshooting Guide","sidebarTitle":"Troubleshooting Guide","href":"/docs/ai-gateway/mcp/mcp-troubleshooting-guide"},{"title":"MCP Tool Approvals","sidebarTitle":"Tool Approvals","href":"/docs/ai-gateway/mcp/mcp-tool-approval"},{"title":"MCP Tool Management","sidebarTitle":"Tool Management","href":"/docs/ai-gateway/mcp/mcp-tool-management"},{"title":"Connect MCP Servers from Your IDE","sidebarTitle":"Connect MCP Servers from Your IDE","href":"/docs/ai-gateway/mcp/connect-mcp-from-ide"},{"title":"TrueFoundry Managed MCPs","sidebarTitle":"TrueFoundry Managed MCPs","href":"/docs/ai-gateway/mcp/tfy-managed-mcp-server"},{"title":"Virtual MCP Server","sidebarTitle":"Virtual MCP Server","href":"/docs/ai-gateway/mcp/virtual-mcp-server"},{"title":"OpenAPI to MCP Server","sidebarTitle":"OpenAPI to MCP Server","href":"/docs/ai-gateway/mcp/openapi-mcp-server"},{"title":"Hosted Stdio-based MCP Server","sidebarTitle":"Hosted Stdio-based MCP Server","href":"/docs/ai-gateway/mcp/stdio-mcp-server"},{"group":"MCP Server Guides","pages":[{"group":"Creating MCP Servers","pages":[{"title":"Create a Basic Calculator MCP Server","sidebarTitle":"Basic Calculator MCP Server","href":"/docs/ai-gateway/mcp/create-calculator-mcp-server"},{"title":"Add Okta OAuth to a Calculator MCP Server","sidebarTitle":"Okta OAuth MCP server","href":"/docs/ai-gateway/mcp/mcp-server-oauth-okta"},{"title":"Create an OAuth MCP Server with Azure Entra ID","sidebarTitle":"Azure Entra ID OAuth MCP Server","href":"/docs/ai-gateway/mcp/mcp-server-oauth-azure"}]}]}]},{"group":"Skills Registry","pages":[{"title":"AI Gateway Skills Registry","sidebarTitle":"Overview","href":"/docs/ai-gateway/skills/skills-registry"},{"title":"Create, Manage, and Use Skills","sidebarTitle":"Create, Manage and Use Skills","href":"/docs/ai-gateway/skills/getting-started"}]},{"group":"Prompt Registry","pages":[{"title":"Prompt Management","sidebarTitle":"Create, Manage and Use Prompts","description":"Create, save, version, and use prompts in TrueFoundry's AI Gateway.","href":"/docs/ai-gateway/prompt-management"}]},{"group":"Guardrails and Security","pages":[{"title":"AI Gateway Guardrails Overview","sidebarTitle":"Overview","href":"/docs/ai-gateway/guardrails-overview"},{"title":"AI Gateway Guardrails: Quick Start","sidebarTitle":"Getting Started","description":"Learn how to set up and implement guardrails to ensure safe and compliant LLM interactions and MCP tool invocations.","href":"/docs/ai-gateway/guardrails-getting-started"},{"title":"Configure Guardrail Policies","sidebarTitle":"Configure Guardrail Policies","href":"/docs/ai-gateway/guardrails-configuration"},{"group":"TrueFoundry Guardrails","root":{"title":"TrueFoundry Guardrails","sidebarTitle":"Overview","href":"/docs/ai-gateway/truefoundry-guardrails"},"pages":[{"title":"TrueFoundry Guardrails","sidebarTitle":"Overview","href":"/docs/ai-gateway/truefoundry-guardrails"},{"title":"Secrets Detection Guardrail","sidebarTitle":"Secrets Detection","href":"/docs/ai-gateway/secrets-detection"},{"title":"Code Safety Linter Guardrail","sidebarTitle":"Code Safety Linter","href":"/docs/ai-gateway/code-safety-linter"},{"title":"SQL Sanitizer Guardrail","sidebarTitle":"SQL Sanitizer","href":"/docs/ai-gateway/sql-sanitizer"},{"title":"Regex Pattern Match Guardrail","sidebarTitle":"Regex Pattern Match","href":"/docs/ai-gateway/regex-pattern-matching"},{"title":"Prompt Injection Guardrail","sidebarTitle":"Prompt Injection","href":"/docs/ai-gateway/tfy-prompt-injection"},{"title":"PII/PHI Detection Guardrail","sidebarTitle":"PII/PHI","href":"/docs/ai-gateway/tfy-pii"},{"title":"Content Moderation Guardrail","sidebarTitle":"Content Moderation","href":"/docs/ai-gateway/tfy-content-moderation"},{"title":"Metadata Validation Guardrail","sidebarTitle":"Metadata Validation","href":"/docs/ai-gateway/metadata-validation"},{"title":"Cedar Guardrails","sidebarTitle":"Cedar Guardrails","href":"/docs/ai-gateway/cedar-guardrails"},{"title":"OPA Guardrails","sidebarTitle":"OPA Guardrails","href":"/docs/ai-gateway/opa-guardrails"}]},{"group":"External Providers","pages":[{"title":"Akto Integration","sidebarTitle":"Akto","href":"/docs/ai-gateway/akto"},{"title":"Arthur AI","sidebarTitle":"Arthur AI","href":"/docs/ai-gateway/arthur-ai"},{"title":"AWS Bedrock Guardrail Integration","sidebarTitle":"AWS Bedrock Guardrail","href":"/docs/ai-gateway/bedrock-guardrails"},{"title":"Azure Content Safety Guardrail Integration","sidebarTitle":"Azure Content Safety","href":"/docs/ai-gateway/azure-content-safety"},{"title":"Azure PII Guardrail Integration","sidebarTitle":"Azure PII","href":"/docs/ai-gateway/azure-pii"},{"title":"Azure Prompt Shield Guardrail Integration","sidebarTitle":"Azure Prompt Shield","href":"/docs/ai-gateway/azure-prompt-shield"},{"title":"CrowdStrike AIDR Integration","sidebarTitle":"CrowdStrike AIDR","href":"/docs/ai-gateway/crowdstrike"},{"title":"Cato Networks","sidebarTitle":"Cato Networks","href":"/docs/ai-gateway/cato-networks"},{"title":"Cisco AI Defense Integration","sidebarTitle":"Cisco AI Defense","href":"/docs/ai-gateway/cisco-ai-defense"},{"title":"DeepKeep AI Firewall","sidebarTitle":"DeepKeep","href":"/docs/ai-gateway/deepkeep"},{"title":"Enkrypt AI Guardrail Integration","sidebarTitle":"Enkrypt AI","href":"/docs/ai-gateway/enkrypt-ai"},{"title":"F5 AI Security (CalypsoAI) Integration","sidebarTitle":"F5 AI Security","href":"/docs/ai-gateway/f5-calypsoai"},{"title":"Fiddler Integration","sidebarTitle":"Fiddler","href":"/docs/ai-gateway/fiddler"},{"title":"Fireworks Safety Model Guardrail for TrueFoundry AI Gateway","sidebarTitle":"Fireworks","href":"/docs/ai-gateway/fireworks"},{"title":"Google Model Armor Guardrail Integration","sidebarTitle":"Google Model Armor","href":"/docs/ai-gateway/google-model-armor"},{"title":"Gray Swan Cygnal","sidebarTitle":"Gray Swan Cygnal","href":"/docs/ai-gateway/grayswan-cygnal"},{"title":"Guardrails AI Integration","sidebarTitle":"Guardrails AI","href":"/docs/ai-gateway/guardrails-ai"},{"title":"HiddenLayer Integration","sidebarTitle":"HiddenLayer","href":"/docs/ai-gateway/hiddenlayer"},{"title":"CoreWeave Weave Guardrails Integration","sidebarTitle":"CoreWeave Guardrails","href":"/docs/ai-gateway/coreweave-weave-guardrails"},{"title":"Lasso Security","sidebarTitle":"Lasso Security","href":"/docs/ai-gateway/lasso-security"},{"title":"Noma Security","sidebarTitle":"Noma Security","href":"/docs/ai-gateway/noma-security"},{"title":"NVIDIA NeMo Guardrails Integration","sidebarTitle":"NVIDIA NeMo","href":"/docs/ai-gateway/nvidia-nemo"},{"title":"OpenAI Moderation Integration","sidebarTitle":"OpenAI Moderation","href":"/docs/ai-gateway/openai-moderations"},{"title":"Onyx Security","sidebarTitle":"Onyx Security","href":"/docs/ai-gateway/onyx-security"},{"title":"Palo Alto Prisma AIRS Integration","sidebarTitle":"Palo Alto Prisma AIRS","href":"/docs/ai-gateway/palo-alto-airs"},{"title":"Patronus AI Integration","sidebarTitle":"Patronus AI","href":"/docs/ai-gateway/patronus"},{"title":"Pillar Security Integration","sidebarTitle":"Pillar Security","href":"/docs/ai-gateway/pillar-security"},{"title":"Straiker","sidebarTitle":"Straiker","href":"/docs/ai-gateway/straiker"},{"title":"TrojAI DEFEND Integration","sidebarTitle":"TrojAI","href":"/docs/ai-gateway/trojai"},{"title":"Verra","sidebarTitle":"Verra","href":"/docs/ai-gateway/verra"},{"title":"Zscaler AI Guard guardrail for prompts and responses","sidebarTitle":"Zscaler AI Guard","href":"/docs/ai-gateway/zscaler-ai-guard"}]},{"title":"Custom Guardrail/Plugins Configuration","sidebarTitle":"Bring your own Guardrail / Plugin","href":"/docs/ai-gateway/custom-guardrails"}]},{"group":"Observability","pages":[{"title":"Metrics Dashboard","sidebarTitle":"Metrics Dashboard","href":"/docs/ai-gateway/analytics"},{"title":"Request Logging","sidebarTitle":"Request Logging","href":"/docs/ai-gateway/request-logging"},{"title":"Configure Data Access","sidebarTitle":"Configure Data Access","href":"/docs/ai-gateway/data-access"},{"title":"Configure Data Routing","sidebarTitle":"Configure Data Routing","href":"/docs/ai-gateway/data-routing"},{"group":"Export Logs and Metrics","pages":[{"title":"Export OpenTelemetry Data","sidebarTitle":"Export via OpenTelemetry","href":"/docs/ai-gateway/export-opentelemetry-data"},{"title":"Prometheus Grafana Integration","sidebarTitle":"Prometheus \u0026 Grafana","href":"/docs/ai-gateway/prometheus-grafana-integration"}]},{"group":"API Access to Metrics","expanded":false,"pages":[{"title":"Model Metrics","sidebarTitle":"Model Metrics","href":"/docs/ai-gateway/fetch-model-metrics"},{"title":"MCP Metrics","sidebarTitle":"MCP Metrics","href":"/docs/ai-gateway/fetch-mcp-metrics"},{"title":"Guardrail Metrics","sidebarTitle":"Guardrail Metrics","href":"/docs/ai-gateway/fetch-guardrail-metrics"},{"title":"Cache Metrics","sidebarTitle":"Cache Metrics","href":"/docs/ai-gateway/fetch-cache-metrics"},{"title":"Routing Metrics","sidebarTitle":"Routing Metrics","href":"/docs/ai-gateway/fetch-routing-metrics"},{"title":"Agent Metrics","sidebarTitle":"Agent Metrics","href":"/docs/ai-gateway/fetch-agent-metrics"}]},{"group":"API Access to Logs","root":{"title":"API Access to Logs","sidebarTitle":"Overview","href":"/docs/ai-gateway/fetch-request-logs"},"expanded":false,"directory":"accordion","pages":[{"title":"API Access to Logs","sidebarTitle":"Overview","href":"/docs/ai-gateway/fetch-request-logs"},{"title":"Request Logs: Trace Inspection","sidebarTitle":"Trace Inspection","href":"/docs/ai-gateway/fetch-request-logs-trace-inspection"},{"title":"Request Logs: Filtering","sidebarTitle":"Filtering","href":"/docs/ai-gateway/fetch-request-logs-filtering"},{"group":"Use Cases","expanded":false,"pages":[{"title":"Request Logs: Common Use Cases","sidebarTitle":"Basic Queries","href":"/docs/ai-gateway/fetch-request-logs-use-cases"},{"title":"Request Logs: Advanced Queries","sidebarTitle":"Advanced Queries","href":"/docs/ai-gateway/fetch-request-logs-use-cases-advanced"}]},{"group":"Span Attributes","expanded":false,"pages":[{"title":"Request Logs: Span Attributes","sidebarTitle":"TrueFoundry Attributes","href":"/docs/ai-gateway/fetch-request-logs-span-attributes"},{"title":"GenAI Span Attributes","sidebarTitle":"GenAI Attributes","href":"/docs/ai-gateway/fetch-request-logs-span-attributes-genai"}]}]}]},{"group":"Deployment","pages":[{"title":"Gateway Architecture","sidebarTitle":"Architecture","href":"/docs/ai-gateway/gateway-architecture"},{"title":"Deployment Options","sidebarTitle":"Deployment Options","href":"/docs/ai-gateway/modes-of-deployment"},{"title":"Globally Distributed SAAS Gateway","sidebarTitle":"Globally Distributed SAAS","href":"/docs/ai-gateway/globally-distributed-saas"},{"title":"Connect Private Models and MCP Servers","sidebarTitle":"Connect Private Endpoints","href":"/docs/ai-gateway/connect-private-models-mcp-servers"},{"title":"Install LLM Gateway (Standalone)","sidebarTitle":"Install AI Gateway","href":"/docs/ai-gateway/install-only-llm-gateway"}]},{"group":"Admin Guide","pages":[{"title":"Setup AI Gateway in Your Organization","sidebarTitle":"Setup AI Gateway in Org","href":"/docs/ai-gateway/setup-ai-gateway-in-org"},{"title":"Govern All AI Traffic Through the AI Gateway","sidebarTitle":"Govern All AI Traffic","href":"/docs/ai-gateway/govern-traffic-through-ai-gateway"},{"title":"Setup Dev, Staging and Prod Environments","sidebarTitle":"Setup Multiple Environments","href":"/docs/ai-gateway/setup-multiple-environments"},{"title":"Use Secret Manager in Integrations","sidebarTitle":"Use Secret Manager","href":"/docs/ai-gateway/secret-manager-in-ai-gateway"}]},{"group":"Chat","pages":[{"title":"Chat Completions","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /chat/completions","href":"/docs/api-reference/chat/chat-completions"}]},{"group":"Messages","pages":[{"title":"Messages","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /messages","href":"/docs/api-reference/messages/messages"},{"title":"Count Tokens","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /messages/count_tokens","href":"/docs/api-reference/messages/count-tokens"}]},{"group":"Embeddings","pages":[{"title":"Generate Embeddings","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /embeddings","href":"/docs/api-reference/embeddings/generate-embeddings"}]},{"group":"Rerank","pages":[{"title":"Rerank Documents","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /v2/rerank","href":"/docs/api-reference/rerank/rerank-documents"}]},{"group":"Responses","pages":[{"title":"List Model Response Input Items","deprecated":null,"version":null,"openapi":"/gateway-openapi.json get /responses/{id}/input_items","href":"/docs/api-reference/responses/list-model-response-input-items"},{"title":"Get Model Response","deprecated":null,"version":null,"openapi":"/gateway-openapi.json get /responses/{id}","href":"/docs/api-reference/responses/get-model-response"},{"title":"Delete Model Response","deprecated":null,"version":null,"openapi":"/gateway-openapi.json delete /responses/{id}","href":"/docs/api-reference/responses/delete-model-response"},{"title":"Model Responses","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /responses","href":"/docs/api-reference/responses/model-responses"},{"title":"Model Responses Compact","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /responses/compact","href":"/docs/api-reference/responses/model-responses-compact"}]},{"group":"Image","pages":[{"title":"Generate Images","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /images/generations","href":"/docs/api-reference/image/generate-images"},{"title":"Edit Images","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /images/edits","href":"/docs/api-reference/image/edit-images"},{"title":"Create Image Variation","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /images/variations","href":"/docs/api-reference/image/create-image-variation"}]},{"group":"Audio","pages":[{"title":"Transcribe Audio","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /audio/transcriptions","href":"/docs/api-reference/audio/transcribe-audio"},{"title":"Translate Audio","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /audio/translations","href":"/docs/api-reference/audio/translate-audio"},{"title":"Generate Speech","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /audio/speech","href":"/docs/api-reference/audio/generate-speech"}]},{"group":"Batch","pages":[{"title":"List Batches","deprecated":null,"version":null,"openapi":"/gateway-openapi.json get /batches","href":"/docs/api-reference/batch/list-batches"},{"title":"Create Batch","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /batches","href":"/docs/api-reference/batch/create-batch"},{"title":"Get Batch","deprecated":null,"version":null,"openapi":"/gateway-openapi.json get /batches/{id}","href":"/docs/api-reference/batch/get-batch"},{"title":"Get Batch Output","deprecated":null,"version":null,"openapi":"/gateway-openapi.json get /batches/{id}/output","href":"/docs/api-reference/batch/get-batch-output"},{"title":"Cancel Batch","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /batches/{id}/cancel","href":"/docs/api-reference/batch/cancel-batch"}]},{"group":"Files","pages":[{"title":"List Files","deprecated":null,"version":null,"openapi":"/gateway-openapi.json get /files","href":"/docs/api-reference/files/list-files"},{"title":"Upload File","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /files","href":"/docs/api-reference/files/upload-file"},{"title":"Get File","deprecated":null,"version":null,"openapi":"/gateway-openapi.json get /files/{id}","href":"/docs/api-reference/files/get-file"},{"title":"Delete File","deprecated":null,"version":null,"openapi":"/gateway-openapi.json delete /files/{id}","href":"/docs/api-reference/files/delete-file"},{"title":"Get File Content","deprecated":null,"version":null,"openapi":"/gateway-openapi.json get /files/{id}/content","href":"/docs/api-reference/files/get-file-content"}]},{"group":"Fine-tuning","pages":[{"title":"List Fine-tuning Jobs","deprecated":null,"version":null,"openapi":"/gateway-openapi.json get /fine_tuning/jobs","href":"/docs/api-reference/fine-tuning/list-fine-tuning-jobs"},{"title":"Create Fine-tuning Job","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /fine_tuning/jobs","href":"/docs/api-reference/fine-tuning/create-fine-tuning-job"},{"title":"Retrieve Fine-tuning Job","deprecated":null,"version":null,"openapi":"/gateway-openapi.json get /fine_tuning/jobs/{fine_tuning_job_id}","href":"/docs/api-reference/fine-tuning/retrieve-fine-tuning-job"},{"title":"Cancel Fine-tuning Job","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /fine_tuning/jobs/{fine_tuning_job_id}/cancel","href":"/docs/api-reference/fine-tuning/cancel-fine-tuning-job"}]},{"group":"Moderations","pages":[{"title":"Create Moderation","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /moderations","href":"/docs/api-reference/moderations/create-moderation"}]},{"group":"Video","pages":[{"title":"Poll or Download Video","deprecated":null,"version":null,"openapi":"/gateway-openapi.json get /videos-proxy/{providerAccountName}/{nativePath}","href":"/docs/api-reference/video/poll-or-download-video"},{"title":"Generate Video","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /videos-proxy/{providerAccountName}/{nativePath}","href":"/docs/api-reference/video/generate-video"}]},{"group":"Models","pages":[{"title":"List available models","deprecated":null,"version":null,"openapi":"/gateway-openapi.json get /models","href":"/docs/api-reference/models/list-available-models"}]}]},{"tab":"Agent Platform","pages":[{"title":"Agent Platform","href":"/docs/agent-platform/agent-harness/overview"}]},{"tab":"Platform","pages":[{"title":"Platform","href":"/docs/platform/overview"}]},{"tab":"AI Deployment","pages":[{"title":"AI Deployment","href":"/docs/ai-deployment-overview"}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/docs/truefoundry_sdk"}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/docs/ai-gateway/ecosystem"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/docs/changelog"}]}]},"basePath":"","title":"AI Gateway Guardrails Overview - TrueFoundry Docs","buildId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","deploymentId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-u3J1-UOn.js","DynamicMarkdown-B-f2cqXQ.js","zoom-image-lightbox-DTFzvaXJ.js","lightbox-handle-r17bVUz3.js"]}