Block or redact PII, stop prompt injection, and screen for unsafe content, on requests and responses
Guardrails inspect traffic in real time and act on it. They catch sensitive data and attacks before
a request reaches a provider or a response reaches a user. This is the gateway’s enforcement at the
content level, alongside usage limits.
On the Content guardrails page under Policies, add a guardrail and answer four questions:
Who is this guardrail for? A group, a user, or one API key. The group picker also
offers No group, for keys with no group assigned.
What to scan for? One of the three types above.
At what stage should the guardrail run?Input scans requests on their way in, Output
scans responses on their way out, and Both scans both directions. Prompt injection offers
Input only.
Guardrail parameters, which depend on the type. See Type settings.
There is no separate block-or-redact setting: what happens on a violation follows from the
parameters. PII is the only type that can redact, and it does so for the entities you put in its
redact list.Guardrails stack. Every guardrail whose target covers the calling key runs, so a key can be screened
by a guardrail of its own and one on its group at the same time.A guardrail’s model loads the first time a request needs it, not when you save the guardrail. Right
after you add or change one, the first requests it covers can get a 503 with a Retry-After
header while the model loads; retrying after a few seconds succeeds.
Output guardrails don’t run on streamed responses. When a request streams,
each token reaches the caller the moment the provider produces it, so there’s
no complete response to inspect before it’s delivered. To screen a response,
send the request without streaming. Input guardrails still apply, since they
run before the request is forwarded, whether or not the response streams.
Content guardrails don’t run on embeddings. Redacting input documents would
change their vectors, and embedding responses contain vectors rather than
text. A guardrail that would otherwise cover the request appears as a
skipped event in its Openlayer trace.
PII takes two entity lists, from universal types like emails, phone numbers, and credit card
numbers to country-specific identifiers:
Blocked entities: a request containing any of these is rejected with 422.
Redacted entities: matched spans are replaced with placeholders before the request is
forwarded.
A confidence threshold sets how sure the detector must be before it acts; raise it to cut false
positives.Prompt injection takes a confidence threshold and always blocks. It scores only the user’s turns:
system prompts are yours to write and routinely contain phrasing a classifier reads as an injection,
and earlier assistant turns and tool results aren’t user-controlled.Content safety scores text across six categories, all monitored by default: Toxic,
Severe toxic, Obscene, Threat, Insult, and Identity hate. Pick the categories to
monitor and a threshold, the per-category probability above which content is rejected with
422. Raising it means fewer false positives and more false negatives. It fires when any monitored
category clears the threshold, on every role rather than user turns alone. There is no redaction
path, so the outcome is block or allow.
The guardrails table shows each guardrail’s stage, what it does on a violation, how many violations
it has had in the last 7 days, and when it last triggered. The gateway records this metadata, not the
underlying text, so the log of violations never leaks the data you’re protecting.
A guardrail created before per-entity actions existed may show Log only,
meaning it records violations without acting on them. You can filter the table
by it, but new guardrails can’t be set that way.
Every violation also appears in the matching Openlayer trace as a guardrail
step, so you can review it in the full context of the request.
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Openlayer","colors":{"primary":"#592FEA","light":"#7A58EE","dark":"#7A58EE"},"logo":{"light":"https://mintcdn.com/openlayer-docs/j8aCq8ZxFTiWgvd7/logo/logo-docs-brand.svg?fit=max\u0026auto=format\u0026n=j8aCq8ZxFTiWgvd7\u0026q=85\u0026s=e33e9c38c5e338a9df337ef2c11c1d12","dark":"https://mintcdn.com/openlayer-docs/j8aCq8ZxFTiWgvd7/logo/logo-docs-brand-dark.svg?fit=max\u0026auto=format\u0026n=j8aCq8ZxFTiWgvd7\u0026q=85\u0026s=55cba7faebfb90304a52071092233014","href":"https://openlayer.com"},"favicon":"https://mintcdn.com/openlayer-docs/V8WkhV9OB3C8n0Xk/favicon.svg?fit=max\u0026auto=format\u0026n=V8WkhV9OB3C8n0Xk\u0026q=85\u0026s=abe75e70e20a31a0c2b99b49d2ae158b","api":{"openapi":["api-reference/openapi.yaml"],"playground":{"display":"none"},"mdx":{"auth":{"method":"bearer"},"server":"https://api.openlayer.com/v1"}},"appearance":{"default":"system"},"background":{"color":{"light":"#FFFFFF","dark":"#000000"}},"navbar":{"links":[{"href":"https://discord.gg/t6wS2g6MMB","label":"Community"},{"href":"https://app.openlayer.com/?login=true","label":"Log in"}],"primary":{"type":"button","label":"Get started","href":"https://app.openlayer.com/"}},"footer":{"socials":{"discord":"https://discord.gg/t6wS2g6MMB","linkedin":"https://www.linkedin.com/company/openlayerco","twitter":"https://twitter.com/openlayerco"}},"fonts":{"family":"Inter"},"icons":{"library":"lucide"},"integrations":{"mixpanel":{"projectToken":"401ce9e4de4663c33009eb3d140d3945"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"openlayer-docs","hasAudioNarration":false,"actualSubdomain":"openlayer-docs","customDomains":["openlayer.com"],"gitSource":{"type":"github","owner":"openlayer-ai","repo":"openlayer-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6adba8dcdabdb6666ffbb5d3","collectionId":"d67b1571-3d14-4211-9343-a504e93e25f7","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6adba8dcdabdb6666ffbb5d3"},"feedback":{"thumbs":true,"edits":true,"issues":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6adba8dcdabdb6666ffbb5d3","clientVersion":"0.0.3964","searchFilterCounts":[{"language":"default","tag":"Documentation","count":196},{"language":"default","tag":"Tests","count":122},{"language":"default","tag":"Catalog","count":111},{"language":"default","tag":"Reference","count":91},{"language":"default","tag":"REST API","count":64},{"language":"default","tag":"Integrations","count":55},{"language":"default","tag":"Governance","count":35},{"language":"default","tag":"Observability","count":23},{"language":"default","tag":"CLI","count":19},{"language":"default","tag":"Commands","count":17}]},"assistantConfig":{},"hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","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":"editor-v7-file-tree","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":"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":"pause-universal-search-reconcile","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":"per-site-search-delta","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":"editor-private-page-search","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":"editor-nav-generations","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":"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":"byok-sep-25","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":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","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}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"gateway/guardrails","slug":"/gateway/guardrails","pageMetadata":{"title":"Guardrails","description":"Block or redact PII, stop prompt injection, and screen for unsafe content, on requests and responses","icon":"shield-alert","href":"/gateway/guardrails"},"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: \"Block or redact PII, stop prompt injection, and screen for unsafe content, on requests and responses\"\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`,li:`li`,ol:`ol`,p:`p`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Heading,Note,OptimizedImage,Table,Warning}=_components;if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Guardrails inspect traffic in real time and act on it. They catch sensitive data and attacks before\na request reaches a provider or a response reaches a user. This is the gateway’s enforcement at the\ncontent level, alongside `,_jsx(_components.a,{href:`/gateway/budgets-and-limits`,children:`usage limits`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`guardrail-types`,children:`Guardrail types`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Catches`}),_jsx(_components.th,{children:`Runs on`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`PII`})}),_jsx(_components.td,{children:`Personal identifiable information`}),_jsx(_components.td,{children:`Input, output`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Prompt injection`})}),_jsx(_components.td,{children:`Prompt injection and jailbreak attempts`}),_jsx(_components.td,{children:`Input only`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Content safety`})}),_jsx(_components.td,{children:`Toxic, obscene, threatening, or hateful content`}),_jsx(_components.td,{children:`Input, output`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Each type has its own settings, described under `,_jsx(_components.a,{href:`#type-settings`,children:`Type settings`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`create-a-guardrail`,children:`Create a guardrail`}),`\n`,_jsxs(_components.p,{children:[`On the `,_jsx(_components.strong,{children:`Content guardrails`}),` page under Policies, add a guardrail and answer four questions:`]}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Who is this guardrail for?`}),` A `,_jsx(_components.strong,{children:`group`}),`, a `,_jsx(_components.strong,{children:`user`}),`, or one `,_jsx(_components.strong,{children:`API key`}),`. The group picker also\noffers `,_jsx(_components.strong,{children:`No group`}),`, for keys with no group assigned.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`What to scan for?`}),` One of the three types above.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`At what stage should the guardrail run?`}),` `,_jsx(_components.strong,{children:`Input`}),` scans requests on their way in, `,_jsx(_components.strong,{children:`Output`}),`\nscans responses on their way out, and `,_jsx(_components.strong,{children:`Both`}),` scans both directions. Prompt injection offers\nInput only.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Guardrail parameters`}),`, which depend on the type. See `,_jsx(_components.a,{href:`#type-settings`,children:`Type settings`}),`.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`There is no separate block-or-redact setting: what happens on a violation follows from the\nparameters. PII is the only type that can redact, and it does so for the entities you put in its\nredact list.`}),`\n`,_jsx(_components.p,{children:`Guardrails stack. Every guardrail whose target covers the calling key runs, so a key can be screened\nby a guardrail of its own and one on its group at the same time.`}),`\n`,_jsxs(_components.p,{children:[`A guardrail’s model loads the first time a request needs it, not when you save the guardrail. Right\nafter you add or change one, the first requests it covers can get a `,_jsx(_components.strong,{children:`503`}),` with a `,_jsx(_components.code,{children:`Retry-After`}),`\nheader while the model loads; retrying after a few seconds succeeds.`]}),`\n`,_jsx(OptimizedImage,{width:`700`,style:{borderRadius:`0.5rem`},src:`https://mintcdn.com/openlayer-docs/a2_1CfDP3O8kf5P1/images/gateway/create_guardrail.png?fit=max\u0026auto=format\u0026n=a2_1CfDP3O8kf5P1\u0026q=85\u0026s=93c724cb3a98623450a3c43210491ae9`,alt:`Creating a guardrail: who it is for, what to scan for, at what stage, and its parameters`,\"data-og-width\":`1800`,\"data-og-height\":`1013`,\"data-path\":`images/gateway/create_guardrail.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/openlayer-docs/a2_1CfDP3O8kf5P1/images/gateway/create_guardrail.png?w=280\u0026fit=max\u0026auto=format\u0026n=a2_1CfDP3O8kf5P1\u0026q=85\u0026s=123291f2e8f317f67f9ef2bbd2411651 280w, https://mintcdn.com/openlayer-docs/a2_1CfDP3O8kf5P1/images/gateway/create_guardrail.png?w=560\u0026fit=max\u0026auto=format\u0026n=a2_1CfDP3O8kf5P1\u0026q=85\u0026s=16870f8287f7de347cb69906d6eb5d59 560w, https://mintcdn.com/openlayer-docs/a2_1CfDP3O8kf5P1/images/gateway/create_guardrail.png?w=840\u0026fit=max\u0026auto=format\u0026n=a2_1CfDP3O8kf5P1\u0026q=85\u0026s=50826e3216cdef3b2f00ec8c649eb42f 840w, https://mintcdn.com/openlayer-docs/a2_1CfDP3O8kf5P1/images/gateway/create_guardrail.png?w=1100\u0026fit=max\u0026auto=format\u0026n=a2_1CfDP3O8kf5P1\u0026q=85\u0026s=dece5e4cdad98f1ff53976f647deaa98 1100w, https://mintcdn.com/openlayer-docs/a2_1CfDP3O8kf5P1/images/gateway/create_guardrail.png?w=1650\u0026fit=max\u0026auto=format\u0026n=a2_1CfDP3O8kf5P1\u0026q=85\u0026s=a0b3efaef091f4e769b91599a596ade7 1650w, https://mintcdn.com/openlayer-docs/a2_1CfDP3O8kf5P1/images/gateway/create_guardrail.png?w=2500\u0026fit=max\u0026auto=format\u0026n=a2_1CfDP3O8kf5P1\u0026q=85\u0026s=d3aa075ddbf8bfcd671c6ab482b41ade 2500w`}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Output guardrails don’t run on streamed responses.`}),` When a request streams,\neach token reaches the caller the moment the provider produces it, so there’s\nno complete response to inspect before it’s delivered. To screen a response,\nsend the request without streaming. Input guardrails still apply, since they\nrun before the request is forwarded, whether or not the response streams.`]})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Content guardrails don’t run on embeddings. Redacting input documents would\nchange their vectors, and embedding responses contain vectors rather than\ntext. A guardrail that would otherwise cover the request appears as a\n`,_jsx(_components.strong,{children:`skipped`}),` event in its Openlayer trace.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`type-settings`,children:`Type settings`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`PII`}),` takes two entity lists, from universal types like emails, phone numbers, and credit card\nnumbers to country-specific identifiers:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Blocked entities`}),`: a request containing any of these is rejected with `,_jsx(_components.strong,{children:`422`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Redacted entities`}),`: matched spans are replaced with placeholders before the request is\nforwarded.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`A `,_jsx(_components.strong,{children:`confidence threshold`}),` sets how sure the detector must be before it acts; raise it to cut false\npositives.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Prompt injection`}),` takes a confidence threshold and always blocks. It scores only the user’s turns:\nsystem prompts are yours to write and routinely contain phrasing a classifier reads as an injection,\nand earlier assistant turns and tool results aren’t user-controlled.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Content safety`}),` scores text across six categories, all monitored by default: `,_jsx(_components.strong,{children:`Toxic`}),`,\n`,_jsx(_components.strong,{children:`Severe toxic`}),`, `,_jsx(_components.strong,{children:`Obscene`}),`, `,_jsx(_components.strong,{children:`Threat`}),`, `,_jsx(_components.strong,{children:`Insult`}),`, and `,_jsx(_components.strong,{children:`Identity hate`}),`. Pick the categories to\nmonitor and a `,_jsx(_components.strong,{children:`threshold`}),`, the per-category probability above which content is rejected with\n`,_jsx(_components.strong,{children:`422`}),`. Raising it means fewer false positives and more false negatives. It fires when any monitored\ncategory clears the threshold, on every role rather than user turns alone. There is no redaction\npath, so the outcome is block or allow.`]}),`\n`,_jsx(Heading,{level:`2`,id:`see-what-fired`,children:`See what fired`}),`\n`,_jsx(_components.p,{children:`The guardrails table shows each guardrail’s stage, what it does on a violation, how many violations\nit has had in the last 7 days, and when it last triggered. The gateway records this metadata, not the\nunderlying text, so the log of violations never leaks the data you’re protecting.`}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`A guardrail created before per-entity actions existed may show `,_jsx(_components.strong,{children:`Log only`}),`,\nmeaning it records violations without acting on them. You can filter the table\nby it, but new guardrails can’t be set that way.`]})}),`\n`,_jsxs(_components.p,{children:[`Every violation also appears in the matching `,_jsx(_components.a,{href:`/gateway/observability`,children:`Openlayer trace`}),` as a guardrail\nstep, so you can review it in the full context of the request.`]}),`\n`,_jsx(OptimizedImage,{width:`700`,style:{borderRadius:`0.5rem`},src:`https://mintcdn.com/openlayer-docs/0DNdDuuycN4Yl8SH/images/gateway/gateway_trace.png?fit=max\u0026auto=format\u0026n=0DNdDuuycN4Yl8SH\u0026q=85\u0026s=d25a940e0fabec1eeb235ebfb1dea5be`,alt:`Every gateway request becomes a trace in Openlayer`,\"data-og-width\":`1800`,\"data-og-height\":`941`,\"data-path\":`images/gateway/gateway_trace.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/openlayer-docs/0DNdDuuycN4Yl8SH/images/gateway/gateway_trace.png?w=280\u0026fit=max\u0026auto=format\u0026n=0DNdDuuycN4Yl8SH\u0026q=85\u0026s=b545c2ab0c6d117052b2b53581be54f0 280w, https://mintcdn.com/openlayer-docs/0DNdDuuycN4Yl8SH/images/gateway/gateway_trace.png?w=560\u0026fit=max\u0026auto=format\u0026n=0DNdDuuycN4Yl8SH\u0026q=85\u0026s=057dc66e2ed876935f0a7a563021cfd9 560w, https://mintcdn.com/openlayer-docs/0DNdDuuycN4Yl8SH/images/gateway/gateway_trace.png?w=840\u0026fit=max\u0026auto=format\u0026n=0DNdDuuycN4Yl8SH\u0026q=85\u0026s=fbaa04ea9e5e1a5886fcbce4b4fa7f85 840w, https://mintcdn.com/openlayer-docs/0DNdDuuycN4Yl8SH/images/gateway/gateway_trace.png?w=1100\u0026fit=max\u0026auto=format\u0026n=0DNdDuuycN4Yl8SH\u0026q=85\u0026s=946297743b79eaaafa6aa51a203f5b03 1100w, https://mintcdn.com/openlayer-docs/0DNdDuuycN4Yl8SH/images/gateway/gateway_trace.png?w=1650\u0026fit=max\u0026auto=format\u0026n=0DNdDuuycN4Yl8SH\u0026q=85\u0026s=0c586513a92abc167dacdba8f4729384 1650w, https://mintcdn.com/openlayer-docs/0DNdDuuycN4Yl8SH/images/gateway/gateway_trace.png?w=2500\u0026fit=max\u0026auto=format\u0026n=0DNdDuuycN4Yl8SH\u0026q=85\u0026s=2cffd7ffdb7556eae33734f00b9f003c 2500w`})]})}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":{"config":{},"pageMetadata":{"title":"Guardrails","description":"Block or redact PII, stop prompt injection, and screen for unsafe content, on requests and responses","icon":"shield-alert","href":"/gateway/guardrails"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Guardrail types","slug":"guardrail-types","depth":2,"children":[]},{"title":"Create a guardrail","slug":"create-a-guardrail","depth":2,"children":[]},{"title":"Type settings","slug":"type-settings","depth":2,"children":[]},{"title":"See what fired","slug":"see-what-fired","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/openlayer-docs/a85e4a0a43b4a6e9/.eslintrc.js"],"subdomain":"openlayer-docs","siteName":"Openlayer","title":"Guardrails - Openlayer","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-14T12:04:44.884Z","originalFileLocation":"gateway/guardrails.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=\"system\"}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=\"Block or redact PII, stop prompt injection, and screen for unsafe content, on requests and responses\">\u003cmeta data-mint-head name=\"application-name\" content=\"Openlayer\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/openlayer-docs/JkuoDa5Uvs4Y0n-U/_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=\"/docs/mintlify-assets/_mintlify/favicons/openlayer-docs/JkuoDa5Uvs4Y0n-U/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/openlayer-docs/JkuoDa5Uvs4Y0n-U/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/openlayer-docs/JkuoDa5Uvs4Y0n-U/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/openlayer-docs/JkuoDa5Uvs4Y0n-U/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/openlayer-docs/JkuoDa5Uvs4Y0n-U/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/openlayer-docs/JkuoDa5Uvs4Y0n-U/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/openlayer-docs/JkuoDa5Uvs4Y0n-U/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/openlayer-docs/JkuoDa5Uvs4Y0n-U/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Guardrails - Openlayer\">\u003cmeta data-mint-head property=\"og:description\" content=\"Block or redact PII, stop prompt injection, and screen for unsafe content, on requests and responses\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Openlayer\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://openlayer.com/docs/gateway/guardrails\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://openlayer-docs.mintlify.app/_mintlify/api/og/v2?division=Gateway\u0026amp;title=Guardrails\u0026amp;description=Block+or+redact+PII%2C+stop+prompt+injection%2C+and+screen+for+unsafe+content%2C+on+requests+and+responses\u0026amp;theme=d15cfd1a18d9f87a0af36cb6\u0026amp;signature=f519869da235a8426c2eb8c0469442b5f9bbb43fb113efa9730cdb6284df198a\">\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=\"Guardrails - Openlayer\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Block or redact PII, stop prompt injection, and screen for unsafe content, on requests and responses\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://openlayer-docs.mintlify.app/_mintlify/api/og/v2?division=Gateway\u0026amp;title=Guardrails\u0026amp;description=Block+or+redact+PII%2C+stop+prompt+injection%2C+and+screen+for+unsafe+content%2C+on+requests+and+responses\u0026amp;theme=d15cfd1a18d9f87a0af36cb6\u0026amp;signature=f519869da235a8426c2eb8c0469442b5f9bbb43fb113efa9730cdb6284df198a\">\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=\"/docs/mintlify-assets/_mintlify/favicons/openlayer-docs/JkuoDa5Uvs4Y0n-U/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Openlayer\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#592FEA\">\u003clink data-mint-head rel=\"canonical\" href=\"https://openlayer.com/docs/gateway/guardrails\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/gateway/guardrails.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://openlayer.com/#organization\",\"name\":\"Openlayer\",\"url\":\"https://openlayer.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/openlayer-docs/j8aCq8ZxFTiWgvd7/logo/logo-docs-brand.svg?fit=max\u0026auto=format\u0026n=j8aCq8ZxFTiWgvd7\u0026q=85\u0026s=e33e9c38c5e338a9df337ef2c11c1d12\"}},{\"@type\":\"WebSite\",\"@id\":\"https://openlayer.com/docs#website\",\"name\":\"Openlayer\",\"url\":\"https://openlayer.com/docs\",\"publisher\":{\"@id\":\"https://openlayer.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://openlayer.com/docs/gateway/guardrails#webpage\",\"url\":\"https://openlayer.com/docs/gateway/guardrails\",\"name\":\"Guardrails\",\"description\":\"Block or redact PII, stop prompt injection, and screen for unsafe content, on requests and responses\",\"dateModified\":\"2026-10-14T12:04:44.884Z\",\"isPartOf\":{\"@id\":\"https://openlayer.com/docs#website\"},\"breadcrumb\":{\"@id\":\"https://openlayer.com/docs/gateway/guardrails#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://openlayer.com/docs/gateway/guardrails#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Gateway\",\"item\":\"https://openlayer.com/docs/gateway/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Guardrails\",\"item\":\"https://openlayer.com/docs/gateway/guardrails\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://openlayer.com/docs/gateway/guardrails#article\",\"headline\":\"Guardrails\",\"name\":\"Guardrails\",\"description\":\"Block or redact PII, stop prompt injection, and screen for unsafe content, on requests and responses\",\"url\":\"https://openlayer.com/docs/gateway/guardrails\",\"mainEntityOfPage\":{\"@id\":\"https://openlayer.com/docs/gateway/guardrails#webpage\"},\"dateModified\":\"2026-10-14T12:04:44.884Z\",\"publisher\":{\"@id\":\"https://openlayer.com/#organization\"},\"isPartOf\":{\"@id\":\"https://openlayer.com/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Openlayer\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Openlayer","nav":{"global":null,"tabs":[{"tab":"Documentation","groups":[{"group":"Get started","pages":[{"title":"Introduction","mode":"wide","icon":"album","href":"/introduction"}]},{"group":"Workspace setup","pages":[{"title":"Workspace dashboard","icon":"layout-dashboard","href":"/workspace-and-projects/workspace-dashboard"},{"group":"Projects","icon":"folder","pages":[{"title":"Create a project","hidden":false,"href":"/workspace-and-projects/creating-and-loading-projects"},{"title":"Project dashboards","href":"/workspace-and-projects/project-dashboards"}]},{"title":"Create an API key","icon":"key-round","href":"/workspace-and-projects/find-your-api-key"}]},{"group":"Governance","pages":[{"title":"Overview","icon":"landmark","hidden":false,"href":"/governance/overview"},{"group":"Set up a framework","icon":"rocket","pages":[{"title":"Activate a built-in framework","hidden":false,"href":"/governance/activate-framework"},{"title":"Build a custom framework","hidden":false,"href":"/governance/build-custom-framework"}]},{"group":"Understand requirements","icon":"book-open-check","pages":[{"title":"How frameworks map to requirements","hidden":false,"href":"/governance/framework-requirements"},{"title":"Platform rules","hidden":false,"href":"/governance/platform-rules"},{"title":"Evidence-based rules","hidden":false,"href":"/governance/evidence-based-rules"}]},{"group":"Track compliance","icon":"chart-bar","pages":[{"title":"Track compliance across your workspace","hidden":false,"href":"/governance/workspace-compliance"},{"title":"Track compliance within a project","hidden":false,"href":"/governance/project-compliance"},{"title":"Use the governance API","href":"/governance/api-access"}]},{"title":"Define intake and risk forms","icon":"clipboard-list","href":"/governance/intake-and-risk-forms"},{"title":"Project lifecycle","icon":"refresh-cw","href":"/governance/project-lifecycle"}]},{"group":"Observability","pages":[{"title":"Overview","icon":"telescope","href":"/monitoring/overview"},{"group":"Integrate","icon":"user-cog","pages":[{"title":"Instrument your code","hidden":false,"href":"/monitoring/instrument"},{"title":"Other integration paths","href":"/monitoring/alternative-integrations"}]},{"group":"Enrich traces","icon":"grid-2x2-plus","pages":[{"title":"Add metadata to traces","href":"/monitoring/metadata"},{"title":"Custom columns","href":"/monitoring/custom-columns"},{"title":"Trace multimodal data","href":"/monitoring/multimodal"},{"title":"Track users and sessions","href":"/monitoring/sessions-and-users"},{"title":"Log context for RAG systems","href":"/monitoring/context"},{"title":"Redact PII","href":"/monitoring/pii-redaction"},{"title":"Log question for RAG systems","href":"/monitoring/question"},{"title":"Update existing traces","href":"/monitoring/updating-data"}]},{"group":"Beyond traces","icon":"binoculars","pages":[{"title":"Publish traditional ML predictions","href":"/monitoring/publishing-tabular-predictions"},{"title":"Upload a reference dataset","href":"/monitoring/uploading-reference-dataset"}]},{"group":"Concepts","icon":"book-open","pages":[{"title":"Evaluation and delay windows","href":"/monitoring/evaluation-and-delay-windows"},{"title":"LLM cost estimation","href":"/monitoring/cost-estimation"}]},{"group":"Guardrails","icon":"shield-alert","pages":[{"title":"Overview","hidden":false,"href":"/guardrails/overview"}]},{"title":"AI-generated summaries","icon":"sparkles","href":"/monitoring/ai-summaries"},{"title":"Export data","icon":"download","href":"/monitoring/export-data"}]},{"group":"Offline testing","pages":[{"title":"Overview","icon":"git-commit-vertical","href":"/development/overview"},{"group":"Integrate","icon":"user-cog","pages":[{"title":"Push and poll using the Openlayer CLI","href":"/guides/cli-push"}]},{"group":"Configure","icon":"braces","pages":[{"title":"openlayer.json","href":"/development/openlayer-json"},{"title":"tests.json","href":"/development/tests-json"},{"title":"Configuring output generation","href":"/development/configuring-output-generation"}]},{"group":"Custom CI/CD setups","icon":"git-compare","pages":[{"title":"GitHub Actions with Openlayer","href":"/guides/gh-actions"}]}]},{"group":"Tests","pages":[{"title":"Overview","hidden":false,"icon":"list-checks","href":"/tests/overview"},{"title":"Browse tests","mode":"frame","icon":"scan-search","href":"/tests/browse"},{"group":"Catalog","icon":"notebook","pages":[{"title":"Accuracy","hidden":false,"href":"/tests/catalog/accuracy"},{"title":"Aggregate metrics","hidden":false,"href":"/tests/catalog/aggregate-metrics"},{"title":"Anomalous column count","hidden":false,"href":"/tests/catalog/anomalous-column-count"},{"title":"Answer correctness","hidden":false,"href":"/tests/catalog/answer-correctness"},{"title":"Answer relevancy","hidden":false,"href":"/tests/catalog/answer-relevancy"},{"title":"Bias","hidden":false,"href":"/tests/catalog/bias"},{"title":"BLEU score","hidden":false,"href":"/tests/catalog/bleu-score"},{"title":"Character length","hidden":false,"href":"/tests/catalog/character-length"},{"title":"Class imbalance ratio","hidden":false,"href":"/tests/catalog/class-imbalance-ratio"},{"title":"Coherence","hidden":false,"href":"/tests/catalog/coherence"},{"title":"Column average","hidden":false,"href":"/tests/catalog/column-average"},{"title":"Column drift","hidden":false,"href":"/tests/catalog/column-drift"},{"title":"Column freshness","href":"/tests/catalog/column-freshness"},{"title":"Column statistics","hidden":false,"href":"/tests/catalog/column-statistic"},{"title":"Column values match","hidden":false,"href":"/tests/catalog/column-values-match"},{"title":"Conciseness","hidden":false,"href":"/tests/catalog/conciseness"},{"title":"Conflicting labels","hidden":false,"href":"/tests/catalog/conflicting-label-count"},{"title":"Contains PII","hidden":false,"href":"/tests/catalog/contains-p-i-i"},{"title":"Valid URLs","hidden":false,"href":"/tests/catalog/contains-valid-url"},{"title":"Context recall","hidden":false,"href":"/tests/catalog/context-recall"},{"title":"Context relevancy","hidden":false,"href":"/tests/catalog/context-relevancy"},{"title":"Context utilization","hidden":false,"href":"/tests/catalog/context-utilization"},{"title":"Correctness","hidden":false,"href":"/tests/catalog/correctness"},{"title":"Correlated features","hidden":false,"href":"/tests/catalog/correlated-feature-count"},{"title":"Data type validation","hidden":false,"href":"/tests/catalog/dtype-validation"},{"title":"Duplicate rows","hidden":false,"href":"/tests/catalog/duplicate-count"},{"title":"Edit distance","hidden":false,"href":"/tests/catalog/edit-distance"},{"title":"Empty features","hidden":false,"href":"/tests/catalog/empty-feature"},{"title":"Empty feature count","hidden":false,"href":"/tests/catalog/empty-feature-count"},{"title":"Exact match","hidden":false,"href":"/tests/catalog/exact-match"},{"title":"Column contains string","hidden":false,"href":"/tests/catalog/expect-column-a-to-be-in-column-b"},{"title":"F1 score","hidden":false,"href":"/tests/catalog/f1"},{"title":"Faithfulness","hidden":false,"href":"/tests/catalog/faithfulness"},{"title":"False positive rate","hidden":false,"href":"/tests/catalog/false-positive-rate"},{"title":"Feature drift","hidden":false,"href":"/tests/catalog/feature-drift-count"},{"title":"Feature values","hidden":false,"href":"/tests/catalog/feature-values"},{"title":"Features missing values","hidden":false,"href":"/tests/catalog/features-missing-values"},{"title":"Freshness","href":"/tests/catalog/freshness"},{"title":"Geometric mean","hidden":false,"href":"/tests/catalog/geometric-mean"},{"title":"Great expectations","hidden":false,"href":"/tests/catalog/great-expectations"},{"title":"Groundedness","hidden":false,"href":"/tests/catalog/groundedness"},{"title":"Group by column statistic","hidden":false,"href":"/tests/catalog/group-by-column-statistic"},{"title":"Group metric parity","href":"/tests/catalog/group-metric-parity"},{"title":"Group outcome disparity","href":"/tests/catalog/group-outcome-disparity"},{"title":"Group performance parity","href":"/tests/catalog/group-performance-parity"},{"title":"Group score disparity","href":"/tests/catalog/group-score-disparity"},{"title":"Hallucination","hidden":false,"href":"/tests/catalog/hallucination"},{"title":"Harmfulness","hidden":false,"href":"/tests/catalog/harmfulness"},{"title":"Has prompt injection","hidden":false,"href":"/tests/catalog/has-prompt-injection-count"},{"title":"Ill-formed rows","hidden":false,"href":"/tests/catalog/ill-formed-count"},{"title":"Is code","hidden":false,"href":"/tests/catalog/is-code"},{"title":"Is JSON","hidden":false,"href":"/tests/catalog/is-json"},{"title":"Jev-as-a-judge","href":"/tests/catalog/jev-as-a-judge-threshold"},{"title":"JSON score","hidden":false,"href":"/tests/catalog/json-score"},{"title":"LLM-as-a-judge","hidden":false,"href":"/tests/catalog/l-l-m-rubric-threshold"},{"title":"Label/target drift","hidden":false,"href":"/tests/catalog/label-drift"},{"title":"Log loss","hidden":false,"href":"/tests/catalog/log-loss"},{"title":"Mean absolute error (MAE)","hidden":false,"href":"/tests/catalog/mae"},{"title":"Maliciousness","hidden":false,"href":"/tests/catalog/maliciousness"},{"title":"Mean absolute percentage error (MAPE)","hidden":false,"href":"/tests/catalog/mape"},{"title":"Max cost","hidden":false,"href":"/tests/catalog/max-cost"},{"title":"Max latency","hidden":false,"href":"/tests/catalog/max-latency"},{"title":"Max tokens","hidden":false,"href":"/tests/catalog/max-tokens"},{"title":"Mean cost","hidden":false,"href":"/tests/catalog/mean-cost"},{"title":"Mean latency","hidden":false,"href":"/tests/catalog/mean-latency"},{"title":"Mean tokens","hidden":false,"href":"/tests/catalog/mean-tokens"},{"title":"Median latency","hidden":false,"href":"/tests/catalog/median-latency"},{"title":"Min latency","hidden":false,"href":"/tests/catalog/min-latency"},{"title":"Mean squared error (MSE)","hidden":false,"href":"/tests/catalog/mse"},{"title":"New categories","hidden":false,"href":"/tests/catalog/new-category-count"},{"title":"New labels","hidden":false,"href":"/tests/catalog/new-label-count"},{"title":"Null rows","hidden":false,"href":"/tests/catalog/null-count"},{"title":"90th latency percentile","hidden":false,"href":"/tests/catalog/p90-latency"},{"title":"95th latency percentile","hidden":false,"href":"/tests/catalog/p95-latency"},{"title":"99th latency percentile","hidden":false,"href":"/tests/catalog/p99-latency"},{"title":"Predictive power score (PPS)","hidden":false,"href":"/tests/catalog/pp-score-value-validation"},{"title":"Precision","hidden":false,"href":"/tests/catalog/precision"},{"title":"Quasi-constant features","hidden":false,"href":"/tests/catalog/quasi-constant-feature"},{"title":"Quasi-constant feature count","hidden":false,"href":"/tests/catalog/quasi-constant-feature-count"},{"title":"Quasi-exact match","hidden":false,"href":"/tests/catalog/quasi-exact-match"},{"title":"R-squared","hidden":false,"href":"/tests/catalog/r2"},{"title":"Recall","hidden":false,"href":"/tests/catalog/recall"},{"title":"Recommends competitor","hidden":false,"href":"/tests/catalog/recommends-competitor"},{"title":"Root mean squared error (RMSE)","hidden":false,"href":"/tests/catalog/rmse"},{"title":"ROC AUC","hidden":false,"href":"/tests/catalog/roc-auc"},{"title":"Number of rows","hidden":false,"href":"/tests/catalog/row-count"},{"title":"Semantic similarity","hidden":false,"href":"/tests/catalog/semantic-similarity"},{"title":"Sentence length","hidden":false,"href":"/tests/catalog/sentence-length"},{"title":"Session coherence","hidden":false,"href":"/tests/catalog/session-coherence"},{"title":"Session context retention","hidden":false,"href":"/tests/catalog/session-context-retention"},{"title":"Session conversation completeness","hidden":false,"href":"/tests/catalog/session-conversation-completeness"},{"title":"Session cost","hidden":false,"href":"/tests/catalog/session-cost"},{"title":"Session duration","hidden":false,"href":"/tests/catalog/session-duration"},{"title":"Session goal achievement","hidden":false,"href":"/tests/catalog/session-goal-achievement"},{"title":"Session guideline adherence","hidden":false,"href":"/tests/catalog/session-guideline-adherence"},{"title":"Session latency","hidden":false,"href":"/tests/catalog/session-latency"},{"title":"Session record count","hidden":false,"href":"/tests/catalog/session-record-count"},{"title":"Session role adherence","hidden":false,"href":"/tests/catalog/session-role-adherence"},{"title":"Session task progression","hidden":false,"href":"/tests/catalog/session-task-progression"},{"title":"Session token count","hidden":false,"href":"/tests/catalog/session-token-count"},{"title":"Session turn relevancy","hidden":false,"href":"/tests/catalog/session-turn-relevancy"},{"title":"Size ratio","hidden":false,"href":"/tests/catalog/size-ratio"},{"title":"Special characters ratio","hidden":false,"href":"/tests/catalog/special-characters-ratio"},{"title":"SQL query","hidden":false,"href":"/tests/catalog/sql-query"},{"title":"SQL query return rows","hidden":false,"href":"/tests/catalog/sql-query-return-rows"},{"title":"String validation","hidden":false,"href":"/tests/catalog/string-validation"},{"title":"Total cost","hidden":false,"href":"/tests/catalog/total-cost"},{"title":"Total tokens","hidden":false,"href":"/tests/catalog/total-tokens"},{"title":"Toxicity","hidden":false,"href":"/tests/catalog/toxicity"},{"title":"Training-validation leakage","hidden":false,"href":"/tests/catalog/train-val-leakage-count"},{"title":"Unauthorized tool calls","hidden":false,"href":"/tests/catalog/unauthorized-tool-calls"}]},{"title":"Tests configuration","hidden":false,"icon":"settings-2","href":"/tests/test-configuration"},{"title":"Manage tests","icon":"list-todo","href":"/tests/manage-tests"},{"title":"Semantic search filters","icon":"text-search","href":"/tests/semantic-search-filters"},{"title":"Custom metrics","icon":"pencil-line","href":"/tests/custom-metrics"}]},{"group":"Gateway","pages":[{"title":"Overview","icon":"route","href":"/gateway/overview"},{"group":"Set up \u0026 connect","icon":"plug","pages":[{"title":"Set up the gateway","href":"/gateway/set-up-the-gateway"},{"title":"Make your first request","href":"/gateway/make-your-first-request"}]},{"group":"Manage API keys","icon":"key-round","pages":[{"title":"Create API keys","href":"/gateway/api-keys"},{"title":"Assign groups","href":"/gateway/groups"},{"title":"Send invites","href":"/gateway/invites"}]},{"group":"Budgets \u0026 usage","icon":"wallet","pages":[{"title":"Set usage limits","href":"/gateway/budgets-and-limits"},{"title":"Track usage","description":"See what each key, user, and group is consuming and what it costs","href":"/gateway/usage-and-cost"}]},{"title":"Guardrails","icon":"shield-alert","href":"/gateway/guardrails"},{"title":"Model access","description":"Allow or block models per key, user, group, or the whole deployment","icon":"boxes","href":"/gateway/model-access"},{"title":"Observability","icon":"activity","href":"/gateway/observability"},{"title":"Errors","icon":"circle-alert","href":"/gateway/errors"},{"group":"Routing","icon":"waypoints","pages":[{"title":"Connect providers","href":"/gateway/connect-providers"},{"title":"Route requests","href":"/gateway/route-requests"},{"title":"Use any model from any SDK","href":"/gateway/use-any-model"}]}]},{"group":"Data quality monitoring","pages":[{"title":"Overview","icon":"database-zap","href":"/data-quality-monitoring/overview"},{"group":"Integrate","icon":"user-cog","pages":[{"title":"Connect a data source","hidden":false,"href":"/data-quality-monitoring/connect-data-source"}]},{"group":"Concepts","icon":"book-open","pages":[{"title":"Anomaly detection","href":"/data-quality-monitoring/anomaly-detection"}]}]},{"group":"Administration","pages":[{"title":"Security","icon":"lock","href":"/security"},{"title":"Data regions","icon":"globe","href":"/security/data-residency"},{"title":"Roles and permissions","icon":"shield-check","href":"/security/roles-and-permissions"},{"title":"SAML SSO Authentication","icon":"scan-face","href":"/security/saml-sso"},{"title":"Multi-factor Authentication","icon":"shield-check","href":"/security/multi-factor-authentication"},{"title":"Access groups","icon":"users","href":"/security/access-groups"},{"title":"Environment Variables","icon":"hexagon","href":"/security/environment-variables"},{"title":"Data retention","icon":"clock","href":"/workspace-and-projects/data-retention"}]},{"group":"Notifications","pages":[{"title":"Overview","icon":"bell","href":"/notifications/overview"},{"title":"In-app notifications","icon":"inbox","href":"/notifications/in-app"},{"title":"Email notifications","icon":"mail","href":"/notifications/email"},{"title":"Slack notifications","icon":"message-square","href":"/notifications/slack"},{"group":"Webhooks","icon":"webhook","pages":[{"title":"Overview","href":"/security/webhooks/overview"},{"title":"Manage webhooks","href":"/security/webhooks/manage-webhooks"},{"title":"Events and payloads","href":"/security/webhooks/events"},{"title":"Verify signatures","href":"/security/webhooks/verify-signatures"}]}]},{"group":"Other resources","pages":[{"title":"Glossary","icon":"case-sensitive","href":"/glossary"},{"title":"Openlayer MCP","icon":"audio-waveform","href":"/openlayer-mcp"},{"title":"Openlayer Agent Skills","icon":"wand-sparkles","href":"/openlayer-skills"},{"group":"Code examples","icon":"code","pages":[{"title":"Templates","href":"/examples/templates"},{"title":"Monitoring","href":"/examples/monitoring"}]}]}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/integrations/overview"}]},{"tab":"Reference","pages":[{"title":"Reference","href":"/api-reference/introduction"}]}]},"title":"Guardrails - Openlayer","buildId":"dpl_BtCp1ySSRiZuC61kdwjLNfcZF9iT","deploymentId":"dpl_BtCp1ySSRiZuC61kdwjLNfcZF9iT","dynamics":["a74be98ba7"],"chunks":["zoom-image-lightbox-BMB-XSWA.js","lightbox-handle-r17bVUz3.js"]}