Rate limits
What is rate limiting?
Rate limiting is the practice of restricting the number of requests users can make to a specific API or service. It helps us manage the network traffic and to prevent infrastructure misuse and/or malicious attacks. Rate limits set the maximum number of requests that are allowed for the same application in a defined time period.
The MT API rate limit
For trial accounts, the rate limit set for the MT API is: 5 calls per 30 seconds.
For production accounts, the rate limit set for the MT API is: 100 calls per 30 seconds.
If the client application sends more requests than the limit allowed, instead of immediately returning a 429 status, the requests are sent to the queue as defined by the Throttling policy.
Throttling
Throttling is an internal policy in the MT API that queues requests exceeding the rate limits for possible future processing in a window of time.
- In MT API throttled requests are queued and retried for up to 60 seconds.
- This means that if the client application has a lower request timeout configured, it might experience timeout errors.
We recommend using at least 60 seconds as timeout to avoid timeout errors.
Encountering 429 errors
If the request cannot be processed after several retries due to rate limits, the API returns and error response with a 429 status code.
- Reduce the number of request by using batch requests when possible:
- Instead of submitting 1 request per each of the segments, make the most out of the API and send a translation request with up to 100 segments for a given language pair.
- This will start the translation process for the 100 segments in parallel, which will reduce massively the number of calls.
- Lastly, use concurrency and a retry strategy in your integration so you can set a number of outstanding requests at a time.