Skip to main content

Overview

KillB implements rate limiting to ensure fair usage and system stability.

Rate Limits

EnvironmentRequests per SecondBurst
Sandbox100200
Production50100

Headers

Response includes rate limit headers:
X-RateLimit-Limit: 50
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1704657600

Handling Rate Limits

const makeRequestWithRetry = async (url, options) => {
  const response = await fetch(url, options);
  
  if (response.status === 429) {
    const resetTime = response.headers.get('X-RateLimit-Reset');
    const waitTime = (resetTime * 1000) - Date.now();
    
    await new Promise(resolve => setTimeout(resolve, waitTime));
    return makeRequestWithRetry(url, options);
  }
  
  return response;
};

Best Practices

Wait when rate limited, don’t spam retries
Cache user data and reduce API calls
Avoid polling with webhooks
Group related operations together

Next Steps

Best Practices

Production integration tips