Rate Limits

Rate limits protect the API from abuse and ensure fair access for all users. Limits are applied per API key and vary by account tier.

Limits by Tier

TierRPM (Requests/min)TPM (Tokens/min)Concurrent Requests
Free1040,0002
Standard60200,00010
Pro2001,000,00030
EnterpriseCustomCustomCustom

RPM = Requests Per Minute, TPM = Tokens Per Minute. Both limits apply independently — you may hit either one first.

Rate Limit Headers

Every API response includes headers indicating your current usage:

HeaderDescription
x-ratelimit-limit-requestsMax requests per minute
x-ratelimit-limit-tokensMax tokens per minute
x-ratelimit-remaining-requestsRemaining requests in current window
x-ratelimit-remaining-tokensRemaining tokens in current window
x-ratelimit-reset-requestsSeconds until request limit resets
x-ratelimit-reset-tokensSeconds until token limit resets

Handling Rate Limits

429 Response

When you exceed a rate limit, the API returns a 429 Too Many Requests response:

{
  "error": {
    "message": "Rate limit exceeded",
    "type": "rate_limit_error",
    "code": "rate_limit_exceeded"
  }
}

Retry Strategy

Implement exponential backoff when receiving 429 errors:

import time

def api_call_with_retry(client, max_retries=5, **kwargs):
    for attempt in range(max_retries):
        try:
            return client.chat.completions.create(**kwargs)
        except Exception as e:
            if "rate_limit" in str(e) and attempt < max_retries - 1:
                wait_time = (2 ** attempt) + 1
                time.sleep(wait_time)
            else:
                raise

Best Practices

  • Monitor headers — Track x-ratelimit-remaining-* to anticipate limits
  • Batch requests — Reduce the number of API calls by batching where possible
  • Cache responses — Avoid duplicate requests for the same content
  • Upgrade tier — Contact sales for higher limits
  • Use streaming — Streaming responses consume tokens gradually, reducing burst TPM

Model-Specific Limits

Some high-demand models may have lower effective rate limits during peak usage. Check the response headers for real-time limits.

Upgrading

To increase your rate limits, contact support@linkwo.com to upgrade to a higher tier. Enterprise customers can request custom limits.