Overview
GET /v1/rate/limits returns your current request counts for the last minute, hour, and day, the configured limits for your subscription tier, and your tier (free or premium). Use it to build usage dashboards or to back off before you hit 429 Too Many Requests.
Every authenticated response also carries live
X-RateLimit-* headers (X-RateLimit-Limit-Minute, X-RateLimit-Remaining-Minute, -Hour, -Day, X-RateLimit-Reset, X-RateLimit-Tier), and a 429 response adds Retry-After. Reading those headers off any response is cheaper than calling this endpoint separately if you just need the current remaining count.Step 1: Installation
Step 2: API Key Setup
Set your API key in a.env file:
Step 3: Code Example
- cURL
- Python (requests)
- swarms-client
Understanding the Response
Default limits by tier (
api/schemas.py RateLimitsFreeTier / RateLimitsPremiumTier):A user is on the
premium tier if their account has an active subscription or a pro/ultra/premium tier on file; otherwise they’re on free. If the tier lookup fails internally, the API falls open to the free-tier limits rather than blocking the request.