Master API rate limits, headers, and production throttling strategies
How WAVE counts and enforces API request limits
WAVE uses a sliding window algorithm with token bucket burst support to track API usage. Each request consumes tokens from your bucket, which refills at a constant rate.
Your limit resets continuously. If you make 60 requests at 12:00:00, you can make another at 12:01:00.
Pro and Enterprise tiers allow short bursts above the sustained rate for handling traffic spikes.
Resource-intensive operations (transcoding, uploads) consume more tokens than simple reads.
Best for:
Best for:
Best for:
Track your API usage with response headers
HTTP/1.1 200 OK Content-Type: application/json X-RateLimit-Limit: 1000 X-RateLimit-Remaining: 847 X-RateLimit-Reset: 1704067200 X-RateLimit-Window: 60 X-RateLimit-Policy: streams-list;w=60;burst=50 X-RateLimit-Scope: api-key X-Daily-Quota-Remaining: 498532
| Header | Type | Description | Example | When Present |
|---|---|---|---|---|
X-RateLimit-Limit | integer | Maximum number of requests allowed in the current window | 1000 | Always |
X-RateLimit-Remaining | integer | Number of requests remaining in the current window | 847 | Always |
X-RateLimit-Reset | integer | Unix timestamp (seconds) when the rate limit window resets | 1704067200 | Always |
X-RateLimit-Window | integer | Duration of the rate limit window in seconds | 60 | Always |
X-RateLimit-Policy | string | Rate limit policy identifier for this endpoint | streams-create;w=60;burst=20 | Always |
Retry-After | integer | Seconds to wait before retrying (only on 429 responses) | 45 | 429 responses only |
X-RateLimit-Scope | string | Scope of the rate limit (api-key, user, ip, global) | api-key | Always |
X-Daily-Quota-Remaining | integer | Remaining daily quota (resets at midnight UTC) | 9847 | Free/Pro tiers |
What to do when you hit rate limits
HTTP/1.1 429 Too Many Requests
Content-Type: application/json
Retry-After: 45
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1704067245
{
"error": {
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded. Please retry after 45 seconds.",
"details": {
"limit": 100,
"remaining": 0,
"reset": 1704067245,
"retryAfter": 45,
"scope": "api-key",
"policy": "streams-create;w=60"
}
}
}Retry-After header. Using exponential backoff without checking this header may result in longer wait times than necessary.Always use the Retry-After header value instead of arbitrary delays.
Cache API responses locally with appropriate TTLs to reduce redundant requests.
Replace polling with webhooks for real-time updates and massive rate limit savings.
Use bulk endpoints and pagination instead of individual requests for multiple items.
Track X-RateLimit-Remaining and alert when below 20%.
Our SDKs handle rate limits, retries, and backoff automatically. Don't reinvent the wheel.