The Claid API uses a number of safeguards against bursts of incoming traffic to help maximize its stability. Image processing requests that come with relatively high intensity can be temporarily limited.
By default, users may issue up to 30 requests per minute and 1 request per second.
if you need to expand the limits to process even more images or use image batch processing to efficiently process multiple images, please contact us.
To explore the remaining restrictions, every image processing response contains relevant headers:
RateLimit-Limit indicates the request-quota associated with the user in the current time window.
RateLimit-Remaining indicates the remaining requests that you can issue in the current time window.
RateLimit-Reset is the number of seconds until the quota resets.
Example of a typical response headers
Let's explore the example of a typical response headers for an image processing request:
Besides, the RateLimit-Limit header indicates that we got under the first limit of 120requests per minute. This leaves us with 118remaining request that we can send in the next 32 seconds. When this time passes - the limits will be reset.
Example of a limits exceed response
If you exceed limits, the example of payload with response headers may look like this:
Here we can see that we've got a 429 status code which indicates that we exceeded the 4 requests per second rate limit. Since we don't have any remaining allowed requests, we will be able to process new images again in 1 second, when the limit will be reset.