> ## Documentation Index > Fetch the complete documentation index at: https://openrouter.ai/docs/llms.txt > Use this file to discover all available pages before exploring further. # CreateGuardrailRequest ## Fields | Field | Type | Required | Description | Example | | ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | | `AllowedDataRegions` | optionalnullable.OptionalNullable\[\[][components.GuardrailDataRegion](../../models/components/guardraildataregion.mdx)] | :heavy\_minus\_sign: | Data regions through which requests governed by this guardrail must arrive. `global` is [https://openrouter.ai](https://openrouter.ai), `europe` is [https://eu.openrouter.ai](https://eu.openrouter.ai), and `us` is [https://us.openrouter.ai](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. | \[
"europe"
] | | `AllowedModels` | optionalnullable.OptionalNullable\[\[]`string`] | :heavy\_minus\_sign: | Array of model identifiers (slug or canonical\_slug accepted) | \[
"openai/gpt-5.2",
"anthropic/claude-4.5-opus-20251124",
"deepseek/deepseek-r1-0528:free"
] | | `AllowedProviders` | optionalnullable.OptionalNullable\[\[]`string`] | :heavy\_minus\_sign: | List of allowed provider IDs | \[
"openai",
"anthropic",
"deepseek"
] | | `ContentFilterBuiltins` | optionalnullable.OptionalNullable\[\[][components.ContentFilterBuiltinEntryInput](../../models/components/contentfilterbuiltinentryinput.mdx)] | :heavy\_minus\_sign: | Builtin content filters to apply. Every builtin slug supports "block", "redact", and the detect-only "flag" action. | \[
\{
"action": "block",
"slug": "regex-prompt-injection"
}
] | | `ContentFilters` | optionalnullable.OptionalNullable\[\[][components.ContentFilterEntry](../../models/components/contentfilterentry.mdx)] | :heavy\_minus\_sign: | Custom regex content filters to apply to request messages | \[
\{
"action": "redact",
"label": "\[API\_KEY]",
"pattern": "\b(sk-\[a-zA-Z0-9]\{48})\b"
}
] | | `Description` | optionalnullable.OptionalNullable\[`string`] | :heavy\_minus\_sign: | Description of the guardrail | A guardrail for limiting API usage | | `EnableFreeModelPublication` | optionalnullable.OptionalNullable\[`bool`] | :heavy\_minus\_sign: | Whether this guardrail allows free endpoints that publish prompts. | false | | `EnableFreeModelTraining` | optionalnullable.OptionalNullable\[`bool`] | :heavy\_minus\_sign: | Whether this guardrail allows free endpoints that train on request data. | true | | `EnablePaidModelTraining` | optionalnullable.OptionalNullable\[`bool`] | :heavy\_minus\_sign: | Whether this guardrail allows paid endpoints that train on request data. | true | | ~~`EnforceZdr`~~ | optionalnullable.OptionalNullable\[`bool`] | :heavy\_minus\_sign: | : warning: \*\* DEPRECATED \*\*: This will be removed in a future release, please migrate away from it as soon as possible.

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. | false | | `EnforceZdrAnthropic` | optionalnullable.OptionalNullable\[`bool`] | :heavy\_minus\_sign: | Whether to enforce zero data retention for Anthropic models. Falls back to enforce\_zdr when not provided. | false | | `EnforceZdrGoogle` | optionalnullable.OptionalNullable\[`bool`] | :heavy\_minus\_sign: | Whether to enforce zero data retention for Google models. Falls back to enforce\_zdr when not provided. | false | | `EnforceZdrOpenai` | optionalnullable.OptionalNullable\[`bool`] | :heavy\_minus\_sign: | Whether to enforce zero data retention for OpenAI models. Falls back to enforce\_zdr when not provided. | false | | `EnforceZdrOther` | optionalnullable.OptionalNullable\[`bool`] | :heavy\_minus\_sign: | 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. | false | | `EnforceZdrXai` | optionalnullable.OptionalNullable\[`bool`] | :heavy\_minus\_sign: | Whether to enforce zero data retention for xAI models. Falls back to enforce\_zdr when not provided. | false | | `IgnoredModels` | optionalnullable.OptionalNullable\[\[]`string`] | :heavy\_minus\_sign: | Array of model identifiers to exclude from routing (slug or canonical\_slug accepted) | \[
"openai/gpt-4o-mini"
] | | `IgnoredProviders` | optionalnullable.OptionalNullable\[\[]`string`] | :heavy\_minus\_sign: | List of provider IDs to exclude from routing | \[
"azure"
] | | `IncludeBYOKInBudgets` | `*bool` | :heavy\_minus\_sign: | Whether BYOK (bring-your-own-key) inference spend counts toward this guardrail's limit\_usd, in addition to OpenRouter credit spend. Defaults to false. | false | | `LimitUsd` | optionalnullable.OptionalNullable\[`float64`] | :heavy\_minus\_sign: | 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. | 50 | | `Name` | `string` | :heavy\_check\_mark: | Name for the new guardrail | My New Guardrail | | `ResetInterval` | optionalnullable.OptionalNullable\[[components.GuardrailInterval](../../models/components/guardrailinterval.mdx)] | :heavy\_minus\_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly | | `WorkspaceID` | `*string` | :heavy\_minus\_sign: | 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. | 0df9e665-d932-5740-b2c7-b52af166bc11 |