Rate Limits

Distributed atomic Redis token buckets protect tenant quotas and upstream capacity.

Default Token Bucket Tiers

Bucket ScopeRefill RateBurst Capacity
Per API Key60 / min10
Per Organization120 / min20
Global Platform Upstream600 / min60

Rate-Limit Response Headers

HeaderTypeDescription
X-Request-IDstringUnique request trace identifier echoed in `meta.request_id`
X-RateLimit-LimitintegerMaximum burst token capacity for the active rate-limit bucket
X-RateLimit-RemainingintegerRemaining tokens available in the tightest tenant rate-limit bucket
X-RateLimit-ResetintegerUnix epoch timestamp (seconds) when the rate-limit bucket reaches full capacity
Retry-AfterintegerSeconds to wait before retrying

Fail-Closed Policy

If Redis is temporarily unreachable, the gateway fails closed with HTTP 503 SERVICE_UNAVAILABLE and Retry-After without touching the wallet.