mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-29 11:23:49 +08:00
5.5 KiB
5.5 KiB
CreateGuardrailRequest
Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
name |
str | ✔️ | Name for the new guardrail | My New Guardrail |
description |
OptionalNullable[str] | ➖ | Description of the guardrail | A guardrail for limiting API usage |
limit_usd |
OptionalNullable[float] | ➖ | Spending limit in USD | 50 |
reset_interval |
OptionalNullable[operations.CreateGuardrailResetIntervalRequest] | ➖ | Interval at which the limit resets (daily, weekly, monthly) | monthly |
allowed_providers |
List[str] | ➖ | List of allowed provider IDs | [ "openai", "anthropic", "deepseek" ] |
allowed_models |
List[str] | ➖ | Array of model identifiers (slug or canonical_slug accepted) | [ "openai/gpt-5.2", "anthropic/claude-4.5-opus-20251124", "deepseek/deepseek-r1-0528:free" ] |
enforce_zdr |
OptionalNullable[bool] | ➖ | Whether to enforce zero data retention | false |