Create a new guardrail for the authenticated user. A newly created guardrail enforces nothing until it is assigned to API keys or organization members; workspace_id places the guardrail in a workspace but does not apply it to that workspace’s traffic. To restrict all traffic in a workspace, update the workspace’s default guardrail instead. Set allowed_data_regions to enforce In-Region Routing: governed requests must arrive through one of the listed OpenRouter domains and are rejected with a 403 otherwise. Management key required.
POST
/
guardrails
Create a guardrail
curl --request POST \ --url https://nemonist.com/api/v1/guardrails \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "allowed_data_regions": [ "europe" ], "allowed_models": null, "allowed_providers": [ "openai", "anthropic", "deepseek" ], "description": "A guardrail for limiting API usage", "enforce_zdr_anthropic": true, "enforce_zdr_google": false, "enforce_zdr_openai": true, "enforce_zdr_other": false, "enforce_zdr_xai": false, "ignored_models": null, "ignored_providers": null, "limit_usd": 50, "name": "My New Guardrail", "reset_interval": "monthly"}'
A Nemonist key (sk-nm-...) as a bearer token in the Authorization header.
Headers
HTTP-Referer
string
The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
X-OpenRouter-Title
string
The app display name allows you to customize how your app appears in OpenRouter's dashboard.
X-OpenRouter-Categories
string
Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
Body
application/json
name
string
required
Name for the new guardrail
Required string length: 1 - 200
Example:
"My New Guardrail"
allow_safety_retention_google
boolean | null
Whether ZDR-only requests to google/* models may also use Safety Retention endpoints, which may retain prompts and responses from any request, only to prevent abuse, and do not use them for training. false allows only ZDR endpoints. A guardrail can only be more restrictive than the account setting. Inherits the account setting when not provided.
Example:
true
allow_safety_retention_other
boolean | null
Whether ZDR-only requests to models outside the named providers (for example open-weight models on Vertex) may also use Safety Retention endpoints, which may retain prompts and responses from any request, only to prevent abuse, and do not use them for training. false allows only ZDR endpoints. A guardrail can only be more restrictive than the account setting. Inherits the account setting when not provided.
Example:
true
allowed_data_regions
enum<string>[] | null
Data regions through which requests governed by this guardrail must arrive. global is https://openrouter.ai, europe is https://eu.openrouter.ai, and us is https://us.openrouter.ai. Requests arriving through any other region are rejected. null leaves the ingress region unrestricted. When several guardrails apply (workspace default, member, API key), the effective regions are the intersection of every non-null value. An empty array is rejected.
Whether this guardrail allows free endpoints that publish prompts.
Example:
false
enable_free_model_training
boolean | null
Whether this guardrail allows free endpoints that train on request data.
Example:
true
enable_paid_model_training
boolean | null
Whether this guardrail allows paid endpoints that train on request data.
Example:
true
enforce_first_party_harness_models
boolean | null
Whether coding harnesses list only their vendor's own models: Codex lists OpenAI models and Claude Code and Claude Desktop list Anthropic models. Affects only the model list those harnesses request from GET /models; a model the client names directly is still routed. Any true across the workspace default, member, and API key guardrails applies.
Example:
false
enforce_zdr
boolean | null
deprecated
Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, enforce_zdr_xai, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request.
Example:
false
enforce_zdr_anthropic
boolean | null
Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided.
Example:
false
enforce_zdr_google
boolean | null
Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided.
Example:
false
enforce_zdr_openai
boolean | null
Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided.
Example:
false
enforce_zdr_other
boolean | null
Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, Google, or xAI. Falls back to enforce_zdr when not provided.
Example:
false
enforce_zdr_xai
boolean | null
Whether to enforce zero data retention for xAI models. Falls back to enforce_zdr when not provided.
Example:
false
ignored_models
string[] | null
Array of model identifiers to exclude from routing (slug or canonical_slug accepted)
Minimum array length: 1
Example:
["openai/gpt-4o-mini"]
ignored_providers
string[] | null
List of provider IDs to exclude from routing
Minimum array length: 1
Example:
["azure"]
include_byok_in_budgets
boolean
Whether BYOK (bring-your-own-key) inference spend counts toward this guardrail's limit_usd, in addition to OpenRouter credit spend. Defaults to false.
Example:
false
limit_usd
number<double> | null
Spending limit in USD. Must be provided together with reset_interval: a request that sets only one of the two is rejected with a 400.
Example:
50
reset_interval
enum<string> | null
Interval at which the limit resets (daily, weekly, monthly)
Available options:
daily,
weekly,
monthly,
null
Example:
"monthly"
workspace_id
string
The workspace to create the guardrail in. When omitted, the guardrail is created in the default workspace; if that default has been deleted, the request returns a 400 and you must pass workspace_id explicitly. This only places the guardrail in the workspace; the created guardrail enforces nothing for that workspace's traffic until it is assigned to API keys or members. To restrict all traffic in a workspace, update the workspace's default guardrail instead.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"nemonist","description":"Memory and learning for your coding agent, behind one OpenRouter-compatible URL.","colors":{"primary":"#6366f1","light":"#818cf8","dark":"#4f46e5"},"logo":{"light":"https://mintcdn.com/nemonist/O63iSHDIbHFIFLsR/logo/light.svg?fit=max\u0026auto=format\u0026n=O63iSHDIbHFIFLsR\u0026q=85\u0026s=78e0f2fecc2ad48dcf82fc4287a5dc8d","dark":"https://mintcdn.com/nemonist/O63iSHDIbHFIFLsR/logo/dark.svg?fit=max\u0026auto=format\u0026n=O63iSHDIbHFIFLsR\u0026q=85\u0026s=f51164f7521678900239881a908c13c6","href":"https://nemonist.com/"},"favicon":"https://mintcdn.com/nemonist/O63iSHDIbHFIFLsR/favicon.svg?fit=max\u0026auto=format\u0026n=O63iSHDIbHFIFLsR\u0026q=85\u0026s=b2688a9b65db5595cb13ad19c8f25c5a","api":{"playground":{"display":"interactive"},"examples":{"languages":["curl","python","javascript"]}},"background":{"color":{"light":"#ffffff","dark":"#09090b"}},"navbar":{"links":[{"href":"https://nemonist.com/pricing","label":"Pricing"},{"href":"https://nemonist.com/models","label":"Models"}],"primary":{"type":"button","label":"Sign in","href":"https://nemonist.com/#signin"}},"footer":{"links":[{"header":"nemonist","items":[{"label":"Docs","href":"https://nemonist.com/docs"},{"label":"Pricing","href":"https://nemonist.com/pricing"},{"label":"Models","href":"https://nemonist.com/models"},{"label":"Providers","href":"https://nemonist.com/providers"},{"label":"Status","href":"https://nemonist.com/status"},{"label":"Privacy","href":"https://nemonist.com/privacy"},{"label":"Terms","href":"https://nemonist.com/terms"},{"label":"Support","href":"https://nemonist.com/support"}]}]},"seo":{"metatags":{"canonical":"https://nemonist.com/docs"}},"fonts":{"family":"Inter Variable","source":"https://nemonist.com/docs/fonts/inter.woff2","format":"woff2"},"contextual":{"options":["copy","view","chatgpt","claude","cursor"],"display":"header"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"nemonist","hasAudioNarration":false,"actualSubdomain":"nemonist","customDomains":["nemonist.com"],"gitSource":{"type":"github","owner":"ntwins-internal","repo":"nemonist-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":"","_id":"6adbe103c87e3d756f7d1643"},"entitlements":{"AI_CHAT":{"status":"DISABLED"},"WEB_MCP":{"status":"DISABLED"},"NARRATION":{"status":"DISABLED"}},"buildId":"6afe0e0df413882676535db2","clientVersion":"0.0.4205","searchFilterCounts":[{"language":"default","tag":"API Reference","count":132},{"language":"default","tag":"Folders","count":48},{"language":"default","tag":"Docs","count":21},{"language":"default","tag":"Clients","count":18},{"language":"default","tag":"Workspaces","count":12},{"language":"default","tag":"Concepts","count":10},{"language":"default","tag":"Guardrails","count":9},{"language":"default","tag":"Private Endpoints","count":9},{"language":"default","tag":"Model runs","count":8},{"language":"default","tag":"Enterprise","count":6}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":false,"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":"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},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"nemonist.css","content":"@font-face{font-family:\"JetBrains Mono Variable\";font-style:normal;font-display:swap;font-weight:100 900;src:url(\"https://nemonist.com/docs/fonts/jetbrains-mono.woff2\") format(\"woff2\")}code,pre,kbd,samp{font-family:\"JetBrains Mono Variable\", \"JetBrains Mono\", ui-monospace, SFMono-Regular, Menlo, monospace!important}h1,h2,h3,h4{font-family:\"Inter Tight Variable\", \"Inter Variable\", \"Inter\", ui-sans-serif, system-ui, sans-serif;letter-spacing:-.025em}#navbar img,pre,[class*=\"code-block\"]{box-shadow:none!important;filter:none!important}:root{--nm-bg: #ffffff;--nm-text: #09090b;--nm-text-muted: #71717a;--nm-text-faint: #a1a1aa;--nm-border: #e4e4e7;--nm-surface-hover: #f4f4f5}html.dark{--nm-bg: #09090b;--nm-text: #fafafa;--nm-text-muted: #a1a1aa;--nm-text-faint: #71717a;--nm-border: #27272a;--nm-surface-hover: #1c1c21}#navbar #navbar-transition{background:color-mix(in srgb, var(--nm-bg) 82%, transparent)!important;backdrop-filter:saturate(1.5) blur(12px);border-bottom:1px solid var(--nm-border)!important}#navbar .h-16{height:60px}#navbar .h-16>div{border-bottom:0!important}#navbar .nav-logo.h-7{height:22px!important}#navbar nav a,#navbar .nav-tabs a{font-size:13px;font-weight:500}#topbar-cta-button a{height:36px;padding:0 16px!important;border-radius:8px;font-size:13px;font-weight:500}#topbar-cta-button a>span:first-child{background:transparent!important;border-radius:inherit;transition:background var(--transition, 120ms ease)}#topbar-cta-button a:hover>span:first-child{background:var(--nm-surface-hover)!important}#topbar-cta-button a,#topbar-cta-button a .text-white,#topbar-cta-button a svg{color:var(--nm-text-muted)!important}#topbar-cta-button a:hover .text-white{color:var(--nm-text)!important}#topbar-cta-button a svg{display:none}html.nm-signed-in #topbar-cta-button a>span:first-child{background:var(--nm-text)!important}html.nm-signed-in #topbar-cta-button a,html.nm-signed-in #topbar-cta-button a .text-white{color:var(--nm-bg)!important}html.nm-signed-in #topbar-cta-button a:hover>span:first-child{background:var(--nm-text)!important;opacity:.85}#navbar nav:has(#topbar-cta-button),#navbar nav:has(#topbar-cta-button)>ul{display:contents}#navbar div:has(>#theme-preference-menu-trigger){order:1;margin-left:24px}#topbar-cta-button{order:2;margin-left:8px!important}#search-bar-entry,#assistant-entry{border-radius:8px!important}#footer{border-top:1px solid var(--nm-border)!important;font-size:13px;color:var(--nm-text-faint)}#footer>div{max-width:1120px!important;padding:24px 24px!important;gap:0!important}#footer>div>div:first-child{flex-direction:row!important;align-items:center}#footer>div>div:first-child>div:first-child{min-width:0!important;gap:0!important;flex-direction:row!important;align-items:center!important}#footer .nav-logo{height:18px!important}#footer>div>div:first-child>div:first-child::after{content:\"\\00a9 2026 nTwins, Inc.\";margin-left:12px;white-space:nowrap}#footer>div>div:first-child>div:last-child>div>div{flex-direction:row!important;justify-content:flex-start!important;flex-wrap:wrap;gap:8px 24px!important}#footer>div>div:first-child{flex-wrap:wrap;gap:16px!important}#footer>div>div:first-child>div:last-child{flex:0 1 auto!important;max-width:100%!important;display:flex!important}#footer a.text-sm{font-size:13px!important;color:var(--nm-text-muted)!important}#footer a.text-sm:hover{color:var(--nm-text)!important}#footer>div>div:nth-child(2),#footer>div>div:nth-child(3){display:none!important}#page-title{font-size:28px!important;font-weight:640!important;letter-spacing:-.03em!important;line-height:1.15!important}#page-title,#content h2,#content h3,#content h4{color:var(--nm-text)!important}#content{font-size:15px;line-height:1.6}#content h2{font-size:20px;font-weight:600}#content h3{font-size:16px;font-weight:600}#sidebar a{font-size:14px;border-radius:6px!important}#sidebar a[aria-current=page]{background:var(--nm-surface-hover)!important;color:var(--nm-text)!important;font-weight:500;text-shadow:none!important}"}],"page":{"pagePath":"api-reference/guardrails/create-a-guardrail","slug":"/api-reference/guardrails/create-a-guardrail","pageMetadata":{"title":"Create a guardrail","description":"Create a new guardrail for the authenticated user. A newly created guardrail enforces nothing until it is assigned to API keys or organization members; `workspace_id` places the guardrail in a workspace but does not apply it to that workspace's traffic. To restrict all traffic in a workspace, update the workspace's default guardrail instead. Set `allowed_data_regions` to enforce [In-Region Routing](/docs/guides/features/in-region-routing#enforcing-in-region-routing-with-guardrails): governed requests must arrive through one of the listed OpenRouter domains and are rejected with a 403 otherwise. [Management key](/docs/guides/overview/auth/management-api-keys) required.","deprecated":null,"version":null,"openapi":"/openapi.json post /guardrails","href":"/api-reference/guardrails/create-a-guardrail","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n a: \"a\",\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_components.p, {\n children: [\"Create a new guardrail for the authenticated user. A newly created guardrail enforces nothing until it is assigned to API keys or organization members; \", _jsx(_components.code, {\n children: \"workspace_id\"\n }), \" places the guardrail in a workspace but does not apply it to that workspace’s traffic. To restrict all traffic in a workspace, update the workspace’s default guardrail instead. Set \", _jsx(_components.code, {\n children: \"allowed_data_regions\"\n }), \" to enforce \", _jsx(_components.a, {\n href: \"/docs/guides/features/in-region-routing#enforcing-in-region-routing-with-guardrails\",\n children: \"In-Region Routing\"\n }), \": governed requests must arrive through one of the listed OpenRouter domains and are rejected with a 403 otherwise. \", _jsx(_components.a, {\n href: \"/docs/guides/overview/auth/management-api-keys\",\n children: \"Management key\"\n }), \" required.\"]\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}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create a guardrail","description":"Create a new guardrail for the authenticated user. A newly created guardrail enforces nothing until it is assigned to API keys or organization members; `workspace_id` places the guardrail in a workspace but does not apply it to that workspace's traffic. To restrict all traffic in a workspace, update the workspace's default guardrail instead. Set `allowed_data_regions` to enforce [In-Region Routing](/docs/guides/features/in-region-routing#enforcing-in-region-routing-with-guardrails): governed requests must arrive through one of the listed OpenRouter domains and are rejected with a 403 otherwise. [Management key](/docs/guides/overview/auth/management-api-keys) required.","deprecated":null,"version":null,"openapi":"/openapi.json post /guardrails","href":"/api-reference/guardrails/create-a-guardrail","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/nemonist/5b5d33ba16a44814/nemonist.js"],"openApiReferenceData":{"operation":{"description":"Create a new guardrail for the authenticated user. A newly created guardrail enforces nothing until it is assigned to API keys or organization members; `workspace_id` places the guardrail in a workspace but does not apply it to that workspace's traffic. To restrict all traffic in a workspace, update the workspace's default guardrail instead. Set `allowed_data_regions` to enforce [In-Region Routing](/docs/guides/features/in-region-routing#enforcing-in-region-routing-with-guardrails): governed requests must arrive through one of the listed OpenRouter domains and are rejected with a 403 otherwise. [Management key](/docs/guides/overview/auth/management-api-keys) required.","operationId":"createGuardrail","requestBody":"029aceb7-6387-4ef4-bae8-49bbab40229a","responses":{"201":"357063ff-8721-4622-990e-cf1660ae62e3","400":"85a91e91-0974-4616-8942-b62d5e33b95e","401":"f270c591-1784-49c7-b603-ad48ed96071e","403":"04bf0477-dced-4cbf-9f0c-44ce1acc3c47","500":"20be6885-954f-4615-8e03-aca2d806e4bf","503":"4cd13f4d-3967-4d50-8bf9-41eb6f790654"},"summary":"Create a guardrail","tags":["Guardrails"],"x-speakeasy-name-override":"create","method":"post","type":"path","servers":["f904a986-b1a7-4390-beb0-f994b9f6d9ad"],"security":["5c64c600-8820-448c-b999-87c9f6ba628f"],"path":"/guardrails","baseUrlOptions":["https://nemonist.com/api/v1"],"title":"Create a guardrail","codeSamples":[],"requestExampleLanguages":["bash","python","javascript"],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"5452d844-3973-4b7e-a76e-d6ebe57a1eb8":{"name":"HTTP-Referer","in":"header","schema":{"type":"string","description":"The app identifier should be your app's URL and is used as the primary identifier for rankings.\nThis is used to track API usage per application.\n","uniqueKey":"","typeLabel":"string"},"description":"The app identifier should be your app's URL and is used as the primary identifier for rankings.\nThis is used to track API usage per application.\n"},"59471f84-9589-41a4-b757-a80655ccc99f":{"name":"X-OpenRouter-Title","in":"header","x-speakeasy-name-override":"appTitle","schema":{"type":"string","description":"The app display name allows you to customize how your app appears in OpenRouter's dashboard.\n","uniqueKey":"","typeLabel":"string"},"description":"The app display name allows you to customize how your app appears in OpenRouter's dashboard.\n"},"b33616f9-4203-49ff-9bce-2a63974a26d4":{"name":"X-OpenRouter-Categories","in":"header","x-speakeasy-name-override":"appCategories","schema":{"type":"string","description":"Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.\n","uniqueKey":"","typeLabel":"string"},"description":"Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.\n"}},"requestBody":{"content":{"application/json":{"example":{"allowed_data_regions":["europe"],"allowed_models":null,"allowed_providers":["openai","anthropic","deepseek"],"description":"A guardrail for limiting API usage","enforce_zdr_anthropic":true,"enforce_zdr_google":false,"enforce_zdr_openai":true,"enforce_zdr_other":false,"enforce_zdr_xai":false,"ignored_models":null,"ignored_providers":null,"limit_usd":50,"name":"My New Guardrail","reset_interval":"monthly"},"schema":{"example":{"allowed_models":null,"allowed_providers":["openai","anthropic","deepseek"],"content_filter_builtins":[{"action":"block","slug":"regex-prompt-injection"}],"content_filters":null,"description":"A guardrail for limiting API usage","enforce_zdr_anthropic":true,"enforce_zdr_google":false,"enforce_zdr_openai":true,"enforce_zdr_other":false,"enforce_zdr_xai":false,"ignored_models":null,"ignored_providers":null,"limit_usd":50,"name":"My New Guardrail","reset_interval":"monthly"},"properties":{"name":{"description":"Name for the new guardrail","example":"My New Guardrail","maxLength":200,"minLength":1,"type":"string","isRequired":true,"uniqueKey":"name","typeLabel":"string"},"allow_safety_retention_google":{"oneOf":[{"description":"Whether ZDR-only requests to google/* models may also use Safety Retention endpoints, which may retain prompts and responses from any request, only to prevent abuse, and do not use them for training. false allows only ZDR endpoints. A guardrail can only be more restrictive than the account setting. Inherits the account setting when not provided.","example":true,"type":"boolean","uniqueKey":"allow_safety_retention_google.oneOf.0","typeLabel":"boolean"},{"description":"Whether ZDR-only requests to google/* models may also use Safety Retention endpoints, which may retain prompts and responses from any request, only to prevent abuse, and do not use them for training. false allows only ZDR endpoints. A guardrail can only be more restrictive than the account setting. Inherits the account setting when not provided.","example":true,"type":"null","uniqueKey":"allow_safety_retention_google.oneOf.1","typeLabel":"null"}],"uniqueKey":"allow_safety_retention_google","typeLabel":"boolean | null"},"allow_safety_retention_other":{"oneOf":[{"description":"Whether ZDR-only requests to models outside the named providers (for example open-weight models on Vertex) may also use Safety Retention endpoints, which may retain prompts and responses from any request, only to prevent abuse, and do not use them for training. false allows only ZDR endpoints. A guardrail can only be more restrictive than the account setting. Inherits the account setting when not provided.","example":true,"type":"boolean","uniqueKey":"allow_safety_retention_other.oneOf.0","typeLabel":"boolean"},{"description":"Whether ZDR-only requests to models outside the named providers (for example open-weight models on Vertex) may also use Safety Retention endpoints, which may retain prompts and responses from any request, only to prevent abuse, and do not use them for training. false allows only ZDR endpoints. A guardrail can only be more restrictive than the account setting. Inherits the account setting when not provided.","example":true,"type":"null","uniqueKey":"allow_safety_retention_other.oneOf.1","typeLabel":"null"}],"uniqueKey":"allow_safety_retention_other","typeLabel":"boolean | null"},"allowed_data_regions":{"oneOf":[{"description":"Data regions through which requests governed by this guardrail must arrive. `global` is https://openrouter.ai, `europe` is https://eu.openrouter.ai, and `us` is https://us.openrouter.ai. Requests arriving through any other region are rejected. `null` leaves the ingress region unrestricted. When several guardrails apply (workspace default, member, API key), the effective regions are the intersection of every non-null value. An empty array is rejected.","example":["europe"],"items":{"description":"An OpenRouter data region: `global` (https://openrouter.ai), `europe` (https://eu.openrouter.ai), or `us` (https://us.openrouter.ai)","enum":["global","europe","us"],"example":"europe","type":"string","x-speakeasy-unknown-values":"allow","uniqueKey":"allowed_data_regions.oneOf.0.items.[INDEX]","typeLabel":"enum\u003cstring>"},"minItems":1,"type":"array","uniqueKey":"allowed_data_regions.oneOf.0","typeLabel":"enum\u003cstring>[]"},{"description":"Data regions through which requests governed by this guardrail must arrive. `global` is https://openrouter.ai, `europe` is https://eu.openrouter.ai, and `us` is https://us.openrouter.ai. Requests arriving through any other region are rejected. `null` leaves the ingress region unrestricted. When several guardrails apply (workspace default, member, API key), the effective regions are the intersection of every non-null value. An empty array is rejected.","example":["europe"],"items":{"description":"An OpenRouter data region: `global` (https://openrouter.ai), `europe` (https://eu.openrouter.ai), or `us` (https://us.openrouter.ai)","enum":["global","europe","us"],"example":"europe","type":"string","x-speakeasy-unknown-values":"allow"},"minItems":1,"type":"null","uniqueKey":"allowed_data_regions.oneOf.1","typeLabel":"null"}],"uniqueKey":"allowed_data_regions","typeLabel":"enum\u003cstring>[] | null"},"allowed_models":{"oneOf":[{"description":"Array of model identifiers (slug or canonical_slug accepted)","example":["openai/gpt-5.2","anthropic/claude-4.5-opus-20251124","deepseek/deepseek-r1-0528:free"],"items":{"type":"string","uniqueKey":"allowed_models.oneOf.0.items.[INDEX]","typeLabel":"string"},"minItems":1,"type":"array","uniqueKey":"allowed_models.oneOf.0","typeLabel":"string[]"},{"description":"Array of model identifiers (slug or canonical_slug accepted)","example":["openai/gpt-5.2","anthropic/claude-4.5-opus-20251124","deepseek/deepseek-r1-0528:free"],"items":{"type":"string"},"minItems":1,"type":"null","uniqueKey":"allowed_models.oneOf.1","typeLabel":"null"}],"uniqueKey":"allowed_models","typeLabel":"string[] | null"},"allowed_providers":{"oneOf":[{"description":"List of allowed provider IDs","example":["openai","anthropic","deepseek"],"items":{"type":"string","uniqueKey":"allowed_providers.oneOf.0.items.[INDEX]","typeLabel":"string"},"minItems":1,"type":"array","uniqueKey":"allowed_providers.oneOf.0","typeLabel":"string[]"},{"description":"List of allowed provider IDs","example":["openai","anthropic","deepseek"],"items":{"type":"string"},"minItems":1,"type":"null","uniqueKey":"allowed_providers.oneOf.1","typeLabel":"null"}],"uniqueKey":"allowed_providers","typeLabel":"string[] | null"},"content_filter_builtins":{"oneOf":[{"description":"Builtin content filters to apply. Every builtin slug supports \"block\", \"redact\", and the detect-only \"flag\" action.","example":[{"action":"block","slug":"regex-prompt-injection"}],"items":{"description":"A builtin content filter entry for create/update requests. Labels are system-assigned and cannot be set by the caller.","example":{"action":"redact","slug":"email"},"properties":{"action":{"description":"Action taken when the builtin filter triggers","enum":["redact","block","flag"],"example":"block","type":"string","x-speakeasy-unknown-values":"allow","isRequired":true,"uniqueKey":"content_filter_builtins.oneOf.0.items.[INDEX].action","typeLabel":"enum\u003cstring>"},"slug":{"description":"The builtin filter identifier","enum":["email","phone","ssn","credit-card","ip-address","secrets","person-name","address","regex-prompt-injection"],"example":"regex-prompt-injection","type":"string","x-speakeasy-unknown-values":"allow","isRequired":true,"uniqueKey":"content_filter_builtins.oneOf.0.items.[INDEX].slug","typeLabel":"enum\u003cstring>"},"label":{"deprecated":true,"description":"Deprecated: labels are system-assigned and cannot be set by the caller. Accepted for backward compatibility but silently ignored.","maxLength":100,"type":"string","uniqueKey":"content_filter_builtins.oneOf.0.items.[INDEX].label","typeLabel":"string"},"scan_scope":{"description":"Which message roles to scan for prompt injection. Only applies to the regex-prompt-injection builtin. Defaults to all_messages.","enum":["user_only","all_messages"],"example":"user_only","type":"string","x-speakeasy-unknown-values":"allow","uniqueKey":"content_filter_builtins.oneOf.0.items.[INDEX].scan_scope","typeLabel":"enum\u003cstring>"}},"required":["slug","action"],"type":"object","uniqueKey":"content_filter_builtins.oneOf.0.items.[INDEX]","typeLabel":"object"},"type":"array","uniqueKey":"content_filter_builtins.oneOf.0","typeLabel":"object[]"},{"description":"Builtin content filters to apply. Every builtin slug supports \"block\", \"redact\", and the detect-only \"flag\" action.","example":[{"action":"block","slug":"regex-prompt-injection"}],"items":{"description":"A builtin content filter entry for create/update requests. Labels are system-assigned and cannot be set by the caller.","example":{"action":"redact","slug":"email"},"properties":{"action":{"description":"Action taken when the builtin filter triggers","enum":["redact","block","flag"],"example":"block","type":"string","x-speakeasy-unknown-values":"allow"},"label":{"deprecated":true,"description":"Deprecated: labels are system-assigned and cannot be set by the caller. Accepted for backward compatibility but silently ignored.","maxLength":100,"type":"string"},"scan_scope":{"description":"Which message roles to scan for prompt injection. Only applies to the regex-prompt-injection builtin. Defaults to all_messages.","enum":["user_only","all_messages"],"example":"user_only","type":"string","x-speakeasy-unknown-values":"allow"},"slug":{"description":"The builtin filter identifier","enum":["email","phone","ssn","credit-card","ip-address","secrets","person-name","address","regex-prompt-injection"],"example":"regex-prompt-injection","type":"string","x-speakeasy-unknown-values":"allow"}},"required":["slug","action"],"type":"object"},"type":"null","uniqueKey":"content_filter_builtins.oneOf.1","typeLabel":"null"}],"uniqueKey":"content_filter_builtins","typeLabel":"object[] | null"},"content_filters":{"oneOf":[{"description":"Custom regex content filters to apply to request messages","example":[{"action":"redact","label":"[API_KEY]","pattern":"\\b(sk-[a-zA-Z0-9]{48})\\b"}],"items":{"description":"A custom regex content filter that scans request messages for matching patterns.","example":{"action":"redact","label":"[API_KEY]","pattern":"\\b(sk-[a-zA-Z0-9]{48})\\b"},"properties":{"action":{"description":"Action taken when the pattern matches","enum":["redact","block","flag"],"example":"block","type":"string","x-speakeasy-unknown-values":"allow","isRequired":true,"uniqueKey":"content_filters.oneOf.0.items.[INDEX].action","typeLabel":"enum\u003cstring>"},"pattern":{"description":"A regex pattern to match against request content","example":"\\b(sk-[a-zA-Z0-9]{48})\\b","minLength":1,"type":"string","isRequired":true,"uniqueKey":"content_filters.oneOf.0.items.[INDEX].pattern","typeLabel":"string"},"label":{"oneOf":[{"description":"Optional label used in redaction placeholders or error messages","example":"[API_KEY]","maxLength":100,"type":"string","uniqueKey":"content_filters.oneOf.0.items.[INDEX].label.oneOf.0","typeLabel":"string"},{"description":"Optional label used in redaction placeholders or error messages","example":"[API_KEY]","maxLength":100,"type":"null","uniqueKey":"content_filters.oneOf.0.items.[INDEX].label.oneOf.1","typeLabel":"null"}],"uniqueKey":"content_filters.oneOf.0.items.[INDEX].label","typeLabel":"string | null"}},"required":["pattern","action"],"type":"object","uniqueKey":"content_filters.oneOf.0.items.[INDEX]","typeLabel":"object"},"type":"array","uniqueKey":"content_filters.oneOf.0","typeLabel":"object[]"},{"description":"Custom regex content filters to apply to request messages","example":[{"action":"redact","label":"[API_KEY]","pattern":"\\b(sk-[a-zA-Z0-9]{48})\\b"}],"items":{"description":"A custom regex content filter that scans request messages for matching patterns.","example":{"action":"redact","label":"[API_KEY]","pattern":"\\b(sk-[a-zA-Z0-9]{48})\\b"},"properties":{"action":{"description":"Action taken when the pattern matches","enum":["redact","block","flag"],"example":"block","type":"string","x-speakeasy-unknown-values":"allow"},"label":{"oneOf":[{"description":"Optional label used in redaction placeholders or error messages","example":"[API_KEY]","maxLength":100,"type":"string"},{"description":"Optional label used in redaction placeholders or error messages","example":"[API_KEY]","maxLength":100,"type":"null"}]},"pattern":{"description":"A regex pattern to match against request content","example":"\\b(sk-[a-zA-Z0-9]{48})\\b","minLength":1,"type":"string"}},"required":["pattern","action"],"type":"object"},"type":"null","uniqueKey":"content_filters.oneOf.1","typeLabel":"null"}],"uniqueKey":"content_filters","typeLabel":"object[] | null"},"description":{"oneOf":[{"description":"Description of the guardrail","example":"A guardrail for limiting API usage","maxLength":1000,"type":"string","uniqueKey":"description.oneOf.0","typeLabel":"string"},{"description":"Description of the guardrail","example":"A guardrail for limiting API usage","maxLength":1000,"type":"null","uniqueKey":"description.oneOf.1","typeLabel":"null"}],"uniqueKey":"description","typeLabel":"string | null"},"enable_free_model_publication":{"oneOf":[{"description":"Whether this guardrail allows free endpoints that publish prompts.","example":false,"type":"boolean","uniqueKey":"enable_free_model_publication.oneOf.0","typeLabel":"boolean"},{"description":"Whether this guardrail allows free endpoints that publish prompts.","example":false,"type":"null","uniqueKey":"enable_free_model_publication.oneOf.1","typeLabel":"null"}],"uniqueKey":"enable_free_model_publication","typeLabel":"boolean | null"},"enable_free_model_training":{"oneOf":[{"description":"Whether this guardrail allows free endpoints that train on request data.","example":true,"type":"boolean","uniqueKey":"enable_free_model_training.oneOf.0","typeLabel":"boolean"},{"description":"Whether this guardrail allows free endpoints that train on request data.","example":true,"type":"null","uniqueKey":"enable_free_model_training.oneOf.1","typeLabel":"null"}],"uniqueKey":"enable_free_model_training","typeLabel":"boolean | null"},"enable_paid_model_training":{"oneOf":[{"description":"Whether this guardrail allows paid endpoints that train on request data.","example":true,"type":"boolean","uniqueKey":"enable_paid_model_training.oneOf.0","typeLabel":"boolean"},{"description":"Whether this guardrail allows paid endpoints that train on request data.","example":true,"type":"null","uniqueKey":"enable_paid_model_training.oneOf.1","typeLabel":"null"}],"uniqueKey":"enable_paid_model_training","typeLabel":"boolean | null"},"enforce_first_party_harness_models":{"oneOf":[{"description":"Whether coding harnesses list only their vendor's own models: Codex lists OpenAI models and Claude Code and Claude Desktop list Anthropic models. Affects only the model list those harnesses request from GET /models; a model the client names directly is still routed. Any true across the workspace default, member, and API key guardrails applies.","example":false,"type":"boolean","uniqueKey":"enforce_first_party_harness_models.oneOf.0","typeLabel":"boolean"},{"description":"Whether coding harnesses list only their vendor's own models: Codex lists OpenAI models and Claude Code and Claude Desktop list Anthropic models. Affects only the model list those harnesses request from GET /models; a model the client names directly is still routed. Any true across the workspace default, member, and API key guardrails applies.","example":false,"type":"null","uniqueKey":"enforce_first_party_harness_models.oneOf.1","typeLabel":"null"}],"uniqueKey":"enforce_first_party_harness_models","typeLabel":"boolean | null"},"enforce_zdr":{"oneOf":[{"deprecated":true,"description":"Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, enforce_zdr_xai, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request.","example":false,"type":"boolean","uniqueKey":"enforce_zdr.oneOf.0","typeLabel":"boolean"},{"deprecated":true,"description":"Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, enforce_zdr_xai, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request.","example":false,"type":"null","uniqueKey":"enforce_zdr.oneOf.1","typeLabel":"null"}],"uniqueKey":"enforce_zdr","typeLabel":"boolean | null"},"enforce_zdr_anthropic":{"oneOf":[{"description":"Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided.","example":false,"type":"boolean","uniqueKey":"enforce_zdr_anthropic.oneOf.0","typeLabel":"boolean"},{"description":"Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided.","example":false,"type":"null","uniqueKey":"enforce_zdr_anthropic.oneOf.1","typeLabel":"null"}],"uniqueKey":"enforce_zdr_anthropic","typeLabel":"boolean | null"},"enforce_zdr_google":{"oneOf":[{"description":"Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided.","example":false,"type":"boolean","uniqueKey":"enforce_zdr_google.oneOf.0","typeLabel":"boolean"},{"description":"Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided.","example":false,"type":"null","uniqueKey":"enforce_zdr_google.oneOf.1","typeLabel":"null"}],"uniqueKey":"enforce_zdr_google","typeLabel":"boolean | null"},"enforce_zdr_openai":{"oneOf":[{"description":"Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided.","example":false,"type":"boolean","uniqueKey":"enforce_zdr_openai.oneOf.0","typeLabel":"boolean"},{"description":"Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided.","example":false,"type":"null","uniqueKey":"enforce_zdr_openai.oneOf.1","typeLabel":"null"}],"uniqueKey":"enforce_zdr_openai","typeLabel":"boolean | null"},"enforce_zdr_other":{"oneOf":[{"description":"Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, Google, or xAI. Falls back to enforce_zdr when not provided.","example":false,"type":"boolean","uniqueKey":"enforce_zdr_other.oneOf.0","typeLabel":"boolean"},{"description":"Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, Google, or xAI. Falls back to enforce_zdr when not provided.","example":false,"type":"null","uniqueKey":"enforce_zdr_other.oneOf.1","typeLabel":"null"}],"uniqueKey":"enforce_zdr_other","typeLabel":"boolean | null"},"enforce_zdr_xai":{"oneOf":[{"description":"Whether to enforce zero data retention for xAI models. Falls back to enforce_zdr when not provided.","example":false,"type":"boolean","uniqueKey":"enforce_zdr_xai.oneOf.0","typeLabel":"boolean"},{"description":"Whether to enforce zero data retention for xAI models. Falls back to enforce_zdr when not provided.","example":false,"type":"null","uniqueKey":"enforce_zdr_xai.oneOf.1","typeLabel":"null"}],"uniqueKey":"enforce_zdr_xai","typeLabel":"boolean | null"},"ignored_models":{"oneOf":[{"description":"Array of model identifiers to exclude from routing (slug or canonical_slug accepted)","example":["openai/gpt-4o-mini"],"items":{"type":"string","uniqueKey":"ignored_models.oneOf.0.items.[INDEX]","typeLabel":"string"},"minItems":1,"type":"array","uniqueKey":"ignored_models.oneOf.0","typeLabel":"string[]"},{"description":"Array of model identifiers to exclude from routing (slug or canonical_slug accepted)","example":["openai/gpt-4o-mini"],"items":{"type":"string"},"minItems":1,"type":"null","uniqueKey":"ignored_models.oneOf.1","typeLabel":"null"}],"uniqueKey":"ignored_models","typeLabel":"string[] | null"},"ignored_providers":{"oneOf":[{"description":"List of provider IDs to exclude from routing","example":["azure"],"items":{"type":"string","uniqueKey":"ignored_providers.oneOf.0.items.[INDEX]","typeLabel":"string"},"minItems":1,"type":"array","uniqueKey":"ignored_providers.oneOf.0","typeLabel":"string[]"},{"description":"List of provider IDs to exclude from routing","example":["azure"],"items":{"type":"string"},"minItems":1,"type":"null","uniqueKey":"ignored_providers.oneOf.1","typeLabel":"null"}],"uniqueKey":"ignored_providers","typeLabel":"string[] | null"},"include_byok_in_budgets":{"description":"Whether BYOK (bring-your-own-key) inference spend counts toward this guardrail's limit_usd, in addition to OpenRouter credit spend. Defaults to false.","example":false,"type":"boolean","uniqueKey":"include_byok_in_budgets","typeLabel":"boolean"},"limit_usd":{"oneOf":[{"description":"Spending limit in USD. Must be provided together with `reset_interval`: a request that sets only one of the two is rejected with a 400.","example":50,"format":"double","type":"number","uniqueKey":"limit_usd.oneOf.0","typeLabel":"number\u003cdouble>"},{"description":"Spending limit in USD. Must be provided together with `reset_interval`: a request that sets only one of the two is rejected with a 400.","example":50,"format":"double","type":"null","uniqueKey":"limit_usd.oneOf.1","typeLabel":"null"}],"uniqueKey":"limit_usd","typeLabel":"number\u003cdouble> | null"},"reset_interval":{"oneOf":[{"description":"Interval at which the limit resets (daily, weekly, monthly)","enum":["daily","weekly","monthly",null],"example":"monthly","type":"string","x-speakeasy-unknown-values":"allow","uniqueKey":"reset_interval.oneOf.0","typeLabel":"enum\u003cstring>"},{"description":"Interval at which the limit resets (daily, weekly, monthly)","enum":["daily","weekly","monthly",null],"example":"monthly","type":"null","x-speakeasy-unknown-values":"allow","uniqueKey":"reset_interval.oneOf.1","typeLabel":"null"}],"uniqueKey":"reset_interval","typeLabel":"enum\u003cstring> | null"},"workspace_id":{"description":"The workspace to create the guardrail in. When omitted, the guardrail is created in the default workspace; if that default has been deleted, the request returns a 400 and you must pass `workspace_id` explicitly. This only places the guardrail in the workspace; the created guardrail enforces nothing for that workspace's traffic until it is assigned to API keys or members. To restrict all traffic in a workspace, update the workspace's default guardrail instead.","type":"string","uniqueKey":"workspace_id","typeLabel":"string"}},"required":["name"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"allowed_data_regions":["europe"],"allowed_models":null,"allowed_providers":["openai","anthropic","deepseek"],"description":"A guardrail for limiting API usage","enforce_zdr_anthropic":true,"enforce_zdr_google":false,"enforce_zdr_openai":true,"enforce_zdr_other":false,"enforce_zdr_xai":false,"ignored_models":null,"ignored_providers":null,"limit_usd":50,"name":"My New Guardrail","reset_interval":"monthly"}}},"exampleType":"examples"}},"required":true,"exampleType":"examples"},"responses":{"357063ff-8721-4622-990e-cf1660ae62e3":{"content":{"application/json":{"example":{"data":{"allowed_models":null,"allowed_providers":["openai","anthropic","google"],"created_at":"2025-08-24T10:30:00Z","description":"A guardrail for limiting API usage","enforce_zdr":null,"enforce_zdr_anthropic":true,"enforce_zdr_google":false,"enforce_zdr_openai":true,"enforce_zdr_other":false,"enforce_zdr_xai":false,"id":"550e8400-e29b-41d4-a716-446655440000","ignored_models":null,"ignored_providers":null,"include_byok_in_budgets":false,"limit_usd":50,"name":"My New Guardrail","reset_interval":"monthly","updated_at":null,"workspace_id":"0df9e665-d932-5740-b2c7-b52af166bc11"}},"schema":{"example":{"data":{"allowed_models":null,"allowed_providers":["openai","anthropic","google"],"content_filter_builtins":[{"action":"redact","label":"[EMAIL]","slug":"email"}],"content_filters":null,"created_at":"2025-08-24T10:30:00Z","description":"A guardrail for limiting API usage","enable_free_model_publication":false,"enable_free_model_training":true,"enable_paid_model_training":true,"enforce_zdr":null,"enforce_zdr_anthropic":true,"enforce_zdr_google":false,"enforce_zdr_openai":true,"enforce_zdr_other":false,"enforce_zdr_xai":false,"id":"550e8400-e29b-41d4-a716-446655440000","ignored_models":null,"ignored_providers":null,"include_byok_in_budgets":false,"limit_usd":50,"name":"My New Guardrail","reset_interval":"monthly","updated_at":null,"workspace_id":"0df9e665-d932-5740-b2c7-b52af166bc11"}},"properties":{"data":{"type":"object","description":"The guardrail just created.","required":["id","name","include_byok_in_budgets","created_at","workspace_id"],"example":{"allowed_data_regions":null,"allowed_models":null,"allowed_providers":["openai","anthropic","google"],"content_filter_builtins":[{"action":"redact","label":"[EMAIL]","slug":"email"}],"content_filters":null,"created_at":"2025-08-24T10:30:00Z","description":"Guardrail for production environment","enable_free_model_publication":false,"enable_free_model_training":true,"enable_paid_model_training":true,"enforce_zdr":null,"enforce_zdr_anthropic":true,"enforce_zdr_google":false,"enforce_zdr_openai":true,"enforce_zdr_other":false,"enforce_zdr_xai":false,"id":"550e8400-e29b-41d4-a716-446655440000","ignored_models":null,"ignored_providers":null,"include_byok_in_budgets":false,"limit_usd":100,"name":"Production Guardrail","reset_interval":"monthly","updated_at":"2025-08-24T15:45:00Z","workspace_id":"0df9e665-d932-5740-b2c7-b52af166bc11"},"properties":{"created_at":{"description":"ISO 8601 timestamp of when the guardrail was created","example":"2025-08-24T10:30:00Z","type":"string","isRequired":true,"uniqueKey":"data.created_at","typeLabel":"string"},"id":{"description":"Unique identifier for the guardrail","type":"string","isRequired":true,"uniqueKey":"data.id","typeLabel":"string"},"include_byok_in_budgets":{"description":"Whether BYOK (bring-your-own-key) inference spend counts toward this guardrail's limit_usd, in addition to OpenRouter credit spend.","example":false,"type":"boolean","isRequired":true,"uniqueKey":"data.include_byok_in_budgets","typeLabel":"boolean"},"name":{"description":"Name of the guardrail","example":"Production Guardrail","type":"string","isRequired":true,"uniqueKey":"data.name","typeLabel":"string"},"workspace_id":{"oneOf":[{"description":"The workspace this guardrail belongs to, or `null` for an unscoped legacy guardrail predating workspaces. Workspace membership organizes the guardrail; it does not apply the guardrail to the workspace's traffic. A `null` value does not mean the default workspace, and does not apply the guardrail across every workspace.","type":"string","isRequired":true,"uniqueKey":"data.workspace_id.oneOf.0","typeLabel":"string"},{"description":"The workspace this guardrail belongs to, or `null` for an unscoped legacy guardrail predating workspaces. Workspace membership organizes the guardrail; it does not apply the guardrail to the workspace's traffic. A `null` value does not mean the default workspace, and does not apply the guardrail across every workspace.","type":"null","isRequired":true,"uniqueKey":"data.workspace_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.workspace_id","typeLabel":"string | null"},"allow_safety_retention_google":{"oneOf":[{"description":"Whether ZDR-only requests to google/* models may also use Safety Retention endpoints, which may retain prompts and responses from any request, only to prevent abuse, and do not use them for training. false allows only ZDR endpoints. A guardrail can only be more restrictive than the account setting. Inherits the account setting when not provided.","example":true,"type":"boolean","uniqueKey":"data.allow_safety_retention_google.oneOf.0","typeLabel":"boolean"},{"description":"Whether ZDR-only requests to google/* models may also use Safety Retention endpoints, which may retain prompts and responses from any request, only to prevent abuse, and do not use them for training. false allows only ZDR endpoints. A guardrail can only be more restrictive than the account setting. Inherits the account setting when not provided.","example":true,"type":"null","uniqueKey":"data.allow_safety_retention_google.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.allow_safety_retention_google","typeLabel":"boolean | null"},"allow_safety_retention_other":{"oneOf":[{"description":"Whether ZDR-only requests to models outside the named providers (for example open-weight models on Vertex) may also use Safety Retention endpoints, which may retain prompts and responses from any request, only to prevent abuse, and do not use them for training. false allows only ZDR endpoints. A guardrail can only be more restrictive than the account setting. Inherits the account setting when not provided.","example":true,"type":"boolean","uniqueKey":"data.allow_safety_retention_other.oneOf.0","typeLabel":"boolean"},{"description":"Whether ZDR-only requests to models outside the named providers (for example open-weight models on Vertex) may also use Safety Retention endpoints, which may retain prompts and responses from any request, only to prevent abuse, and do not use them for training. false allows only ZDR endpoints. A guardrail can only be more restrictive than the account setting. Inherits the account setting when not provided.","example":true,"type":"null","uniqueKey":"data.allow_safety_retention_other.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.allow_safety_retention_other","typeLabel":"boolean | null"},"allowed_data_regions":{"oneOf":[{"description":"Data regions through which requests governed by this guardrail must arrive. `global` is https://openrouter.ai, `europe` is https://eu.openrouter.ai, and `us` is https://us.openrouter.ai. Requests arriving through any other region are rejected. `null` leaves the ingress region unrestricted. When several guardrails apply (workspace default, member, API key), the effective regions are the intersection of every non-null value.","example":["europe"],"items":{"description":"An OpenRouter data region: `global` (https://openrouter.ai), `europe` (https://eu.openrouter.ai), or `us` (https://us.openrouter.ai)","enum":["global","europe","us"],"example":"europe","type":"string","x-speakeasy-unknown-values":"allow","uniqueKey":"data.allowed_data_regions.oneOf.0.items.[INDEX]","typeLabel":"enum\u003cstring>"},"type":"array","uniqueKey":"data.allowed_data_regions.oneOf.0","typeLabel":"enum\u003cstring>[]"},{"description":"Data regions through which requests governed by this guardrail must arrive. `global` is https://openrouter.ai, `europe` is https://eu.openrouter.ai, and `us` is https://us.openrouter.ai. Requests arriving through any other region are rejected. `null` leaves the ingress region unrestricted. When several guardrails apply (workspace default, member, API key), the effective regions are the intersection of every non-null value.","example":["europe"],"items":{"description":"An OpenRouter data region: `global` (https://openrouter.ai), `europe` (https://eu.openrouter.ai), or `us` (https://us.openrouter.ai)","enum":["global","europe","us"],"example":"europe","type":"string","x-speakeasy-unknown-values":"allow"},"type":"null","uniqueKey":"data.allowed_data_regions.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.allowed_data_regions","typeLabel":"enum\u003cstring>[] | null"},"allowed_models":{"oneOf":[{"description":"Array of model canonical_slugs (immutable identifiers)","example":["openai/gpt-5.2-20251211","anthropic/claude-4.5-opus-20251124","deepseek/deepseek-r1-0528:free"],"items":{"type":"string","uniqueKey":"data.allowed_models.oneOf.0.items.[INDEX]","typeLabel":"string"},"type":"array","uniqueKey":"data.allowed_models.oneOf.0","typeLabel":"string[]"},{"description":"Array of model canonical_slugs (immutable identifiers)","example":["openai/gpt-5.2-20251211","anthropic/claude-4.5-opus-20251124","deepseek/deepseek-r1-0528:free"],"items":{"type":"string"},"type":"null","uniqueKey":"data.allowed_models.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.allowed_models","typeLabel":"string[] | null"},"allowed_providers":{"oneOf":[{"description":"List of allowed provider IDs","example":["openai","anthropic","google"],"items":{"type":"string","uniqueKey":"data.allowed_providers.oneOf.0.items.[INDEX]","typeLabel":"string"},"type":"array","uniqueKey":"data.allowed_providers.oneOf.0","typeLabel":"string[]"},{"description":"List of allowed provider IDs","example":["openai","anthropic","google"],"items":{"type":"string"},"type":"null","uniqueKey":"data.allowed_providers.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.allowed_providers","typeLabel":"string[] | null"},"content_filter_builtins":{"oneOf":[{"description":"Builtin content filters applied to requests. Includes PII detectors and the regex-based prompt injection detector.","example":[{"action":"redact","label":"[EMAIL]","slug":"email"}],"items":{"description":"A builtin content filter entry. Builtin filters include PII detectors, API-key and secret detectors, and the regex-based prompt injection detector.","example":{"action":"redact","label":"[EMAIL]","slug":"email"},"properties":{"action":{"description":"Action taken when the builtin filter triggers","enum":["redact","block","flag"],"example":"block","type":"string","x-speakeasy-unknown-values":"allow","isRequired":true,"uniqueKey":"data.content_filter_builtins.oneOf.0.items.[INDEX].action","typeLabel":"enum\u003cstring>"},"slug":{"description":"The builtin filter identifier","enum":["email","phone","ssn","credit-card","ip-address","secrets","person-name","address","regex-prompt-injection"],"example":"regex-prompt-injection","type":"string","x-speakeasy-unknown-values":"allow","isRequired":true,"uniqueKey":"data.content_filter_builtins.oneOf.0.items.[INDEX].slug","typeLabel":"enum\u003cstring>"},"label":{"description":"Read-only, system-assigned redaction placeholder derived from the slug (e.g. \"[EMAIL]\", \"[PHONE]\"). Not settable by the caller.","example":"[EMAIL]","maxLength":100,"type":"string","uniqueKey":"data.content_filter_builtins.oneOf.0.items.[INDEX].label","typeLabel":"string"},"scan_scope":{"description":"Which message roles to scan for prompt injection. Only applies to the regex-prompt-injection builtin. Defaults to all_messages.","enum":["user_only","all_messages"],"example":"user_only","type":"string","x-speakeasy-unknown-values":"allow","uniqueKey":"data.content_filter_builtins.oneOf.0.items.[INDEX].scan_scope","typeLabel":"enum\u003cstring>"}},"required":["slug","action"],"type":"object","uniqueKey":"data.content_filter_builtins.oneOf.0.items.[INDEX]","typeLabel":"object"},"type":"array","uniqueKey":"data.content_filter_builtins.oneOf.0","typeLabel":"object[]"},{"description":"Builtin content filters applied to requests. Includes PII detectors and the regex-based prompt injection detector.","example":[{"action":"redact","label":"[EMAIL]","slug":"email"}],"items":{"description":"A builtin content filter entry. Builtin filters include PII detectors, API-key and secret detectors, and the regex-based prompt injection detector.","example":{"action":"redact","label":"[EMAIL]","slug":"email"},"properties":{"action":{"description":"Action taken when the builtin filter triggers","enum":["redact","block","flag"],"example":"block","type":"string","x-speakeasy-unknown-values":"allow"},"label":{"description":"Read-only, system-assigned redaction placeholder derived from the slug (e.g. \"[EMAIL]\", \"[PHONE]\"). Not settable by the caller.","example":"[EMAIL]","maxLength":100,"type":"string"},"scan_scope":{"description":"Which message roles to scan for prompt injection. Only applies to the regex-prompt-injection builtin. Defaults to all_messages.","enum":["user_only","all_messages"],"example":"user_only","type":"string","x-speakeasy-unknown-values":"allow"},"slug":{"description":"The builtin filter identifier","enum":["email","phone","ssn","credit-card","ip-address","secrets","person-name","address","regex-prompt-injection"],"example":"regex-prompt-injection","type":"string","x-speakeasy-unknown-values":"allow"}},"required":["slug","action"],"type":"object"},"type":"null","uniqueKey":"data.content_filter_builtins.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.content_filter_builtins","typeLabel":"object[] | null"},"content_filters":{"oneOf":[{"description":"Custom regex content filters applied to request messages","example":[{"action":"redact","label":"[API_KEY]","pattern":"\\b(sk-[a-zA-Z0-9]{48})\\b"}],"items":{"description":"A custom regex content filter that scans request messages for matching patterns.","example":{"action":"redact","label":"[API_KEY]","pattern":"\\b(sk-[a-zA-Z0-9]{48})\\b"},"properties":{"action":{"description":"Action taken when the pattern matches","enum":["redact","block","flag"],"example":"block","type":"string","x-speakeasy-unknown-values":"allow","isRequired":true,"uniqueKey":"data.content_filters.oneOf.0.items.[INDEX].action","typeLabel":"enum\u003cstring>"},"pattern":{"description":"A regex pattern to match against request content","example":"\\b(sk-[a-zA-Z0-9]{48})\\b","minLength":1,"type":"string","isRequired":true,"uniqueKey":"data.content_filters.oneOf.0.items.[INDEX].pattern","typeLabel":"string"},"label":{"oneOf":[{"description":"Optional label used in redaction placeholders or error messages","example":"[API_KEY]","maxLength":100,"type":"string","uniqueKey":"data.content_filters.oneOf.0.items.[INDEX].label.oneOf.0","typeLabel":"string"},{"description":"Optional label used in redaction placeholders or error messages","example":"[API_KEY]","maxLength":100,"type":"null","uniqueKey":"data.content_filters.oneOf.0.items.[INDEX].label.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.content_filters.oneOf.0.items.[INDEX].label","typeLabel":"string | null"}},"required":["pattern","action"],"type":"object","uniqueKey":"data.content_filters.oneOf.0.items.[INDEX]","typeLabel":"object"},"type":"array","uniqueKey":"data.content_filters.oneOf.0","typeLabel":"object[]"},{"description":"Custom regex content filters applied to request messages","example":[{"action":"redact","label":"[API_KEY]","pattern":"\\b(sk-[a-zA-Z0-9]{48})\\b"}],"items":{"description":"A custom regex content filter that scans request messages for matching patterns.","example":{"action":"redact","label":"[API_KEY]","pattern":"\\b(sk-[a-zA-Z0-9]{48})\\b"},"properties":{"action":{"description":"Action taken when the pattern matches","enum":["redact","block","flag"],"example":"block","type":"string","x-speakeasy-unknown-values":"allow"},"label":{"oneOf":[{"description":"Optional label used in redaction placeholders or error messages","example":"[API_KEY]","maxLength":100,"type":"string"},{"description":"Optional label used in redaction placeholders or error messages","example":"[API_KEY]","maxLength":100,"type":"null"}]},"pattern":{"description":"A regex pattern to match against request content","example":"\\b(sk-[a-zA-Z0-9]{48})\\b","minLength":1,"type":"string"}},"required":["pattern","action"],"type":"object"},"type":"null","uniqueKey":"data.content_filters.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.content_filters","typeLabel":"object[] | null"},"description":{"oneOf":[{"description":"Description of the guardrail","example":"Guardrail for production environment","type":"string","uniqueKey":"data.description.oneOf.0","typeLabel":"string"},{"description":"Description of the guardrail","example":"Guardrail for production environment","type":"null","uniqueKey":"data.description.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.description","typeLabel":"string | null"},"enable_free_model_publication":{"oneOf":[{"description":"Whether this guardrail allows free endpoints that publish prompts.","example":false,"type":"boolean","uniqueKey":"data.enable_free_model_publication.oneOf.0","typeLabel":"boolean"},{"description":"Whether this guardrail allows free endpoints that publish prompts.","example":false,"type":"null","uniqueKey":"data.enable_free_model_publication.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.enable_free_model_publication","typeLabel":"boolean | null"},"enable_free_model_training":{"oneOf":[{"description":"Whether this guardrail allows free endpoints that train on request data.","example":true,"type":"boolean","uniqueKey":"data.enable_free_model_training.oneOf.0","typeLabel":"boolean"},{"description":"Whether this guardrail allows free endpoints that train on request data.","example":true,"type":"null","uniqueKey":"data.enable_free_model_training.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.enable_free_model_training","typeLabel":"boolean | null"},"enable_paid_model_training":{"oneOf":[{"description":"Whether this guardrail allows paid endpoints that train on request data.","example":true,"type":"boolean","uniqueKey":"data.enable_paid_model_training.oneOf.0","typeLabel":"boolean"},{"description":"Whether this guardrail allows paid endpoints that train on request data.","example":true,"type":"null","uniqueKey":"data.enable_paid_model_training.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.enable_paid_model_training","typeLabel":"boolean | null"},"enforce_first_party_harness_models":{"oneOf":[{"description":"Whether coding harnesses list only their vendor's own models: Codex lists OpenAI models and Claude Code and Claude Desktop list Anthropic models. Affects only the model list those harnesses request from GET /models; a model the client names directly is still routed. Any true across the workspace default, member, and API key guardrails applies.","example":false,"type":"boolean","uniqueKey":"data.enforce_first_party_harness_models.oneOf.0","typeLabel":"boolean"},{"description":"Whether coding harnesses list only their vendor's own models: Codex lists OpenAI models and Claude Code and Claude Desktop list Anthropic models. Affects only the model list those harnesses request from GET /models; a model the client names directly is still routed. Any true across the workspace default, member, and API key guardrails applies.","example":false,"type":"null","uniqueKey":"data.enforce_first_party_harness_models.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.enforce_first_party_harness_models","typeLabel":"boolean | null"},"enforce_zdr":{"oneOf":[{"deprecated":true,"description":"Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, enforce_zdr_xai, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request.","example":false,"type":"boolean","uniqueKey":"data.enforce_zdr.oneOf.0","typeLabel":"boolean"},{"deprecated":true,"description":"Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, enforce_zdr_xai, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request.","example":false,"type":"null","uniqueKey":"data.enforce_zdr.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.enforce_zdr","typeLabel":"boolean | null"},"enforce_zdr_anthropic":{"oneOf":[{"description":"Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided.","example":false,"type":"boolean","uniqueKey":"data.enforce_zdr_anthropic.oneOf.0","typeLabel":"boolean"},{"description":"Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided.","example":false,"type":"null","uniqueKey":"data.enforce_zdr_anthropic.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.enforce_zdr_anthropic","typeLabel":"boolean | null"},"enforce_zdr_google":{"oneOf":[{"description":"Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided.","example":false,"type":"boolean","uniqueKey":"data.enforce_zdr_google.oneOf.0","typeLabel":"boolean"},{"description":"Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided.","example":false,"type":"null","uniqueKey":"data.enforce_zdr_google.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.enforce_zdr_google","typeLabel":"boolean | null"},"enforce_zdr_openai":{"oneOf":[{"description":"Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided.","example":false,"type":"boolean","uniqueKey":"data.enforce_zdr_openai.oneOf.0","typeLabel":"boolean"},{"description":"Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided.","example":false,"type":"null","uniqueKey":"data.enforce_zdr_openai.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.enforce_zdr_openai","typeLabel":"boolean | null"},"enforce_zdr_other":{"oneOf":[{"description":"Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, Google, or xAI. Falls back to enforce_zdr when not provided.","example":false,"type":"boolean","uniqueKey":"data.enforce_zdr_other.oneOf.0","typeLabel":"boolean"},{"description":"Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, Google, or xAI. Falls back to enforce_zdr when not provided.","example":false,"type":"null","uniqueKey":"data.enforce_zdr_other.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.enforce_zdr_other","typeLabel":"boolean | null"},"enforce_zdr_xai":{"oneOf":[{"description":"Whether to enforce zero data retention for xAI models. Falls back to enforce_zdr when not provided.","example":false,"type":"boolean","uniqueKey":"data.enforce_zdr_xai.oneOf.0","typeLabel":"boolean"},{"description":"Whether to enforce zero data retention for xAI models. Falls back to enforce_zdr when not provided.","example":false,"type":"null","uniqueKey":"data.enforce_zdr_xai.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.enforce_zdr_xai","typeLabel":"boolean | null"},"ignored_models":{"oneOf":[{"description":"Array of model canonical_slugs to exclude from routing","example":["openai/gpt-4o-mini-2024-07-18"],"items":{"type":"string","uniqueKey":"data.ignored_models.oneOf.0.items.[INDEX]","typeLabel":"string"},"type":"array","uniqueKey":"data.ignored_models.oneOf.0","typeLabel":"string[]"},{"description":"Array of model canonical_slugs to exclude from routing","example":["openai/gpt-4o-mini-2024-07-18"],"items":{"type":"string"},"type":"null","uniqueKey":"data.ignored_models.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.ignored_models","typeLabel":"string[] | null"},"ignored_providers":{"oneOf":[{"description":"List of provider IDs to exclude from routing","example":["azure"],"items":{"type":"string","uniqueKey":"data.ignored_providers.oneOf.0.items.[INDEX]","typeLabel":"string"},"type":"array","uniqueKey":"data.ignored_providers.oneOf.0","typeLabel":"string[]"},{"description":"List of provider IDs to exclude from routing","example":["azure"],"items":{"type":"string"},"type":"null","uniqueKey":"data.ignored_providers.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.ignored_providers","typeLabel":"string[] | null"},"limit_usd":{"oneOf":[{"description":"Spending limit in USD","example":100,"format":"double","type":"number","uniqueKey":"data.limit_usd.oneOf.0","typeLabel":"number\u003cdouble>"},{"description":"Spending limit in USD","example":100,"format":"double","type":"null","uniqueKey":"data.limit_usd.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.limit_usd","typeLabel":"number\u003cdouble> | null"},"reset_interval":{"oneOf":[{"description":"Interval at which the limit resets (daily, weekly, monthly)","enum":["daily","weekly","monthly",null],"example":"monthly","type":"string","x-speakeasy-unknown-values":"allow","uniqueKey":"data.reset_interval.oneOf.0","typeLabel":"enum\u003cstring>"},{"description":"Interval at which the limit resets (daily, weekly, monthly)","enum":["daily","weekly","monthly",null],"example":"monthly","type":"null","x-speakeasy-unknown-values":"allow","uniqueKey":"data.reset_interval.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.reset_interval","typeLabel":"enum\u003cstring> | null"},"updated_at":{"oneOf":[{"description":"ISO 8601 timestamp of when the guardrail was last updated","example":"2025-08-24T15:45:00Z","type":"string","uniqueKey":"data.updated_at.oneOf.0","typeLabel":"string"},{"description":"ISO 8601 timestamp of when the guardrail was last updated","example":"2025-08-24T15:45:00Z","type":"null","uniqueKey":"data.updated_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.updated_at","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"data","typeLabel":"object"}},"required":["data"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"data":{"allowed_models":null,"allowed_providers":["openai","anthropic","google"],"created_at":"2025-08-24T10:30:00Z","description":"A guardrail for limiting API usage","enforce_zdr":null,"enforce_zdr_anthropic":true,"enforce_zdr_google":false,"enforce_zdr_openai":true,"enforce_zdr_other":false,"enforce_zdr_xai":false,"id":"550e8400-e29b-41d4-a716-446655440000","ignored_models":null,"ignored_providers":null,"include_byok_in_budgets":false,"limit_usd":50,"name":"My New Guardrail","reset_interval":"monthly","updated_at":null,"workspace_id":"0df9e665-d932-5740-b2c7-b52af166bc11"}}}},"exampleType":"examples"}},"description":"Guardrail created successfully","exampleType":"examples"},"85a91e91-0974-4616-8942-b62d5e33b95e":{"content":{"application/json":{"example":{"error":{"code":400,"message":"Invalid request parameters"}},"schema":{"description":"Bad Request - Invalid request parameters or malformed input","example":{"error":{"code":400,"message":"Invalid request parameters"}},"properties":{"error":{"description":"Error data for BadRequestResponse","example":{"code":400,"message":"Invalid request parameters"},"properties":{"code":{"type":"integer","description":"HTTP status of the error, the same as the response's: 400.","isRequired":true,"uniqueKey":"error.code","typeLabel":"integer"},"message":{"type":"string","description":"What went wrong, in words for a person; do not parse it, branch on code instead.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"metadata":{"oneOf":[{"additionalProperties":{"oneOf":[{}],"uniqueKey":"error.metadata.oneOf.0.additionalProperties","typeLabel":"any"},"type":"object","description":"Extra detail about the error.","uniqueKey":"error.metadata.oneOf.0","typeLabel":"object"},{"additionalProperties":{"oneOf":[{}],"uniqueKey":"error.metadata.oneOf.1.additionalProperties","typeLabel":"any"},"type":"null","description":"Extra detail about the error.","uniqueKey":"error.metadata.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.metadata","typeLabel":"object | null"}},"required":["code","message"],"type":"object","isRequired":true,"uniqueKey":"error","typeLabel":"object"},"openrouter_metadata":{"oneOf":[{"additionalProperties":{"oneOf":[{}],"uniqueKey":"openrouter_metadata.oneOf.0.additionalProperties","typeLabel":"any"},"type":"object","description":"OpenRouter's routing detail for the failed request.","uniqueKey":"openrouter_metadata.oneOf.0","typeLabel":"object"},{"additionalProperties":{"oneOf":[{}],"uniqueKey":"openrouter_metadata.oneOf.1.additionalProperties","typeLabel":"any"},"type":"null","description":"OpenRouter's routing detail for the failed request.","uniqueKey":"openrouter_metadata.oneOf.1","typeLabel":"null"}],"uniqueKey":"openrouter_metadata","typeLabel":"object | null"},"user_id":{"oneOf":[{"type":"string","description":"Id of the user who made the request.","uniqueKey":"user_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Id of the user who made the request.","uniqueKey":"user_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"user_id","typeLabel":"string | null"}},"required":["error"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":400,"message":"Invalid request parameters"}}}},"exampleType":"examples"}},"description":"Bad Request - Invalid request parameters or malformed input","exampleType":"examples"},"f270c591-1784-49c7-b603-ad48ed96071e":{"content":{"application/json":{"example":{"error":{"code":401,"message":"Missing Authentication header"}},"schema":{"description":"Unauthorized - Authentication required or invalid credentials","example":{"error":{"code":401,"message":"Missing Authentication header"}},"properties":{"error":{"description":"Error data for UnauthorizedResponse","example":{"code":401,"message":"Missing Authentication header"},"properties":{"code":{"type":"integer","description":"HTTP status of the error, the same as the response's: 401.","isRequired":true,"uniqueKey":"error.code","typeLabel":"integer"},"message":{"type":"string","description":"What went wrong, in words for a person; do not parse it, branch on code instead.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"metadata":{"oneOf":[{"additionalProperties":{"oneOf":[{}],"uniqueKey":"error.metadata.oneOf.0.additionalProperties","typeLabel":"any"},"type":"object","description":"Extra detail about the error.","uniqueKey":"error.metadata.oneOf.0","typeLabel":"object"},{"additionalProperties":{"oneOf":[{}],"uniqueKey":"error.metadata.oneOf.1.additionalProperties","typeLabel":"any"},"type":"null","description":"Extra detail about the error.","uniqueKey":"error.metadata.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.metadata","typeLabel":"object | null"}},"required":["code","message"],"type":"object","isRequired":true,"uniqueKey":"error","typeLabel":"object"},"openrouter_metadata":{"oneOf":[{"additionalProperties":{"oneOf":[{}],"uniqueKey":"openrouter_metadata.oneOf.0.additionalProperties","typeLabel":"any"},"type":"object","description":"OpenRouter's routing detail for the failed request.","uniqueKey":"openrouter_metadata.oneOf.0","typeLabel":"object"},{"additionalProperties":{"oneOf":[{}],"uniqueKey":"openrouter_metadata.oneOf.1.additionalProperties","typeLabel":"any"},"type":"null","description":"OpenRouter's routing detail for the failed request.","uniqueKey":"openrouter_metadata.oneOf.1","typeLabel":"null"}],"uniqueKey":"openrouter_metadata","typeLabel":"object | null"},"user_id":{"oneOf":[{"type":"string","description":"Id of the user who made the request.","uniqueKey":"user_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Id of the user who made the request.","uniqueKey":"user_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"user_id","typeLabel":"string | null"}},"required":["error"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":401,"message":"Missing Authentication header"}}}},"exampleType":"examples"}},"description":"Unauthorized - Authentication required or invalid credentials","exampleType":"examples"},"04bf0477-dced-4cbf-9f0c-44ce1acc3c47":{"content":{"application/json":{"example":{"error":{"code":403,"message":"Only management keys can perform this operation"}},"schema":{"description":"Forbidden - Authentication successful but insufficient permissions","example":{"error":{"code":403,"message":"Only management keys can perform this operation"}},"properties":{"error":{"description":"Error data for ForbiddenResponse","example":{"code":403,"message":"Only management keys can perform this operation"},"properties":{"code":{"type":"integer","description":"HTTP status of the error, the same as the response's: 403.","isRequired":true,"uniqueKey":"error.code","typeLabel":"integer"},"message":{"type":"string","description":"What went wrong, in words for a person; do not parse it, branch on code instead.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"metadata":{"oneOf":[{"additionalProperties":{"oneOf":[{}],"uniqueKey":"error.metadata.oneOf.0.additionalProperties","typeLabel":"any"},"type":"object","description":"Extra detail about the error.","uniqueKey":"error.metadata.oneOf.0","typeLabel":"object"},{"additionalProperties":{"oneOf":[{}],"uniqueKey":"error.metadata.oneOf.1.additionalProperties","typeLabel":"any"},"type":"null","description":"Extra detail about the error.","uniqueKey":"error.metadata.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.metadata","typeLabel":"object | null"}},"required":["code","message"],"type":"object","isRequired":true,"uniqueKey":"error","typeLabel":"object"},"openrouter_metadata":{"oneOf":[{"additionalProperties":{"oneOf":[{}],"uniqueKey":"openrouter_metadata.oneOf.0.additionalProperties","typeLabel":"any"},"type":"object","description":"OpenRouter's routing detail for the failed request.","uniqueKey":"openrouter_metadata.oneOf.0","typeLabel":"object"},{"additionalProperties":{"oneOf":[{}],"uniqueKey":"openrouter_metadata.oneOf.1.additionalProperties","typeLabel":"any"},"type":"null","description":"OpenRouter's routing detail for the failed request.","uniqueKey":"openrouter_metadata.oneOf.1","typeLabel":"null"}],"uniqueKey":"openrouter_metadata","typeLabel":"object | null"},"user_id":{"oneOf":[{"type":"string","description":"Id of the user who made the request.","uniqueKey":"user_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Id of the user who made the request.","uniqueKey":"user_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"user_id","typeLabel":"string | null"}},"required":["error"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":403,"message":"Only management keys can perform this operation"}}}},"exampleType":"examples"}},"description":"The management key does not have permission for this request, the workspace is not owned by this account, or the workspace does not allow a person-name or address sensitive-info filter.","exampleType":"examples"},"20be6885-954f-4615-8e03-aca2d806e4bf":{"content":{"application/json":{"example":{"error":{"code":500,"message":"Internal Server Error"}},"schema":{"description":"Internal Server Error - Unexpected server error","example":{"error":{"code":500,"message":"Internal Server Error"}},"properties":{"error":{"description":"Error data for InternalServerResponse","example":{"code":500,"message":"Internal Server Error"},"properties":{"code":{"type":"integer","description":"HTTP status of the error, the same as the response's: 500.","isRequired":true,"uniqueKey":"error.code","typeLabel":"integer"},"message":{"type":"string","description":"What went wrong, in words for a person; do not parse it, branch on code instead.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"metadata":{"oneOf":[{"additionalProperties":{"oneOf":[{}],"uniqueKey":"error.metadata.oneOf.0.additionalProperties","typeLabel":"any"},"type":"object","description":"Extra detail about the error.","uniqueKey":"error.metadata.oneOf.0","typeLabel":"object"},{"additionalProperties":{"oneOf":[{}],"uniqueKey":"error.metadata.oneOf.1.additionalProperties","typeLabel":"any"},"type":"null","description":"Extra detail about the error.","uniqueKey":"error.metadata.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.metadata","typeLabel":"object | null"}},"required":["code","message"],"type":"object","isRequired":true,"uniqueKey":"error","typeLabel":"object"},"openrouter_metadata":{"oneOf":[{"additionalProperties":{"oneOf":[{}],"uniqueKey":"openrouter_metadata.oneOf.0.additionalProperties","typeLabel":"any"},"type":"object","description":"OpenRouter's routing detail for the failed request.","uniqueKey":"openrouter_metadata.oneOf.0","typeLabel":"object"},{"additionalProperties":{"oneOf":[{}],"uniqueKey":"openrouter_metadata.oneOf.1.additionalProperties","typeLabel":"any"},"type":"null","description":"OpenRouter's routing detail for the failed request.","uniqueKey":"openrouter_metadata.oneOf.1","typeLabel":"null"}],"uniqueKey":"openrouter_metadata","typeLabel":"object | null"},"user_id":{"oneOf":[{"type":"string","description":"Id of the user who made the request.","uniqueKey":"user_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Id of the user who made the request.","uniqueKey":"user_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"user_id","typeLabel":"string | null"}},"required":["error"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":500,"message":"Internal Server Error"}}}},"exampleType":"examples"}},"description":"Internal Server Error - Unexpected server error","exampleType":"examples"},"4cd13f4d-3967-4d50-8bf9-41eb6f790654":{"description":"Nemonist: the account service is temporarily unavailable; retry.","content":{"application/json":{"example":{"error":{"code":500,"message":"Internal Server Error"}},"schema":{"description":"Internal Server Error - Unexpected server error","example":{"error":{"code":500,"message":"Internal Server Error"}},"properties":{"error":{"description":"Error data for InternalServerResponse","example":{"code":500,"message":"Internal Server Error"},"properties":{"code":{"type":"integer","description":"HTTP status of the error, the same as the response's: 500.","isRequired":true,"uniqueKey":"error.code","typeLabel":"integer"},"message":{"type":"string","description":"What went wrong, in words for a person; do not parse it, branch on code instead.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"metadata":{"oneOf":[{"additionalProperties":{"oneOf":[{}],"uniqueKey":"error.metadata.oneOf.0.additionalProperties","typeLabel":"any"},"type":"object","description":"Extra detail about the error.","uniqueKey":"error.metadata.oneOf.0","typeLabel":"object"},{"additionalProperties":{"oneOf":[{}],"uniqueKey":"error.metadata.oneOf.1.additionalProperties","typeLabel":"any"},"type":"null","description":"Extra detail about the error.","uniqueKey":"error.metadata.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.metadata","typeLabel":"object | null"}},"required":["code","message"],"type":"object","isRequired":true,"uniqueKey":"error","typeLabel":"object"},"openrouter_metadata":{"oneOf":[{"additionalProperties":{"oneOf":[{}],"uniqueKey":"openrouter_metadata.oneOf.0.additionalProperties","typeLabel":"any"},"type":"object","description":"OpenRouter's routing detail for the failed request.","uniqueKey":"openrouter_metadata.oneOf.0","typeLabel":"object"},{"additionalProperties":{"oneOf":[{}],"uniqueKey":"openrouter_metadata.oneOf.1.additionalProperties","typeLabel":"any"},"type":"null","description":"OpenRouter's routing detail for the failed request.","uniqueKey":"openrouter_metadata.oneOf.1","typeLabel":"null"}],"uniqueKey":"openrouter_metadata","typeLabel":"object | null"},"user_id":{"oneOf":[{"type":"string","description":"Id of the user who made the request.","uniqueKey":"user_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Id of the user who made the request.","uniqueKey":"user_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"user_id","typeLabel":"string | null"}},"required":["error"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":500,"message":"Internal Server Error"}}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"5c64c600-8820-448c-b999-87c9f6ba628f":{"apiKey":{"type":"http","scheme":"bearer","description":"A Nemonist key (sk-nm-...) as a bearer token in the Authorization header.","scopes":[],"schemeName":"apiKey"}}},"servers":{"f904a986-b1a7-4390-beb0-f994b9f6d9ad":{"url":"https://nemonist.com/api/v1","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"A Nemonist key (sk-nm-...) as a bearer token in the Authorization header.","scopes":[],"schemeName":"apiKey"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"A Nemonist key (sk-nm-...) as a bearer token in the Authorization header.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"apiKey","name":"Authorization"}],"title":"apiKey"}]},"originalFileLocation":"openapi.json"},"subdomain":"nemonist","siteName":"nemonist","title":"Create a guardrail - nemonist","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-18T19:22:50.839Z","originalFileLocation":"api-reference/guardrails/create-a-guardrail.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=\"Create a new guardrail for the authenticated user. A newly created guardrail enforces nothing until it is assigned to API keys or organization members; workspace_id places the guardrail in a workspace but does not apply it to that workspace\u0026#x27;s traffic. To restrict all traffic in a workspace, update the workspace\u0026#x27;s default guardrail instead. Set allowed_data_regions to enforce In-Region Routing: governed requests must arrive through one of the listed OpenRouter domains and are rejected with a 403 otherwise. Management key required.\">\u003cmeta data-mint-head name=\"application-name\" content=\"nemonist\">\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/nemonist/pJflnD9tD_j2EbQM/_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/nemonist/pJflnD9tD_j2EbQM/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/nemonist/pJflnD9tD_j2EbQM/_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/nemonist/pJflnD9tD_j2EbQM/_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/nemonist/pJflnD9tD_j2EbQM/_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/nemonist/pJflnD9tD_j2EbQM/_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/nemonist/pJflnD9tD_j2EbQM/_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/nemonist/pJflnD9tD_j2EbQM/_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/nemonist/pJflnD9tD_j2EbQM/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create a guardrail - nemonist\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create a new guardrail for the authenticated user. A newly created guardrail enforces nothing until it is assigned to API keys or organization members; workspace_id places the guardrail in a workspace but does not apply it to that workspace\u0026#x27;s traffic. To restrict all traffic in a workspace, update the workspace\u0026#x27;s default guardrail instead. Set allowed_data_regions to enforce In-Region Routing: governed requests must arrive through one of the listed OpenRouter domains and are rejected with a 403 otherwise. Management key required.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"nemonist\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://nemonist.com/docs/api-reference/guardrails/create-a-guardrail\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://nemonist.mintlify.site/docs/_mintlify/api/og/v2?division=Guardrails\u0026amp;title=Create+a+guardrail\u0026amp;description=Create+a+new+guardrail+for+the+authenticated+user.+A+newly+created+guardrail+enforces+nothing+until+it+is+assigned+to+API+keys+or+organization+members%3B+%60workspa\u0026amp;theme=40d9cda61a40fab1943dcc72\u0026amp;signature=de9c43c39691dcfcbc8c89c2c7b70cbce0aa65586426e03253444053cac97049\">\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=\"Create a guardrail - nemonist\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create a new guardrail for the authenticated user. A newly created guardrail enforces nothing until it is assigned to API keys or organization members; workspace_id places the guardrail in a workspace but does not apply it to that workspace\u0026#x27;s traffic. To restrict all traffic in a workspace, update the workspace\u0026#x27;s default guardrail instead. Set allowed_data_regions to enforce In-Region Routing: governed requests must arrive through one of the listed OpenRouter domains and are rejected with a 403 otherwise. Management key required.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://nemonist.mintlify.site/docs/_mintlify/api/og/v2?division=Guardrails\u0026amp;title=Create+a+guardrail\u0026amp;description=Create+a+new+guardrail+for+the+authenticated+user.+A+newly+created+guardrail+enforces+nothing+until+it+is+assigned+to+API+keys+or+organization+members%3B+%60workspa\u0026amp;theme=40d9cda61a40fab1943dcc72\u0026amp;signature=de9c43c39691dcfcbc8c89c2c7b70cbce0aa65586426e03253444053cac97049\">\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/nemonist/pJflnD9tD_j2EbQM/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"nemonist\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#6366f1\">\u003clink data-mint-head rel=\"canonical\" href=\"https://nemonist.com/docs/api-reference/guardrails/create-a-guardrail\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/api-reference/guardrails/create-a-guardrail.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://nemonist.com/#organization\",\"name\":\"nemonist\",\"url\":\"https://nemonist.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/nemonist/O63iSHDIbHFIFLsR/logo/light.svg?fit=max\u0026auto=format\u0026n=O63iSHDIbHFIFLsR\u0026q=85\u0026s=78e0f2fecc2ad48dcf82fc4287a5dc8d\"}},{\"@type\":\"WebSite\",\"@id\":\"https://nemonist.com/docs#website\",\"name\":\"nemonist\",\"url\":\"https://nemonist.com/docs\",\"publisher\":{\"@id\":\"https://nemonist.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://nemonist.com/docs/api-reference/guardrails/create-a-guardrail#webpage\",\"url\":\"https://nemonist.com/docs/api-reference/guardrails/create-a-guardrail\",\"name\":\"Create a guardrail\",\"description\":\"Create a new guardrail for the authenticated user. A newly created guardrail enforces nothing until it is assigned to API keys or organization members; workspace_id places the guardrail in a workspace but does not apply it to that workspace's traffic. To restrict all traffic in a workspace, update the workspace's default guardrail instead. Set allowed_data_regions to enforce In-Region Routing: governed requests must arrive through one of the listed OpenRouter domains and are rejected with a 403 otherwise. Management key required.\",\"dateModified\":\"2026-11-18T19:22:50.839Z\",\"isPartOf\":{\"@id\":\"https://nemonist.com/docs#website\"},\"breadcrumb\":{\"@id\":\"https://nemonist.com/docs/api-reference/guardrails/create-a-guardrail#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://nemonist.com/docs/api-reference/guardrails/create-a-guardrail#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Guardrails\",\"item\":\"https://nemonist.com/docs/api-reference/guardrails/list-guardrails\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create a guardrail\",\"item\":\"https://nemonist.com/docs/api-reference/guardrails/create-a-guardrail\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://nemonist.com/docs/api-reference/guardrails/create-a-guardrail#apireference\",\"headline\":\"Create a guardrail\",\"name\":\"Create a guardrail\",\"description\":\"Create a new guardrail for the authenticated user. A newly created guardrail enforces nothing until it is assigned to API keys or organization members; workspace_id places the guardrail in a workspace but does not apply it to that workspace's traffic. To restrict all traffic in a workspace, update the workspace's default guardrail instead. Set allowed_data_regions to enforce In-Region Routing: governed requests must arrive through one of the listed OpenRouter domains and are rejected with a 403 otherwise. Management key required.\",\"url\":\"https://nemonist.com/docs/api-reference/guardrails/create-a-guardrail\",\"mainEntityOfPage\":{\"@id\":\"https://nemonist.com/docs/api-reference/guardrails/create-a-guardrail#webpage\"},\"dateModified\":\"2026-11-18T19:22:50.839Z\",\"publisher\":{\"@id\":\"https://nemonist.com/#organization\"},\"isPartOf\":{\"@id\":\"https://nemonist.com/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"nemonist\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"nemonist\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/api-reference/guardrails/create-a-guardrail.md","siteName":"nemonist","nav":{"global":null,"tabs":[{"tab":"Docs","pages":[{"title":"Docs","href":""}]},{"tab":"Clients","pages":[{"title":"Clients","href":"/clients/cursor"}]},{"tab":"API Reference","groups":[{"group":"Overview","pages":[{"title":"Overview","href":"/api-reference/overview"},{"title":"Output items","href":"/api-reference/output-items"}]},{"group":"Analytics","pages":[{"title":"Get user activity grouped by endpoint","deprecated":null,"version":null,"openapi":"/openapi.json get /activity","href":"/api-reference/analytics/get-user-activity-grouped-by-endpoint"}]},{"group":"Speech","pages":[{"title":"Create speech","deprecated":null,"version":null,"openapi":"/openapi.json post /audio/speech","href":"/api-reference/tts/create-speech"}]},{"group":"Transcriptions","pages":[{"title":"Create transcription","deprecated":null,"version":null,"openapi":"/openapi.json post /audio/transcriptions","href":"/api-reference/stt/create-transcription"}]},{"group":"OAuth","pages":[{"title":"Exchange authorization code for API key","deprecated":null,"version":null,"openapi":"/openapi.json post /auth/keys","href":"/api-reference/oauth/exchange-authorization-code-for-api-key"}]},{"group":"Benchmarks","pages":[{"title":"List Benchmarks","deprecated":null,"version":null,"openapi":"/openapi.json get /benchmarks","href":"/api-reference/benchmarks/list-benchmarks"}]},{"group":"BYOK","pages":[{"title":"List BYOK provider credentials","deprecated":null,"version":null,"openapi":"/openapi.json get /byok","href":"/api-reference/byok/list-byok-provider-credentials"},{"title":"Create a BYOK provider credential","deprecated":null,"version":null,"openapi":"/openapi.json post /byok","href":"/api-reference/byok/create-a-byok-provider-credential"},{"title":"Get a BYOK provider credential","deprecated":null,"version":null,"openapi":"/openapi.json get /byok/{id}","href":"/api-reference/byok/get-a-byok-provider-credential"},{"title":"Delete a BYOK provider credential","deprecated":null,"version":null,"openapi":"/openapi.json delete /byok/{id}","href":"/api-reference/byok/delete-a-byok-provider-credential"},{"title":"Update a BYOK provider credential","deprecated":null,"version":null,"openapi":"/openapi.json patch /byok/{id}","href":"/api-reference/byok/update-a-byok-provider-credential"}]},{"group":"Chat","pages":[{"title":"Create a chat completion","deprecated":null,"version":null,"openapi":"/openapi.json post /chat/completions","href":"/api-reference/chat/create-a-chat-completion"}]},{"group":"Credits","pages":[{"title":"Get remaining credits","deprecated":null,"version":null,"openapi":"/openapi.json get /credits","href":"/api-reference/credits/get-remaining-credits"}]},{"group":"Datasets","pages":[{"title":"Top apps by token usage","deprecated":null,"version":null,"openapi":"/openapi.json get /datasets/app-rankings","href":"/api-reference/datasets/top-apps-by-token-usage"},{"title":"Daily token totals for top 50 models","deprecated":null,"version":null,"openapi":"/openapi.json get /datasets/rankings-daily","href":"/api-reference/datasets/daily-token-totals-for-top-50-models"}]},{"group":"Embeddings","pages":[{"title":"Submit an embedding request","deprecated":null,"version":null,"openapi":"/openapi.json post /embeddings","href":"/api-reference/embeddings/submit-an-embedding-request"},{"title":"List all embeddings models","deprecated":null,"version":null,"openapi":"/openapi.json get /embeddings/models","href":"/api-reference/embeddings/list-all-embeddings-models"}]},{"group":"Endpoints","pages":[{"title":"Preview the impact of ZDR on the available endpoints","deprecated":null,"version":null,"openapi":"/openapi.json get /endpoints/zdr","href":"/api-reference/endpoints/preview-the-impact-of-zdr-on-the-available-endpoints"},{"title":"List all endpoints for a model","deprecated":null,"version":null,"openapi":"/openapi.json get /models/{author}/{slug}/endpoints","href":"/api-reference/endpoints/list-all-endpoints-for-a-model"}]},{"group":"Generations","pages":[{"title":"Get request \u0026 usage metadata for a generation","deprecated":null,"version":null,"openapi":"/openapi.json get /generation","href":"/api-reference/generations/get-request-\u0026-usage-metadata-for-a-generation"}]},{"group":"Guardrails","pages":[{"title":"List guardrails","description":"List all guardrails for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.","deprecated":null,"version":null,"openapi":"/openapi.json get /guardrails","href":"/api-reference/guardrails/list-guardrails"},{"title":"Create a guardrail","deprecated":null,"version":null,"openapi":"/openapi.json post /guardrails","href":"/api-reference/guardrails/create-a-guardrail"},{"title":"Get a guardrail","description":"Get a single guardrail by ID. [Management key](/docs/guides/overview/auth/management-api-keys) required.","deprecated":null,"version":null,"openapi":"/openapi.json get /guardrails/{id}","href":"/api-reference/guardrails/get-a-guardrail"},{"title":"Delete a guardrail","deprecated":null,"version":null,"openapi":"/openapi.json delete /guardrails/{id}","href":"/api-reference/guardrails/delete-a-guardrail"},{"title":"Update a guardrail","deprecated":null,"version":null,"openapi":"/openapi.json patch /guardrails/{id}","href":"/api-reference/guardrails/update-a-guardrail"},{"title":"List key assignments for a guardrail","deprecated":null,"version":null,"openapi":"/openapi.json get /guardrails/{id}/assignments/keys","href":"/api-reference/guardrails/list-key-assignments-for-a-guardrail"},{"title":"Bulk assign keys to a guardrail","deprecated":null,"version":null,"openapi":"/openapi.json post /guardrails/{id}/assignments/keys","href":"/api-reference/guardrails/bulk-assign-keys-to-a-guardrail"},{"title":"Bulk unassign keys from a guardrail","deprecated":null,"version":null,"openapi":"/openapi.json post /guardrails/{id}/assignments/keys/remove","href":"/api-reference/guardrails/bulk-unassign-keys-from-a-guardrail"},{"title":"List all key assignments","deprecated":null,"version":null,"openapi":"/openapi.json get /guardrails/assignments/keys","href":"/api-reference/guardrails/list-all-key-assignments"}]},{"group":"Images","pages":[{"title":"Generate an image","deprecated":null,"version":null,"openapi":"/openapi.json post /images","href":"/api-reference/images/generate-an-image"},{"title":"List image generation models","deprecated":null,"version":null,"openapi":"/openapi.json get /images/models","href":"/api-reference/images/list-image-generation-models"},{"title":"List endpoints for an image model","deprecated":null,"version":null,"openapi":"/openapi.json get /images/models/{author}/{slug}/endpoints","href":"/api-reference/images/list-endpoints-for-an-image-model"}]},{"group":"API Keys","pages":[{"title":"Get current API key","deprecated":null,"version":null,"openapi":"/openapi.json get /key","href":"/api-reference/api-keys/get-current-api-key"},{"title":"List API keys","deprecated":null,"version":null,"openapi":"/openapi.json get /keys","href":"/api-reference/api-keys/list-api-keys"},{"title":"Create a new API key","deprecated":null,"version":null,"openapi":"/openapi.json post /keys","href":"/api-reference/api-keys/create-a-new-api-key"},{"title":"Get a single API key","deprecated":null,"version":null,"openapi":"/openapi.json get /keys/{hash}","href":"/api-reference/api-keys/get-a-single-api-key"},{"title":"Delete an API key","deprecated":null,"version":null,"openapi":"/openapi.json delete /keys/{hash}","href":"/api-reference/api-keys/delete-an-api-key"},{"title":"Update an API key","deprecated":null,"version":null,"openapi":"/openapi.json patch /keys/{hash}","href":"/api-reference/api-keys/update-an-api-key"}]},{"group":"Anthropic Messages","pages":[{"title":"Create a message","deprecated":null,"version":null,"openapi":"/openapi.json post /messages","href":"/api-reference/anthropic-messages/create-a-message"}]},{"group":"Models","pages":[{"title":"Get a model by its slug","deprecated":null,"version":null,"openapi":"/openapi.json get /model/{author}/{slug}","href":"/api-reference/models/get-a-model-by-its-slug"},{"title":"List all models and their properties","deprecated":null,"version":null,"openapi":"/openapi.json get /models","href":"/api-reference/models/list-all-models-and-their-properties"},{"title":"Get total count of available models","deprecated":null,"version":null,"openapi":"/openapi.json get /models/count","href":"/api-reference/models/get-total-count-of-available-models"},{"title":"List models filtered by user provider preferences, privacy settings, and guardrails","deprecated":null,"version":null,"openapi":"/openapi.json get /models/user","href":"/api-reference/models/list-models-filtered-by-user-provider-preferences-privacy-settings-and-guardrails"}]},{"group":"Organization","pages":[{"title":"List organization members","deprecated":null,"version":null,"openapi":"/openapi.json get /organization/members","href":"/api-reference/organization/list-organization-members"}]},{"group":"Private Endpoints","pages":[{"title":"List private endpoints","deprecated":null,"version":null,"openapi":"/openapi.json get /private-endpoints","href":"/api-reference/private-endpoints/list-private-endpoints"},{"title":"Create a private endpoint","deprecated":null,"version":null,"openapi":"/openapi.json post /private-endpoints","href":"/api-reference/private-endpoints/create-a-private-endpoint"},{"title":"Get a private endpoint","deprecated":null,"version":null,"openapi":"/openapi.json get /private-endpoints/{id}","href":"/api-reference/private-endpoints/get-a-private-endpoint"},{"title":"Delete a private endpoint","deprecated":null,"version":null,"openapi":"/openapi.json delete /private-endpoints/{id}","href":"/api-reference/private-endpoints/delete-a-private-endpoint"},{"title":"Update a private endpoint","deprecated":null,"version":null,"openapi":"/openapi.json patch /private-endpoints/{id}","href":"/api-reference/private-endpoints/update-a-private-endpoint"},{"title":"Activate a validated private endpoint","deprecated":null,"version":null,"openapi":"/openapi.json post /private-endpoints/{id}/activate","href":"/api-reference/private-endpoints/activate-a-validated-private-endpoint"},{"title":"Disable a private endpoint","deprecated":null,"version":null,"openapi":"/openapi.json post /private-endpoints/{id}/disable","href":"/api-reference/private-endpoints/disable-a-private-endpoint"},{"title":"Enable a private endpoint","deprecated":null,"version":null,"openapi":"/openapi.json post /private-endpoints/{id}/enable","href":"/api-reference/private-endpoints/enable-a-private-endpoint"},{"title":"Validate a draft private endpoint","deprecated":null,"version":null,"openapi":"/openapi.json post /private-endpoints/{id}/validate","href":"/api-reference/private-endpoints/validate-a-draft-private-endpoint"}]},{"group":"Providers","pages":[{"title":"List all providers","deprecated":null,"version":null,"openapi":"/openapi.json get /providers","href":"/api-reference/providers/list-all-providers"}]},{"group":"Rerank","pages":[{"title":"Submit a rerank request","deprecated":null,"version":null,"openapi":"/openapi.json post /rerank","href":"/api-reference/rerank/submit-a-rerank-request"}]},{"group":"Responses","pages":[{"title":"Create a response","deprecated":null,"version":null,"openapi":"/openapi.json post /responses","href":"/api-reference/responses/create-a-response"}]},{"group":"System One","pages":[{"title":"Submit a System One request","deprecated":null,"version":null,"openapi":"/openapi.json post /systemone","href":"/api-reference/systemone/submit-a-system-one-request"}]},{"group":"Video Generation","pages":[{"title":"List all video generation models","deprecated":null,"version":null,"openapi":"/openapi.json get /videos/models","href":"/api-reference/video-generation/list-all-video-generation-models"}]},{"group":"Workspaces","pages":[{"title":"List workspaces","deprecated":null,"version":null,"openapi":"/openapi.json get /workspaces","href":"/api-reference/workspaces/list-workspaces"},{"title":"Create a workspace","deprecated":null,"version":null,"openapi":"/openapi.json post /workspaces","href":"/api-reference/workspaces/create-a-workspace"},{"title":"Get a workspace","deprecated":null,"version":null,"openapi":"/openapi.json get /workspaces/{id}","href":"/api-reference/workspaces/get-a-workspace"},{"title":"Delete a workspace","deprecated":null,"version":null,"openapi":"/openapi.json delete /workspaces/{id}","href":"/api-reference/workspaces/delete-a-workspace"},{"title":"Update a workspace","deprecated":null,"version":null,"openapi":"/openapi.json patch /workspaces/{id}","href":"/api-reference/workspaces/update-a-workspace"},{"title":"List workspace members","deprecated":null,"version":null,"openapi":"/openapi.json get /workspaces/{id}/members","href":"/api-reference/workspaces/list-workspace-members"},{"title":"Bulk add members to a workspace","deprecated":null,"version":null,"openapi":"/openapi.json post /workspaces/{id}/members/add","href":"/api-reference/workspaces/bulk-add-members-to-a-workspace"},{"title":"Bulk remove members from a workspace","deprecated":null,"version":null,"openapi":"/openapi.json post /workspaces/{id}/members/remove","href":"/api-reference/workspaces/bulk-remove-members-from-a-workspace"},{"title":"List workspace budgets","deprecated":null,"version":null,"openapi":"/openapi.json get /workspaces/{workspace_ref}/budgets","href":"/api-reference/workspaces/list-workspace-budgets"},{"title":"Get a workspace budget","deprecated":null,"version":null,"openapi":"/openapi.json get /workspaces/{workspace_ref}/budgets/{interval}","href":"/api-reference/workspaces/get-a-workspace-budget"},{"title":"Create or update a workspace budget","deprecated":null,"version":null,"openapi":"/openapi.json put /workspaces/{workspace_ref}/budgets/{interval}","href":"/api-reference/workspaces/create-or-update-a-workspace-budget"},{"title":"Delete a workspace budget","deprecated":null,"version":null,"openapi":"/openapi.json delete /workspaces/{workspace_ref}/budgets/{interval}","href":"/api-reference/workspaces/delete-a-workspace-budget"}]},{"group":"Memory","pages":[{"title":"Erase all memory","deprecated":null,"version":null,"openapi":"/openapi.json delete /memory","href":"/api-reference/memory/erase-all-memory"},{"title":"Read a workspace's memory","deprecated":null,"version":null,"openapi":"/openapi.json get /memory-file","href":"/api-reference/memory/read-a-workspaces-memory"},{"title":"List a folder's inbox by its key","deprecated":null,"version":null,"openapi":"/openapi.json get /inbox","href":"/api-reference/memory/list-a-folders-inbox-by-its-key"},{"title":"Send a message to a folder","deprecated":null,"version":null,"openapi":"/openapi.json post /inbox","href":"/api-reference/memory/send-a-message-to-a-folder"},{"title":"Get a workspace's memory graph","deprecated":null,"version":null,"openapi":"/openapi.json get /memory-graph","href":"/api-reference/memory/get-a-workspaces-memory-graph"}]},{"group":"Folders","pages":[{"title":"List your folders","deprecated":null,"version":null,"openapi":"/openapi.json get /folders","href":"/api-reference/folders/list-your-folders"},{"title":"Get a folder","deprecated":null,"version":null,"openapi":"/openapi.json get /folders/{id}","href":"/api-reference/folders/get-a-folder"},{"title":"Erase a folder","deprecated":null,"version":null,"openapi":"/openapi.json delete /folders/{id}","href":"/api-reference/folders/erase-a-folder"},{"title":"Rename a folder","deprecated":null,"version":null,"openapi":"/openapi.json patch /folders/{id}","href":"/api-reference/folders/rename-a-folder"},{"title":"Read a note","deprecated":null,"version":null,"openapi":"/openapi.json get /folders/{id}/memory/{path}","href":"/api-reference/folders/read-a-note"},{"title":"List recorded requests","deprecated":null,"version":null,"openapi":"/openapi.json get /folders/{id}/history","href":"/api-reference/folders/list-recorded-requests"},{"title":"Read a recorded request","deprecated":null,"version":null,"openapi":"/openapi.json get /folders/{id}/history/{commit}","href":"/api-reference/folders/read-a-recorded-request"},{"title":"Export a folder","deprecated":null,"version":null,"openapi":"/openapi.json get /folders/{id}/export","href":"/api-reference/folders/export-a-folder"},{"title":"Get a folder's memory graph","deprecated":null,"version":null,"openapi":"/openapi.json get /folders/{id}/graph","href":"/api-reference/folders/get-a-folders-memory-graph"},{"title":"Turn nightly sleep on or off","deprecated":null,"version":null,"openapi":"/openapi.json put /folders/{id}/sleep","href":"/api-reference/folders/turn-nightly-sleep-on-or-off"},{"title":"Issue a key","deprecated":null,"version":null,"openapi":"/openapi.json post /folders/{id}/keys","href":"/api-reference/folders/issue-a-key"},{"title":"Revoke a key","deprecated":null,"version":null,"openapi":"/openapi.json delete /folders/{id}/keys/{kid}","href":"/api-reference/folders/revoke-a-key"},{"title":"Merge into another folder","deprecated":null,"version":null,"openapi":"/openapi.json post /folders/{id}/merge","href":"/api-reference/folders/merge-into-another-folder"},{"title":"List uploaded files","deprecated":null,"version":null,"openapi":"/openapi.json get /folders/{id}/files","href":"/api-reference/folders/list-uploaded-files"},{"title":"Download an uploaded file","deprecated":null,"version":null,"openapi":"/openapi.json get /folders/{id}/files/{path}","href":"/api-reference/folders/download-an-uploaded-file"},{"title":"Delete an uploaded file","deprecated":null,"version":null,"openapi":"/openapi.json delete /folders/{id}/files/{path}","href":"/api-reference/folders/delete-an-uploaded-file"},{"title":"Get an upload URL","deprecated":null,"version":null,"openapi":"/openapi.json post /folders/{id}/upload-url","href":"/api-reference/folders/get-an-upload-url"},{"title":"Start or continue a multipart upload","deprecated":null,"version":null,"openapi":"/openapi.json post /folders/{id}/multipart","href":"/api-reference/folders/start-or-continue-a-multipart-upload"},{"title":"Complete a multipart upload","deprecated":null,"version":null,"openapi":"/openapi.json post /folders/{id}/multipart/complete","href":"/api-reference/folders/complete-a-multipart-upload"},{"title":"List a folder's jobs","deprecated":null,"version":null,"openapi":"/openapi.json get /folders/{id}/jobs","href":"/api-reference/folders/list-a-folders-jobs"},{"title":"Download a job output","deprecated":null,"version":null,"openapi":"/openapi.json get /folders/{id}/jobs/{job}/{name}","href":"/api-reference/folders/download-a-job-output"},{"title":"List a folder's inbox","deprecated":null,"version":null,"openapi":"/openapi.json get /folders/{id}/inbox","href":"/api-reference/folders/list-a-folders-inbox"},{"title":"Get a folder's tool use","deprecated":null,"version":null,"openapi":"/openapi.json get /folders/{id}/tools","href":"/api-reference/folders/get-a-folders-tool-use"},{"title":"List commits","deprecated":null,"version":null,"openapi":"/openapi.json get /folders/{id}/commits","href":"/api-reference/folders/list-commits"},{"title":"Get a commit","deprecated":null,"version":null,"openapi":"/openapi.json get /folders/{id}/commits/{commit}","href":"/api-reference/folders/get-a-commit"},{"title":"List notes at a commit","deprecated":null,"version":null,"openapi":"/openapi.json get /folders/{id}/tree","href":"/api-reference/folders/list-notes-at-a-commit"},{"title":"Download notes as a zip","deprecated":null,"version":null,"openapi":"/openapi.json get /folders/{id}/zipball","href":"/api-reference/folders/download-notes-as-a-zip"},{"title":"Download notes at a commit as a zip","deprecated":null,"version":null,"openapi":"/openapi.json get /folders/{id}/zipball/{commit}","href":"/api-reference/folders/download-notes-at-a-commit-as-a-zip"},{"title":"List tags","deprecated":null,"version":null,"openapi":"/openapi.json get /folders/{id}/tags","href":"/api-reference/folders/list-tags"},{"title":"Create a tag","deprecated":null,"version":null,"openapi":"/openapi.json post /folders/{id}/tags","href":"/api-reference/folders/create-a-tag"},{"title":"Delete a tag","deprecated":null,"version":null,"openapi":"/openapi.json delete /folders/{id}/tags/{name}","href":"/api-reference/folders/delete-a-tag"},{"title":"Get contributors","deprecated":null,"version":null,"openapi":"/openapi.json get /folders/{id}/stats/contributors","href":"/api-reference/folders/get-contributors"},{"title":"Get commit activity","deprecated":null,"version":null,"openapi":"/openapi.json get /folders/{id}/stats/commit_activity","href":"/api-reference/folders/get-commit-activity"},{"title":"Blame a note","deprecated":null,"version":null,"openapi":"/openapi.json get /folders/{id}/blame/{path}","href":"/api-reference/folders/blame-a-note"},{"title":"List work items","deprecated":null,"version":null,"openapi":"/openapi.json get /folders/{id}/issues","href":"/api-reference/folders/list-work-items"},{"title":"Read a work item","deprecated":null,"version":null,"openapi":"/openapi.json get /folders/{id}/issues/{item}","href":"/api-reference/folders/read-a-work-item"},{"title":"Edit a work item by name","deprecated":null,"version":null,"openapi":"/openapi.json patch /folders/{id}/issues/{item}","href":"/api-reference/folders/edit-a-work-item-by-name"},{"title":"Compare two commits","deprecated":null,"version":null,"openapi":"/openapi.json get /folders/{id}/compare/{basehead}","href":"/api-reference/folders/compare-two-commits"},{"title":"Read a work item's timeline","deprecated":null,"version":null,"openapi":"/openapi.json get /folders/{id}/issues/{item}/timeline","href":"/api-reference/folders/read-a-work-items-timeline"},{"title":"List activity","deprecated":null,"version":null,"openapi":"/openapi.json get /folders/{id}/activity","href":"/api-reference/folders/list-activity"},{"title":"Revert a commit","deprecated":null,"version":null,"openapi":"/openapi.json post /folders/{id}/commits/{commit}/revert","href":"/api-reference/folders/revert-a-commit"},{"title":"Get goal insights","deprecated":null,"version":null,"openapi":"/openapi.json get /folders/{id}/stats/issues","href":"/api-reference/folders/get-goal-insights"},{"title":"List saved goal views","deprecated":null,"version":null,"openapi":"/openapi.json get /folders/{id}/views","href":"/api-reference/folders/list-saved-goal-views"},{"title":"Save a goal view","deprecated":null,"version":null,"openapi":"/openapi.json post /folders/{id}/views","href":"/api-reference/folders/save-a-goal-view"},{"title":"Get a goal view","deprecated":null,"version":null,"openapi":"/openapi.json get /folders/{id}/views/{number}","href":"/api-reference/folders/get-a-goal-view"},{"title":"Delete a goal view","deprecated":null,"version":null,"openapi":"/openapi.json delete /folders/{id}/views/{number}","href":"/api-reference/folders/delete-a-goal-view"},{"title":"Edit a goal view","deprecated":null,"version":null,"openapi":"/openapi.json patch /folders/{id}/views/{number}","href":"/api-reference/folders/edit-a-goal-view"},{"title":"List a view's goals","deprecated":null,"version":null,"openapi":"/openapi.json get /folders/{id}/views/{number}/issues","href":"/api-reference/folders/list-a-views-goals"}]},{"group":"Model runs","pages":[{"title":"List uploaded files","deprecated":null,"version":null,"openapi":"/openapi.json get /files","href":"/api-reference/model-runs/list-uploaded-files"},{"title":"Start a file upload","deprecated":null,"version":null,"openapi":"/openapi.json post /files","href":"/api-reference/model-runs/start-a-file-upload"},{"title":"List models","deprecated":null,"version":null,"openapi":"/openapi.json get /runs/models","href":"/api-reference/model-runs/list-models"},{"title":"List runs","deprecated":null,"version":null,"openapi":"/openapi.json get /runs","href":"/api-reference/model-runs/list-runs"},{"title":"Start a run","deprecated":null,"version":null,"openapi":"/openapi.json post /runs","href":"/api-reference/model-runs/start-a-run"},{"title":"Poll a run","deprecated":null,"version":null,"openapi":"/openapi.json get /runs/{id}","href":"/api-reference/model-runs/poll-a-run"},{"title":"Cancel a run","deprecated":null,"version":null,"openapi":"/openapi.json delete /runs/{id}","href":"/api-reference/model-runs/cancel-a-run"},{"title":"Download a run output","deprecated":null,"version":null,"openapi":"/openapi.json get /runs/{id}/content","href":"/api-reference/model-runs/download-a-run-output"}]}]}]},"basePath":"","title":"Create a guardrail - nemonist","deploymentId":"dpl_J2QdBVuN65x4CCtpqPb371YPt4xi","buildId":"dpl_J2QdBVuN65x4CCtpqPb371YPt4xi","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-tiVafkWW.js","utils-CURQcKis.js","cloneDeep-D7WNbvHt.js","_Uint8Array-BY_XlfVz.js","isObject-FP1Yky1u.js","utils-CdFTKPRO.js","addUniqueKeysToSchema-BSfwE63N.js","snippetPresets-BHyg8yZ0.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-CQdVXSju.js","isEqual-ft5OxoSH.js","usePlaygroundInputsStore-BILH4rrw.js","shallow-DterCiSU.js","getApiPlaygroundDisplay-uFtORr6j.js","CodeSnippet-BeuhEvUS.js","CodeSnippets-laCoJsvn.js","Page-CTsmHnLF.js","getPastedJson-DOT1n5Lt.js","icon-COH-nmcZ.js","MethodPill-BbAWkCf6.js","DuplicateIcon-CpagiAFQ.js","createIcon-Bw2Dnowf.js","DynamicMarkdown-DzuINhDe.js","SectionHeading-B3H20qI6.js","axios-vUo_bRtp.js","Markdown-DBdbz5B3.js","dist-DWEsd3cZ.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","katex-YMM-FMeD.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js","AssistantPageLink-DuX7jTnG.js"]}