Limits
Algorithm
Rate limits use a sliding window algorithm with 1-minute granularity.Response headers
Every response includes rate limit information:Storage quota headers
Blob upload responses also include:When limits are exceeded
The relay returns429 Too Many Requests with a Retry-After header:
Storage exceeded
When blob storage quota is full, uploads are rejected with507 Insufficient Storage:
Handling rate limits in code
Message limits
Best practices
- Check
Retry-After— do not implement fixed-delay retries. Use the value from the header. - Implement exponential backoff for transient failures (5xx errors).
- Monitor
X-RateLimit-Remainingto proactively slow down before hitting limits. - Clean up blobs you no longer need to stay within storage quotas.
- Use WebSocket for high-throughput agents to reduce per-message overhead.