# Rate Limits

Human URL: https://dochorizon.klippa.com/docs/api/rate-limits
Source: https://dochorizon.klippa.com/docs/llms/api/rate-limits.md

> Learn about how rate limits affect your project

---

Rate limits define the maximum number of requests that can be made to an endpoint. For Doxis AI.dp, this pertains specifically to the number of capturing requests users can make simultaneously. Note that rate limits apply to the API only, and requests are tracked based on API keys. The rate limit is enforced based on the combination of a project and each enabled service within that project.

### How Rate Limits Work

The rate limit enforces a maximum number of concurrent requests. This determines how many capturing requests can be ongoing at the same time. The limit is set on the unique pair of service type and per project. This guarantees the stability and correct functionality of the platform.

Only synchronous endpoints are subject to rate limits, as asynchronous requests are executed based on capacity and do not affect the functionality of the platform.

#### Rate Limit Headers

When making an API request, the users can receive the rate limits specific to their project and service in Headers. Rate limit headers are included in all API requests, regardless of whether they succeed or fail. The headers are as follows:

| Key | Header |
| --- | --- |
| **X-RateLimit-Concurrent-Limit:** | This indicates the maximum number of concurrent requests allowed for the current service and project (integer). |
| **X-RateLimit-Concurrent-Remaining:** | This shows the number of concurrent requests remaining for the current service and project (integer). |

#### Default Rate Limits per Service

Each service on the Doxis AI.dp platform has a standard concurrent rate limit, as illustrated in the table below.

| Service | Rate Limit |
| --- | --- |
| Financial | 50 |
| Prompt Builder | 20 |
| Identity | 20 |
| Bank Statement | 15 |
| Salary Slip | 20 |
| Custom Processor | 15 |
| E-invoice | 15 |
| Medical Prescription | 15 |
| Payment Card | 15 |
| Generic Model | 20 |
| Model Builder | 15 |
| Components  Model | 30 |

Your project may have higher limits configured. To check the effective limit for a service, inspect the `X-RateLimit-Concurrent-Limit` response header on any request.

#### Header Error When Hitting the Rate Limit

When the rate limit is exceeded, users will receive a standard **`TooManyRequests`** error response. The error code will be **`429`** with the message: *"You have exceeded the maximum amount of allowed concurrent requests on this capturer."* The requests will then have to be sent again, with the rate limit in mind.

#### Processing Many Documents at Once

Some workflows produce a burst of capture requests, for example a Flow Builder flow that splits a large scanned bundle into hundreds of separate documents and sends each one to the Financial model. The concurrent limit applies to these requests like any others: with a limit of 50, the first 50 documents start processing and every request beyond that receives the `429` error until a slot frees up.

To process large batches reliably:

- **Send documents in batches.** Keep the number of simultaneous requests below the limit of the service and start the next batch when the previous one finishes.
- **Use the asynchronous endpoints.** Asynchronous requests are queued based on capacity and are not subject to the concurrent rate limit.
- **Retry on 429.** Treat the `TooManyRequests` response as a signal to resend the request once earlier requests have finished.

For the recommended setup in the Flow Builder, see the [Flow Builder best practices](https://dochorizon.klippa.com/docs/llms/flow-builder/best-practices.md).

### How to Increase the Rate Limit

If you wish to increase your rate limit, please contact support. Users cannot adjust the limit on their own.