Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
APIKeyHashes | []string | ➖ | API key hashes | [ “c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93” ] |
Config | components.GuardrailCapacityPolicyConfig | ✔️ | N/A | { “bucket_by”: [ “member”, “model” ], “limits”: [ { “limit”: 100000, “models”: “all”, “unit”: “tokens” } ] } |
IsWorkspaceDefault | *bool | ➖ | Make this the workspace default for its policy type. Defaults to false. | |
MemberIds | []string | ➖ | Organization member user IDs | [ “user_2abcDEFghiJKLmnoPQRstu” ] |
MoveExistingAssignments | *bool | ➖ | When creating a new workspace default, also move the replaced default policy’s explicit member and API key assignments onto this policy. Defaults to false. | |
Name | string | ✔️ | Policy name | Engineering monthly budget |
OptedOutAPIKeyHashes | []string | ➖ | API keys that should not inherit the policy when it is the workspace default | [ “c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93” ] |
OptedOutMemberIds | []string | ➖ | Members that should not inherit the policy when it is the workspace default | [ “user_2abcDEFghiJKLmnoPQRstu” ] |
PolicyType | components.CreateCapacityGuardrailPolicyRequestPolicyType | ✔️ | N/A | |
WorkspaceID | string | ✔️ | Workspace the capacity policy belongs to. Capacity policies require an organization-scoped management key. | 0df9e665-d932-5740-b2c7-b52af166bc11 |