API Reference
Rate Limits

Rate Limits

Rate limiting policies and headers for the Xilos API.

Rate Limit Headers

Every API response includes rate limit headers:

HeaderDescription
X-RateLimit-LimitMaximum requests per minute for this key
X-RateLimit-RemainingRemaining requests in the current window
X-RateLimit-ResetUnix timestamp when the window resets

Plan Limits

PlanRequests/MinuteRequests/Day
Starter6010,000
Professional200100,000
Enterprise1,000Unlimited
On-PremiseUnlimitedUnlimited

Virtual Key Limits

Virtual Keys can have custom rate limits set by the organization admin. When a Virtual Key exceeds its rate limit:

  1. The response returns 429 Too Many Requests.
  2. The Retry-After header indicates when to retry.
  3. The key is not deactivated — it simply waits for the window to reset.

Info: Rate limits and budget limits are independent. A key can hit its rate limit without exceeding its budget, and vice versa.

Handling 429 Responses

import time
from openai import OpenAI, RateLimitError
 
client = OpenAI(
    api_key="YOUR_XILOS_API_KEY",
    base_url="https://api.xilos.ai/api/v1"
)
 
def query_with_retry(messages, max_retries=3):
    for attempt in range(max_retries):
        try:
            return client.chat.completions.create(
                model="xilos",
                messages=messages
            )
        except RateLimitError:
            if attempt == max_retries - 1:
                raise
            wait = 2 ** attempt  # 1s, 2s, 4s
            time.sleep(wait)

Best Practices

  • Use Virtual Keys with appropriate rate limits for each service
  • Implement exponential backoff in your client code
  • Cache responses locally to reduce API calls
  • Batch queries where possible
  • Monitor your rate limit usage in the dashboard
  • Contact support if you need higher limits