About Rate Limits

The Qube API enforces request rate limits to ensure stability and fair usage of the API. These limits prevent excessive requests from overloading the server, allowing all users to access the API smoothly and efficiently.

Rate Limit Policy

  1. Request Limit

    • Each API key is limited to a maximum of 300 requests per hour.

    • If the limit is exceeded, the request will be rejected with a 429 Too Many Requests status code.

Error Response Example

If the rate limit is exceeded, the following error response will be returned:

{
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "Too many requests. Please try again later.",
    "details": {
      "projectId": "<project ID>"
    }
  }
}

Solutions

If the rate limit is reached, consider the following approaches:

  1. Implement a Retry Mechanism

    • Detect the 429 error code in the client and retry the request after an appropriate interval.

    • It is recommended to use an exponential backoff algorithm for retries.

  2. Optimize Requests

    • Only send necessary requests and avoid redundant API calls.

    • Utilize batch processing or caching to reduce the number of requests.

Last updated

Was this helpful?