Reputation: 1073
If so, what are the limits? Do the CV api calls block or error if rate limit exceeded?
Upvotes: 1
Views: 2999
Reputation: 4424
From the Optical Character Recognition (OCR) documentation:
The free tier limits the request rate to 20 calls per minute. The paid tier allows 10 requests per second (RPS) that can be increased upon request. Use the Azure support channel or your account team to request a higher request per second (RPS) rate.
So, the limit of 10 requests per second can be changed.
Do the CV api calls block or error if rate limit exceeded?
Yes. It returns 429 Too Many Requests
HTTP Status Code on requests to start an analysis.
Obs: I would like just to make an important observation, that should be on documentation but isn't: Those limits include all requests for that endpoint.
So when you execute a first request sending the image to be processed, and execute another one to know if its analysis result is ready, that counts like 2 requests.
It could be obvious, but not to me. I first thought that only requests to "start" the analysis were limited, and requests to get the status of the analysis won't be counted. It broke my code and I could not understand why, until realize it...
Upvotes: 3
Reputation: 71
It depends on the plan you choose for your computer vision resource.
If you are using the Free instance, you can do 20 requests per minute. And if you are using the standard plan you can send 10 requests per second.
You can find more detail here: https://azure.microsoft.com/en-us/pricing/details/cognitive-services/computer-vision/
Upvotes: 4