Skip to content
DEVELOPERS

10. Limits and headers

Requests per minute, response headers, request sizes and waiting time.

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-Requests is the permitted number of requests per minute;
  • X-RateLimit-Remaining-Requests is 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

API limits
PARAMETERVALUE
Body of a JSON request to the ALEM moduleNo more than 20 MB
Body of a multipart/form-data request to the ALEM moduleNo more than 100 MB
Waiting time for a model responseNo more than 15 minutes
Window for counting requests60 seconds, sliding
Blocking of an IP address15 minutes after 30 failed authorization attempts within 10 minutes

Streaming is recommended for lengthy generation.