> ## Documentation Index
> Fetch the complete documentation index at: https://openrouter-d02e98a0-mintlify-5b6e02fd.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# CreateGuardrailRequest - Python SDK

> CreateGuardrailRequest method reference

<Warning>
  The Python SDK and docs are currently in beta.
  Report issues on [GitHub](https://github.com/OpenRouterTeam/python-sdk/issues).
</Warning>

## Fields

| Field               | Type                                                                                                                       | Required             | Description                                                   | Example                                                                                                           |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------- | ------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| `name`              | *str*                                                                                                                      | :heavy\_check\_mark: | Name for the new guardrail                                    | My New Guardrail                                                                                                  |
| `description`       | *OptionalNullable\[str]*                                                                                                   | :heavy\_minus\_sign: | Description of the guardrail                                  | A guardrail for limiting API usage                                                                                |
| `limit_usd`         | *OptionalNullable\[float]*                                                                                                 | :heavy\_minus\_sign: | Spending limit in USD                                         | 50                                                                                                                |
| `reset_interval`    | [OptionalNullable\[operations.CreateGuardrailResetIntervalRequest\]](../operations/createguardrailresetintervalrequest.md) | :heavy\_minus\_sign: | Interval at which the limit resets (daily, weekly, monthly)   | monthly                                                                                                           |
| `allowed_providers` | List\[*str*]                                                                                                               | :heavy\_minus\_sign: | List of allowed provider IDs                                  | \[<br />"openai",<br />"anthropic",<br />"deepseek"<br />]                                                        |
| `allowed_models`    | List\[*str*]                                                                                                               | :heavy\_minus\_sign: | Array of model identifiers (slug or canonical\_slug accepted) | \[<br />"openai/gpt-5.2",<br />"anthropic/claude-4.5-opus-20251124",<br />"deepseek/deepseek-r1-0528:free"<br />] |
| `enforce_zdr`       | *OptionalNullable\[bool]*                                                                                                  | :heavy\_minus\_sign: | Whether to enforce zero data retention                        | false                                                                                                             |
