Skip to content

Rate Limiting

The Chainabit API enforces rate limits on all endpoints to ensure fair usage and protect against abuse. Limits are applied per authenticated user, per endpoint.

Global Default

All endpoints are subject to a default rate limit unless a specific limit is configured:

ParameterValue
Requests120
Window60 seconds

This means each authenticated user can make up to 120 requests per minute to any given endpoint.

Auth Endpoint Limits

Authentication endpoints have tighter limits to protect against brute-force attacks:

EndpointLimitWindow
POST /auth/register10 requests5 minutes
POST /auth/login8 requests60 seconds
POST /auth/resend-confirmation5 requests5 minutes
POST /auth/confirm-email5 requests5 minutes
POST /auth/forgot-password3 requests5 minutes
POST /auth/reset-password5 requests5 minutes
POST /auth/exchange-recovery-code15 requests5 minutes
GET /auth/check-username20 requests60 seconds
POST /auth/claim-username5 requests60 seconds
POST /auth/change-email10 requests60 seconds
POST /auth/change-password10 requests60 seconds

Other Specific Limits

EndpointLimitWindow
POST /billing/checkout5 requests60 seconds
POST /mcp60 requests60 seconds

Handling Rate Limit Errors

When you exceed the rate limit, the API responds with HTTP 429 Too Many Requests:

json
{
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "Rate limit exceeded"
  },
  "meta": {
    "requestId": "req_abc123",
    "durationMs": 1
  }
}
  1. Implement exponential backoff. When you receive a 429 response, wait before retrying. Double the wait time on each consecutive 429.
  2. Track your request rate. If you are approaching the limit, spread requests over time rather than sending them in bursts.
  3. Cache responses. For read-heavy workloads, cache responses client-side to reduce the number of API calls.

Example Backoff Strategy

Attempt 1: wait 1 second
Attempt 2: wait 2 seconds
Attempt 3: wait 4 seconds
Attempt 4: wait 8 seconds
(cap at 30 seconds)

Built with purpose.