# Rate limiting

In order to keep the Askara infrastructure running smoothly for everyone, a rate limiting system was put in place.
By default, all new applications will be subject to standard limits of 5000 requests, with a 500 requests allowance replenishment every 15 minutes.
The mechanism used implements the [token bucket algorithm](https://en.wikipedia.org/wiki/Token_bucket).

## Checking rate limiting request information

You can find the rate limiter information in the API responses from Askara API.
Here is an example of the rate limiter header to check for current rate limiting status :

```
x-ratelimit-limit: 5000
x-ratelimit-remaining: 4997
x-ratelimit-reset: 1745496254
```

`x-ratelimit-remaining` is the number of requests you can still send. `x-ratelimit-reset` is a Unix timestamp: while your allowance is not exhausted it equals the current time, and once it is empty it gives the time at which the next requests will be allowed again.
In the standard configuration, you will get 500 requests allowance every 15 minutes and the maximum requests allowance in one go is 5000.

## Per-user limit

In addition to the per-application limit, each Askara user account is limited to 200 requests per minute (sliding window), whatever the application making the calls. This limit protects against runaway clients, such as an infinite polling loop.

When it is exceeded, the API responds with `429 Too Many Requests` and the message `Rate limit exceeded. Please slow down.`. The response carries a `Retry-After` header (in seconds) and `x-ratelimit-limit: 200`, `x-ratelimit-remaining: 0` and `x-ratelimit-reset` headers. Wait for the `Retry-After` delay before sending new requests.

The `x-ratelimit-*` headers returned on successful responses describe the per-application limit only.

## Increasing limits

Contact us to describe your use case and find out if the limits can be upgraded for your app.