TypeScript SDKOperations

UpdateGuardrailData - TypeScript SDK

UpdateGuardrailData method reference

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

The updated guardrail

Example Usage

1import { UpdateGuardrailData } from "@openrouter/sdk/models/operations";
2
3let value: UpdateGuardrailData = {
4 id: "550e8400-e29b-41d4-a716-446655440000",
5 name: "Production Guardrail",
6 createdAt: "2025-08-24T10:30:00Z",
7};

Fields

FieldTypeRequiredDescriptionExample
idstring✔️Unique identifier for the guardrail550e8400-e29b-41d4-a716-446655440000
namestring✔️Name of the guardrailProduction Guardrail
descriptionstringDescription of the guardrailGuardrail for production environment
limitUsdnumberSpending limit in USD100
resetIntervaloperations.UpdateGuardrailResetIntervalResponseInterval at which the limit resets (daily, weekly, monthly)monthly
allowedProvidersstring[]List of allowed provider IDs[
“openai”,
“anthropic”,
“google”
]
allowedModelsstring[]Array of model canonical_slugs (immutable identifiers)[
“openai/gpt-5.2-20251211”,
“anthropic/claude-4.5-opus-20251124”,
“deepseek/deepseek-r1-0528:free”
]
enforceZdrbooleanWhether to enforce zero data retentionfalse
createdAtstring✔️ISO 8601 timestamp of when the guardrail was created2025-08-24T10:30:00Z
updatedAtstringISO 8601 timestamp of when the guardrail was last updated2025-08-24T15:45:00Z