Skip to main content
The ChatGrid API uses a sliding-window rate limiter to protect the platform from abuse and ensure fair usage.

Limits

Auth methodDefault limitWindow
API keyConfigurable per key (default 120 req/min)1 minute
JWT200 req/min1 minute
API key rate limits can be customized when the key is created. Contact support if you need higher limits.

Rate limit headers

Every response includes rate limit headers so you can track your usage:
HeaderDescription
X-RateLimit-LimitMaximum requests allowed in the current window
X-RateLimit-RemainingRequests remaining before the limit is reached
X-RateLimit-ResetUnix epoch timestamp (seconds) when the window resets
Example response headers:
X-RateLimit-Limit: 120
X-RateLimit-Remaining: 117
X-RateLimit-Reset: 1711843260

Exceeding the limit

When you exceed your rate limit, the API returns a 429 status code with a Retry-After header indicating how many seconds to wait:
{
  "object": "error",
  "status": 429,
  "code": "rate_limit_exceeded",
  "message": "Rate limit exceeded"
}
HTTP/1.1 429 Too Many Requests
Retry-After: 42
X-RateLimit-Limit: 120
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1711843260

Best practices

  1. Check headers proactively. Monitor X-RateLimit-Remaining and slow down before hitting the limit.
  2. Implement exponential backoff. On 429 responses, wait at least Retry-After seconds, then retry with increasing delays.
  3. Use batch endpoints. The batch nodes endpoint lets you perform up to 100 operations in a single request.
  4. Cache responses. For data that does not change often (board metadata, node positions), cache locally to reduce request volume.
import time
import requests

def make_request(url, headers):
    response = requests.get(url, headers=headers)

    if response.status_code == 429:
        retry_after = int(response.headers.get("Retry-After", 5))
        time.sleep(retry_after)
        return make_request(url, headers)

    return response