Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 40 additions & 5 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19465,10 +19465,21 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/UpdateUsageLimitsPolicyRequest'
example:
credit_limit: 2000.0
alert_threshold: 1500.0
reset_usage_for_value: api-key-123
examples:
updateLimits:
summary: Update credit limit and alert threshold
value:
credit_limit: 2000.0
alert_threshold: 1500.0
reset_usage_for_value: api-key-123
updateConditions:
summary: Replace the policy conditions
value:
conditions:
- key: workspace_id
value: workspace-123
- key: model
value: '@openai/*'
responses:
'200':
description: OK
Expand Down Expand Up @@ -37921,6 +37932,19 @@ components:
type: string
maxLength: 255
description: Policy name
description:
type: string
nullable: true
maxLength: 500
description: Policy description
conditions:
type: array
minItems: 1
items:
$ref: '#/components/schemas/Condition'
description: >-
Array of conditions that define which requests the policy applies to.
If provided, this replaces the existing conditions on the policy.
credit_limit:
type: number
minimum: 0
Expand All @@ -37934,7 +37958,18 @@ components:
type: string
nullable: true
enum: [monthly, weekly]
description: Reset period. Set to null to remove periodic reset.
description: Reset period. Set to null to remove periodic reset. Cannot be combined with periodic_reset_days.
periodic_reset_days:
type: integer
nullable: true
minimum: 1
maximum: 365
description: Number of days after which usage resets. Cannot be combined with periodic_reset.
next_usage_reset_at:
type: string
format: date-time
nullable: true
description: ISO 8601 timestamp for the next scheduled usage reset.
reset_usage_for_value:
type: string
description: Reset usage for a specific value key (e.g., API key). This will reset the usage counter for that key to 0.
Expand Down
Loading