TypeScript SDKOperations

CreateGuardrailRequest - TypeScript SDK

CreateGuardrailRequest method reference

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

Example Usage

1import { CreateGuardrailRequest } from "@openrouter/sdk/models/operations";
2
3let value: CreateGuardrailRequest = {
4 name: "My New Guardrail",
5};

Fields

FieldTypeRequiredDescriptionExample
namestring✔️Name for the new guardrailMy New Guardrail
descriptionstringDescription of the guardrailA guardrail for limiting API usage
limitUsdnumberSpending limit in USD50
resetIntervaloperations.CreateGuardrailResetIntervalRequestInterval at which the limit resets (daily, weekly, monthly)monthly
allowedProvidersstring[]List of allowed provider IDs[
“openai”,
“anthropic”,
“deepseek”
]
allowedModelsstring[]Array of model identifiers (slug or canonical_slug accepted)[
“openai/gpt-5.2”,
“anthropic/claude-4.5-opus-20251124”,
“deepseek/deepseek-r1-0528:free”
]
enforceZdrbooleanWhether to enforce zero data retentionfalse