UpdateGuardrailRequest - TypeScript SDK

UpdateGuardrailRequest type definition

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

Example Usage

1import { UpdateGuardrailRequest } from "@openrouter/sdk/models";
2
3let value: UpdateGuardrailRequest = {};

Fields

FieldTypeRequiredDescriptionExample
allowedModelsstring[]Array of model identifiers (slug or canonical_slug accepted)[
“openai/gpt-5.2”
]
allowedProvidersstring[]New list of allowed provider IDs[
“openai”,
“anthropic”,
“deepseek”
]
contentFilterBuiltinsmodels.ContentFilterBuiltinEntry[]Builtin content filters to apply. Set to null to remove. Use slug “regex-prompt-injection” with action “block”, “flag”, or “redact” to enable heuristic prompt injection detection.[
{"action": "block","slug": "regex-prompt-injection"}
]
contentFiltersmodels.ContentFilterEntry[]Custom regex content filters to apply. Set to null to remove.<nil>
descriptionstringNew description for the guardrailUpdated description
enforceZdrbooleanWhether to enforce zero data retentiontrue
ignoredModelsstring[]Array of model identifiers to exclude from routing (slug or canonical_slug accepted)[
“openai/gpt-4o-mini”
]
ignoredProvidersstring[]List of provider IDs to exclude from routing[
“azure”
]
limitUsdnumberNew spending limit in USD75
namestringNew name for the guardrailUpdated Guardrail Name
resetIntervalmodels.GuardrailIntervalInterval at which the limit resets (daily, weekly, monthly)monthly