For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
ModelsChatRankingsDocs
DocsAPI ReferenceClient SDKsAgent SDKCookbookChangelog
DocsAPI ReferenceClient SDKsAgent SDKCookbookChangelog
    • Overview
    • Usage for Agents
  • TypeScript SDK
    • Overview
  • Python SDK
    • Overview
  • Go SDK
      • Analytics
      • APIKeys
      • Byok
      • Chat
      • Credits
      • Embeddings
      • Endpoints
      • Generations
      • Guardrails
        • Models
        • UpdateGuardrailRequest
      • OAuth
      • Observability
      • Organization
      • Presets
      • Providers
      • Rerank
      • Beta.Responses
      • Transcriptions
      • Speech
      • VideoGeneration
      • Workspaces
  • DevTools
    • Overview
    • Migrating to @openrouter/agent
LogoLogo
ModelsChatRankingsDocs
On this page
  • Fields
Go SDKAPI ReferenceModels

UpdateGuardrailRequest - Go SDK

UpdateGuardrailRequest type definition
Was this page helpful?
Previous

OAuth - Go SDK

OAuth method reference
Next
Built with

The Go SDK and docs are currently in beta. Report issues on GitHub.

Fields

FieldTypeRequiredDescriptionExample
AllowedModelsoptionalnullable.OptionalNullable[[]string]➖Array of model identifiers (slug or canonical_slug accepted)[
“openai/gpt-5.2”
]
AllowedProvidersoptionalnullable.OptionalNullable[[]string]➖New list of allowed provider IDs[
“openai”,
“anthropic”,
“deepseek”
]
ContentFilterBuiltinsoptionalnullable.OptionalNullable[[]components.ContentFilterBuiltinEntry]➖Builtin content filters to apply. Set to null to remove. The “flag” action is only supported for “regex-prompt-injection”; PII slugs (email, phone, ssn, credit-card, ip-address, person-name, address) accept “block” or “redact” only.[
{"action": "block","slug": "regex-prompt-injection"}
]
ContentFiltersoptionalnullable.OptionalNullable[[]components.ContentFilterEntry]➖Custom regex content filters to apply. Set to null to remove.<nil>
Descriptionoptionalnullable.OptionalNullable[string]➖New description for the guardrailUpdated description
EnforceZdroptionalnullable.OptionalNullable[bool]➖: 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, 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
EnforceZdrAnthropicoptionalnullable.OptionalNullable[bool]➖Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided.true
EnforceZdrGoogleoptionalnullable.OptionalNullable[bool]➖Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided.true
EnforceZdrOpenaioptionalnullable.OptionalNullable[bool]➖Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided.true
EnforceZdrOtheroptionalnullable.OptionalNullable[bool]➖Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided.true
IgnoredModelsoptionalnullable.OptionalNullable[[]string]➖Array of model identifiers to exclude from routing (slug or canonical_slug accepted)[
“openai/gpt-4o-mini”
]
IgnoredProvidersoptionalnullable.OptionalNullable[[]string]➖List of provider IDs to exclude from routing[
“azure”
]
LimitUsdoptionalnullable.OptionalNullable[float64]➖New spending limit in USD75
Name*string➖New name for the guardrailUpdated Guardrail Name
ResetIntervaloptionalnullable.OptionalNullable[components.GuardrailInterval]➖Interval at which the limit resets (daily, weekly, monthly)monthly