Example Usage
import { CapacityGuardrailPolicy } from "@openrouter/sdk/models";
let value: CapacityGuardrailPolicy = {
config: {
bucketBy: [
"member",
"model",
],
limits: [
{
limit: 100000,
models: "all",
unit: "tokens",
},
],
},
id: "550e8400-e29b-41d4-a716-446655440000",
name: "Engineering monthly budget",
policyType: "rate_limit",
};
Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
config | models.GuardrailCapacityPolicyConfig | ✔️ | N/A | { “bucket_by”: [ “member”, “model” ], “limits”: [ { “limit”: 100000, “models”: “all”, “unit”: “tokens” } ] } |
id | string | ✔️ | Policy ID | 550e8400-e29b-41d4-a716-446655440000 |
name | string | ✔️ | Policy name | Engineering monthly budget |
policyType | models.CapacityGuardrailPolicyPolicyType | ✔️ | N/A |