API Rate Limits & Request Quotas

Understand how CloudNexus enforces rate limits, how to monitor your quota usage, and best practices for handling throttling in production systems.

ℹ️
Algorithm: CloudNexus uses a sliding window counter combined with token bucket pacing for all REST API endpoints. Limits reset dynamically per minute and per day.

Rate Limit Headers

Every CloudNexus API response includes rate limit headers to help you track quota consumption. These are included in both successful and error responses.

Header Type Description
X-RateLimit-Limit Integer Maximum requests allowed in the current window
X-RateLimit-Remaining Integer Requests remaining in the current window
X-RateLimit-Reset Unix Timestamp Time when the rate limit window resets
Retry-After Integer (seconds) Only on 429 responses. Seconds to wait before retrying

Plan-Based Limits

Rate limits scale based on your subscription tier. Enterprise customers can request custom limits through their dedicated support engineer.

d>1,000
Plan Requests/Minute Requests/Day Batch Limits
Free 60 1,000 10 per call
Pro 50,000 100 per call
Enterprise Custom (up to 50k) Unlimited 1,000 per call

Handling 429 Too Many Requests

When you exceed your quota, the API returns a 429 status code with a structured JSON body. Always respect the Retry-After header.

HTTP Response 429
{
  "error": "rate_limit_exceeded",
  "message": "You have exceeded your allowed request quota for this window.",
  "retry_after": 24,
  "documentation_url": "https://docs.cloudnexus.com/api/v1/rate-limits/requests",
  "quota_reset_at": "2025-12-01T14:35:00Z"
}

Implementation Examples

Implement exponential backoff with jitter to gracefully handle throttling without overwhelming the API during recovery.

JavaScript / Node.js
async function makeRequestWithRetry(url, options, maxRetries = 3) {
  for (let attempt = 0; attempt <= maxRetries; attempt++) {
    const res = await fetch(url, options);
    
    if (res.status === 429) {
      const retryAfter = parseInt(res.headers.get('retry-after') || '', 10) || Math.pow(2, attempt) * 1000;
      console.warn(`Rate limited. Retrying in ${retryAfter}ms`);
      await new Promise(r => setTimeout(r, retryAfter));
      continue;
    }
    
    return res.json();
  }
  throw new Error('Max retries exceeded due to rate limiting');
}
Python
import time
import requests

def cloudnexus_request(endpoint, retries=3):
    for i in range(retries):
        res = requests.get(endpoint)
        if res.status_code == 429:
            wait = float(res.headers.get('retry-after', 2**i))
            print(f"Rate limited. Waiting {wait}s...")
            time.sleep(wait)
            continue
        return res.json()
    raise Exception("Exceeded retry limit")

Best Practices

⚠️
Temporary blocks: Repeatedly ignoring 429 responses or hammering the API after throttling may trigger an automated IP-level block for up to 24 hours. Contact support if you believe this was applied in error.