CreateGuardrailRequest - Go SDK

CreateGuardrailRequest type definition

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

Fields

FieldTypeRequiredDescriptionExample
Namestring✔️Name for the new guardrailMy New Guardrail
Descriptionoptionalnullable.OptionalNullable[string]Description of the guardrailA guardrail for limiting API usage
LimitUsd*float64Spending limit in USD50
ResetIntervaloptionalnullable.OptionalNullable[components.GuardrailInterval]Interval at which the limit resets (daily, weekly, monthly)monthly
AllowedProvidersoptionalnullable.OptionalNullable[[]string]List of allowed provider IDs[
“openai”,
“anthropic”,
“deepseek”
]
IgnoredProvidersoptionalnullable.OptionalNullable[[]string]List of provider IDs to exclude from routing[
“azure”
]
AllowedModelsoptionalnullable.OptionalNullable[[]string]Array of model identifiers (slug or canonical_slug accepted)[
“openai/gpt-5.2”,
“anthropic/claude-4.5-opus-20251124”,
“deepseek/deepseek-r1-0528:free”
]
EnforceZdroptionalnullable.OptionalNullable[bool]Whether to enforce zero data retentionfalse