Skip to main content
Rate limits cap requests per minute (RPM) and tokens per minute (TPM) per virtual key. Like budgets, they are enforced atomically in Redis before the request reaches a provider.

Limit types

LimitUnitResets
RPMRequests per minuteEvery 60-second rolling window
TPMTokens per minuteEvery 60-second rolling window
Both limits use Redis atomic counters with a 60-second TTL. The check and increment happen in a single Lua script — no race condition across replicas.

When limits are hit

{
  "error": {
    "type": "rate_limit_exceeded",
    "message": "Rate limit exceeded: 60 requests per minute.",
    "retry_after": 23,
    "code": 429
  }
}
retry_after is the number of seconds until the current window resets.

Setting limits

Dashboard

Console → Keys & Limits — edit the key and set RPM/TPM in the Rate limits section.

REST API

curl -X PATCH https://api.wardin.ai/v1/keys/key_01j... \
  -H "Authorization: Bearer wardin_sk_ADMIN_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "rpmLimit": 60,
    "tpmLimit": 100000
  }'
Set either field to null to remove that limit.

User-level limits

In addition to per-key limits, you can set limits on a user account that cap their total usage across all keys they own. Configure the per-user caps in Console → Keys & Limits.
Use caseSuggested RPMSuggested TPM
Interactive developer60200,000
CI / automation20500,000
Production applicationnull (use budget only)null
For production applications, monthly budget is usually the right control; RPM/TPM are better suited for preventing runaway loops.