Files
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
06daeeb11f chore: 🐝 Update SDK - Generate (spec change merged) 0.11.31 (#450)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-07-14 21:08:12 +00:00

28 lines
40 KiB
Plaintext

---
title: "Guardrail"
---
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model canonical_slugs (immutable identifiers) | [<br/>"openai/gpt-5.2-20251211",<br/>"anthropic/claude-4.5-opus-20251124",<br/>"deepseek/deepseek-r1-0528:free"<br/>] |
| `allowed_providers` | List[*str*] | :heavy_minus_sign: | List of allowed provider IDs | [<br/>"openai",<br/>"anthropic",<br/>"google"<br/>] |
| `content_filter_builtins` | List[[components.ContentFilterBuiltinEntry](../components/contentfilterbuiltinentry.mdx)] | :heavy_minus_sign: | Builtin content filters applied to requests. Includes PII detectors and the regex-based prompt injection detector. | [<br/>\{<br/>"action": "redact",<br/>"label": "[EMAIL]",<br/>"slug": "email"<br/>}<br/>] |
| `content_filters` | List[[components.ContentFilterEntry](../components/contentfilterentry.mdx)] | :heavy_minus_sign: | Custom regex content filters applied to request messages | [<br/>\{<br/>"action": "redact",<br/>"label": "[API_KEY]",<br/>"pattern": "\\b(sk-[a-zA-Z0-9]\{48})\\b"<br/>}<br/>] |
| `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the guardrail was created | 2025-08-24T10:30:00Z |
| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the guardrail | Guardrail for production environment |
| ~~`enforce_zdr`~~ | *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. | false |
| `enforce_zdr_anthropic` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided. | false |
| `enforce_zdr_google` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided. | false |
| `enforce_zdr_openai` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided. | false |
| `enforce_zdr_other` | *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 |
| `enforce_zdr_xai` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention for xAI models. Falls back to enforce_zdr when not provided. | false |
| `id` | *str* | :heavy_check_mark: | Unique identifier for the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
| `ignored_models` | List[*str*] | :heavy_minus_sign: | Array of model canonical_slugs to exclude from routing | [<br/>"openai/gpt-4o-mini-2024-07-18"<br/>] |
| `ignored_providers` | List[*str*] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [<br/>"azure"<br/>] |
| `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | Spending limit in USD | 100 |
| `name` | *str* | :heavy_check_mark: | Name of the guardrail | Production Guardrail |
| `reset_interval` | [OptionalNullable[components.GuardrailInterval]](../components/guardrailinterval.mdx) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly |
| `updated_at` | *OptionalNullable[str]* | :heavy_minus_sign: | ISO 8601 timestamp of when the guardrail was last updated | 2025-08-24T15:45:00Z |
| `workspace_id` | *str* | :heavy_check_mark: | The workspace ID this guardrail belongs to. | 0df9e665-d932-5740-b2c7-b52af166bc11 |