Rate Limits & Plans

Understanding API usage limits and subscription plans

Rate Limits by Plan

Plan Rate Limit Monthly Quota Features
Free 5 req/sec 100 requests
  • No SLA
  • Community support
  • Basic features only
Developer 10 req/sec 2,000 requests
  • 99% uptime SLA
  • Next business day support
  • All features included
Business 50 req/sec 20,000 requests
  • 99% uptime SLA
  • Next business day support
  • All features included
Enterprise 200 req/sec 100,000 requests
  • 100% uptime SLA
  • 1 hour support response time
  • All features included

IP-Based Rate Limiting

In addition to API key limits, we also enforce IP-based rate limits:

  • 100 requests per minute per IP
  • Applies to all tiers
  • Independent of API key limits

Rate Limit Headers

Every API response includes headers to help you track both IP and API key rate limits:

Example Response Headers

X-RateLimit-Limit: 50
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1640995200

X-RateLimit-Monthly-Limit: 25000
X-RateLimit-Monthly-Remaining: 24500
X-RateLimit-Monthly-Reset: 1641024000

Handling Rate Limits

async function verifyFaces(reference, selfie) {
  const backoff = async (retries) => {
    const delay = Math.min(1000 * Math.pow(2, retries), 10000);
    await new Promise(resolve => setTimeout(resolve, delay));
  };

  let retries = 0;
  while (true) {
    try {
      const formData = new FormData();
      formData.append('reference', reference);
      formData.append('selfie', selfie);

      const response = await fetch('https://api.example.com/api/v2/verify', {
        method: 'POST',
        headers: {
          'Authorization': 'Bearer YOUR_API_KEY'
        },
        body: formData
      });

      // Check rate limit headers
      const remaining = response.headers.get('X-RateLimit-Remaining');
      const monthlyRemaining = response.headers.get('X-RateLimit-Monthly-Remaining');
      console.log(`Remaining requests: ${remaining} (${monthlyRemaining} this month)`);

      if (response.status === 429) {
        if (retries >= 3) throw new Error('Max retries exceeded');
        await backoff(retries++);
        continue;
      }

      const result = await response.json();
      if (result.is_spoof) {
        console.error('Spoof detected in selfie');
        return;
      }

      return result;
    } catch (error) {
      console.error('API request failed:', error);
      throw error;
    }
  }
}

Best Practices

  • Monitor your rate limit usage through response headers
  • Implement exponential backoff when rate limited
  • Cache API responses when possible
  • Batch requests when feasible
  • Set up alerts for rate limit warnings

Upgrading Your Plan

To upgrade your subscription plan:

  1. 1 Visit your account dashboard
  2. 2 Click on "Subscription Settings"
  3. 3 Select your desired plan
  4. 4 Update your billing information
  5. 5 Confirm the upgrade

Plan changes take effect immediately. For custom enterprise plans, please contact our sales team.