create_rate_limit
Create a rate limit to throttle requests or tokens by time unit, with conditions and grouping for precise control.
Instructions
Create a request or token throttle with conditions, group_by, type, unit, and value. conditions and group_by are required; use usage limits when you need a cumulative budget instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| conditions | Yes | Array of conditions that determine which requests this rate limit applies to | |
| group_by | Yes | Array of fields to group the rate limit by (e.g., ['virtual_key'], ['api_key', 'user_id']) | |
| type | Yes | What to rate limit: 'requests' or 'tokens' | |
| unit | Yes | Time unit: 'rpm' (per minute), 'rph' (per hour), or 'rpd' (per day) | |
| value | Yes | The maximum allowed value per unit (e.g., 100 rpm) | |
| name | No | Optional name for the rate limit | |
| workspace_id | No | Workspace ID to scope the limit to | |
| organisation_id | No | Organisation ID to scope the limit to |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Whether the tool call succeeded and returned structured data | |
| data | No | Structured success payload when ok is true | |
| error | No | Structured error payload when ok is false |