Rate Limits
To ensure fair usage and platform stability, the Garmint API enforces rate limits on all requests.Current Limits
| Limit Type | Value |
|---|---|
| Requests per minute | 60 |
| Requests per hour | 1,000 |
| Concurrent requests | 10 |
Need higher limits? Contact us for enterprise plans.
Rate Limit Headers
Every API response includes headers showing your current rate limit status:| Header | Description |
|---|---|
X-RateLimit-Limit | Max requests per window |
X-RateLimit-Remaining | Requests left in current window |
X-RateLimit-Reset | Unix timestamp when window resets |
Handling Rate Limits
When you exceed the rate limit, you’ll receive a429 Too Many Requests response:
Retry-After header indicates how many seconds to wait:
Retry Strategy
Implement exponential backoff:Best Practices
Batch requests when possible
Batch requests when possible
Instead of making many individual requests, batch operations where the API supports it.
Cache garment data
Cache garment data
The garment catalog doesn’t change frequently. Cache the response for at least an hour.
Use webhooks for async operations
Use webhooks for async operations
For generation requests, use the
webhookUrl parameter instead of polling:Monitor your usage
Monitor your usage
Check the rate limit headers and log them to catch issues before they become problems.
Rate Limit by Endpoint
Some endpoints have specific limits:| Endpoint | Limit |
|---|---|
POST /generate | 30/min (token-gated) |
POST /analyze | 60/min |
GET /garments | 60/min |
POST /upload | 20/min |
Token Limits
Separate from rate limits, generations consume tokens from your account:- Each generation costs 1 token
- Analysis and uploads are free
- Check your balance via the
X-Tokens-Remainingheader
402 Payment Required