The number of API requests you can make in a time window is limited. For some endpoints such as upload tasks, this limitation becomes more strict.
This limitation prevents malicious activities such as DOS attacks and guarantees the availability of API servers.
These limits may be reduced or increased over time, so to manage your rate limit, use the X-RATELIMIT response headers.
The X-RATELIMIT response headers are returned in each response. These headers specify the status of your rate limit.
If the X-RATELIMIT-REMAINING response header reaches 0, do not send another request and wait until your rate limit is reset, otherwise, you will exceed the rate limit. Use the X-RATELIMIT-RESET response header, which specifies how many seconds you should wait for your rate limit to be reset.
When you exceed the rate limit, you will receive a TOO_MANY_REQUESTS error code with HTTP 429 status. In this case, another response header named RETRY-AFTER is also returned, which specifies how many seconds you must wait before making a new request. The RETRY-AFTER response header has a higher priority than the X-RATELIMIT-RESET response header.