A permitted number of requests per minute may be set for an API token, and for a “Sign in with QAIRU” application a permitted number of requests per minute for each student. In this case each response contains the following headers:
X-RateLimit-Limit-Requestsis the permitted number of requests per minute;X-RateLimit-Remaining-Requestsis the number of requests remaining in the current window.
When the limit is exceeded, a 429 response is returned with the code rate_limit_exceeded and the Retry-After header containing the number of seconds until a request may be repeated.
10.1. Request identifier
Each response contains the X-Request-ID header with the request identifier. It is recommended to keep the identifier in the logs of the client application and to state it when contacting the university.
10.2. Request size and waiting time
| PARAMETER | VALUE |
|---|---|
| Body of a JSON request to the ALEM module | No more than 20 MB |
Body of a multipart/form-data request to the ALEM module | No more than 100 MB |
| Waiting time for a model response | No more than 15 minutes |
| Window for counting requests | 60 seconds, sliding |
| Blocking of an IP address | 15 minutes after 30 failed authorization attempts within 10 minutes |
Streaming is recommended for lengthy generation.