> ## 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.

# UpdateGuardrailRequest

## Fields

| Field                        | Type                                                                                                                                           | Required             | Description                                                                                                                                                                                                                                                                                                                                                                                                | Example                                                                                |
| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| `AllowedModels`              | optionalnullable.OptionalNullable\[\[]`string`]                                                                                                | :heavy\_minus\_sign: | Array of model identifiers (slug or canonical\_slug accepted)                                                                                                                                                                                                                                                                                                                                              | \[<br />"openai/gpt-5.2"<br />]                                                        |
| `AllowedProviders`           | optionalnullable.OptionalNullable\[\[]`string`]                                                                                                | :heavy\_minus\_sign: | New list of allowed provider IDs                                                                                                                                                                                                                                                                                                                                                                           | \[<br />"openai",<br />"anthropic",<br />"deepseek"<br />]                             |
| `ContentFilterBuiltins`      | optionalnullable.OptionalNullable\[\[][components.ContentFilterBuiltinEntryInput](../../models/components/contentfilterbuiltinentryinput.mdx)] | :heavy\_minus\_sign: | Builtin content filters to apply. Set to null to remove. Every builtin slug supports "block", "redact", and the detect-only "flag" action.                                                                                                                                                                                                                                                                 | \[<br />\{<br />"action": "block",<br />"slug": "regex-prompt-injection"<br />}<br />] |
| `ContentFilters`             | optionalnullable.OptionalNullable\[\[][components.ContentFilterEntry](../../models/components/contentfilterentry.mdx)]                         | :heavy\_minus\_sign: | Custom regex content filters to apply. Set to null to remove.                                                                                                                                                                                                                                                                                                                                              | null                                                                                   |
| `Description`                | optionalnullable.OptionalNullable\[`string`]                                                                                                   | :heavy\_minus\_sign: | New description for the guardrail                                                                                                                                                                                                                                                                                                                                                                          | Updated description                                                                    |
| `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.<br /><br />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. | true                                                                                   |
| `EnforceZdrAnthropic`        | optionalnullable.OptionalNullable\[`bool`]                                                                                                     | :heavy\_minus\_sign: | Whether to enforce zero data retention for Anthropic models. Falls back to enforce\_zdr when not provided.                                                                                                                                                                                                                                                                                                 | true                                                                                   |
| `EnforceZdrGoogle`           | optionalnullable.OptionalNullable\[`bool`]                                                                                                     | :heavy\_minus\_sign: | Whether to enforce zero data retention for Google models. Falls back to enforce\_zdr when not provided.                                                                                                                                                                                                                                                                                                    | true                                                                                   |
| `EnforceZdrOpenai`           | optionalnullable.OptionalNullable\[`bool`]                                                                                                     | :heavy\_minus\_sign: | Whether to enforce zero data retention for OpenAI models. Falls back to enforce\_zdr when not provided.                                                                                                                                                                                                                                                                                                    | true                                                                                   |
| `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.                                                                                                                                                                                                                                                       | true                                                                                   |
| `EnforceZdrXai`              | optionalnullable.OptionalNullable\[`bool`]                                                                                                     | :heavy\_minus\_sign: | Whether to enforce zero data retention for xAI models. Falls back to enforce\_zdr when not provided.                                                                                                                                                                                                                                                                                                       | true                                                                                   |
| `IgnoredModels`              | optionalnullable.OptionalNullable\[\[]`string`]                                                                                                | :heavy\_minus\_sign: | Array of model identifiers to exclude from routing (slug or canonical\_slug accepted)                                                                                                                                                                                                                                                                                                                      | \[<br />"openai/gpt-4o-mini"<br />]                                                    |
| `IgnoredProviders`           | optionalnullable.OptionalNullable\[\[]`string`]                                                                                                | :heavy\_minus\_sign: | List of provider IDs to exclude from routing                                                                                                                                                                                                                                                                                                                                                               | \[<br />"azure"<br />]                                                                 |
| `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. Omit to leave unchanged.                                                                                                                                                                                                                                              | true                                                                                   |
| `LimitUsd`                   | optionalnullable.OptionalNullable\[`float64`]                                                                                                  | :heavy\_minus\_sign: | New spending limit in USD                                                                                                                                                                                                                                                                                                                                                                                  | 75                                                                                     |
| `Name`                       | `*string`                                                                                                                                      | :heavy\_minus\_sign: | New name for the guardrail                                                                                                                                                                                                                                                                                                                                                                                 | Updated Guardrail Name                                                                 |
| `ResetInterval`              | optionalnullable.OptionalNullable\[[components.GuardrailInterval](../../models/components/guardrailinterval.mdx)]                              | :heavy\_minus\_sign: | Interval at which the limit resets (daily, weekly, monthly)                                                                                                                                                                                                                                                                                                                                                | monthly                                                                                |
