# Rate limits and quotas

At CSPR.cloud, we distinguish between rate limits and quotas to ensure efficient API management.

## Rate limit

We impose a limit on the number of requests per minute. This measure helps manage load and avoid overloading our systems.

## Quotas

Quotas control the overall call rates over an extended period, often tied to subscription tiers.

* **Long-term Management:** Quotas determine the total number of calls that can be made in a set period, like a month.
* **Tier-based Access:** For example, a free tier might allow 10,000 calls per month, while a premium tier could permit up to 10,000,000 calls in the same timeframe.

Exceeding these limits triggers a 429 error, signaling a rate limit breach.

## Free tier limits

The free tier limits are set to ensure that you can test the API and integrate it into your application.

### Mainnet

| Service             | Monthly quota | Daily quota | Rate limit /min |
| ------------------- | ------------- | ----------- | --------------- |
| CSPR.Node Proxy     | 20,000        | 1,200       | 100             |
| CSPR.Node Proxy SSE | 5,000         | 200         | 10              |
| CSPR.Cloud API      | 100,000       | 6,000       | 100             |

### Testnet

| Service             | Monthly quota | Daily quota | Rate limit /min |
| ------------------- | ------------- | ----------- | --------------- |
| CSPR.Node Proxy     | 20,000        | 1,200       | 100             |
| CSPR.Node Proxy SSE | 5,000         | 200         | 10              |
| CSPR.Cloud API      | 100,000       | 6,000       | 100             |

## Handling limits

To effectively manage your API usage and comply with rate limit or quota, consider the following strategies:

* **Upgrade to Premium Tier:** If your needs exceed the free tier quota, consider upgrading to our Premium tier for higher limits. You can apply at [CSPR.cloud](https://cspr.cloud).
* **Implement a Backoff-Retry Strategy:** In cases where you encounter a 429 error (rate limit or quota exceeded), it's advisable to implement a backoff-retry strategy. This involves reducing the frequency of your API requests to stay within the allowed limits.
* **Monitor API Calls:** Utilize logging tools to monitor your application’s API usage. This can help you identify patterns and optimize your request strategy to ensure efficient usage.
* **Lazy Loading Technique:** To reduce unnecessary API calls, implement lazy loading in your application. Trigger API calls based on user interactions, such as clicking a button or reaching a specific section of a page, to minimize the number of requests.

Adhering to these strategies will help you efficiently manage your API usage within the CSPR.cloud environment.
