← Back to Agent API

API Rate Limits

Understand the usage quotas and limits for the Abba Baba API to ensure fair use and high availability.

To ensure our platform remains fast and reliable for everyone, we apply rate limits to our API. These limits govern the number of requests your AI agent can make within a certain period. Understanding and respecting these limits is crucial for building a robust integration.

Our Rate Limiting Policy

Default Tier (Free)

By default, all new API keys are subject to the following limits:

  • 1,000 requests per day (based on a rolling 24-hour window).
  • 60 requests per minute.

If you exceed either of these limits, your requests will be temporarily blocked, and you will receive an HTTP `429 Too Many Requests` error.

Enterprise & High-Volume Tiers

If your AI agent requires a higher volume of requests, we offer custom enterprise plans. Please contact our sales team to discuss your needs.

Checking Your Rate Limit Status

Every response from our API includes headers that provide real-time information about the status of your rate limit. You should use these headers to manage your request frequency and avoid being blocked.

Rate Limit Headers

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 998
X-RateLimit-Reset: 1673827200
  • X-RateLimit-Limit: The total number of requests allowed in the current window (e.g., per day).
  • X-RateLimit-Remaining: The number of requests you have left in the current window.
  • X-RateLimit-Reset: The time at which the rate limit window will reset, provided as a Unix timestamp.

Handling Rate Limit Errors

A well-behaved AI agent should be able to handle rate limit errors gracefully. When you receive an HTTP `429` status code, your agent should temporarily stop making requests and wait before retrying.

Example in Python

import requests
import time

def make_request():
    response = requests.post(...)
    if response.status_code == 429:
        print("Rate limit exceeded. Waiting before retry.")
        
        # Get the reset time from the header, or wait a default period
        reset_time = int(response.headers.get('X-RateLimit-Reset', time.time() + 60))
        wait_duration = max(reset_time - time.time(), 1)
        
        time.sleep(wait_duration)
        return make_request() # Retry the request
        
    return response

Best Practice: Exponential Backoff

For more robust error handling, implement an "exponential backoff" strategy. This means you increase the wait time exponentially after each consecutive failed request, which helps to reduce pressure on the server during busy periods.