Rate Limits
You can configure two types of rate limits:- RPM (Requests Per Minute): The maximum number of HTTP calls allowed.
- TPM (Tokens Per Minute): The maximum number of estimated tokens allowed.
- Cost (USD): The maximum spend allowed within the window.
429 Too Many Requests status code.
You can apply rate limits at two scopes:
- Workspace scope: Applies globally to all traffic in the workspace.
- Route scope: Configured within a Routing Rule to limit traffic to a specific endpoint (e.g.
/v1/chat/completions).
Rate Limit Response Headers
Every response from the gateway includes rate limit headers so you can track usage in real-time:
The
{type} suffix corresponds to the limit type: requests, tokens, or cost.
Example response headers:
429 Response Format
When a rate limit is exceeded, the gateway returns a JSON error body:Budget Caps
A budget cap is a hard limit on USD spend over a specific time period.- Navigate to Settings → Budgets.
- Set a monthly limit (e.g.
$500.00). - Set an alert threshold (e.g.
80%).
budget.threshold webhook (see Alerts).
When the total spend hits the hard limit ($500.00), the gateway completely stops processing requests. All new traffic will receive a 402 Payment Required response until the budget resets or is increased.