0
votes

we are working with the Google Cloud - Translate API. We need to translate more than the 100.000 characters per 100 seconds. The limitations describes the "Maximum" values per 100 seconds.

  • Characters per 100 seconds per project: 1.000.000
  • Characters per 100 seconds per project per user: 100.000

We don't understand when the first limitation (1.000.000) is relevant for our requests. The translation api is called with an api key from our backend application. What is the meaning of "user" in this context and how to use the maximum of 1.000.000 characters per 100 seconds?

If we request more than 100.000 characters we got 403 userRateLimitExceeded.

Can someone explain?

Thank you!

EDIT: We want to use the translate api from our server application (php) without any user restrictions. Request code:

`$url = 'https://www.googleapis.com/language/translate/v2?key='.$apiKey.'&q='.rawurlencode($inputText).'&source='.$sourceLanguage.'&target='.$targetLanguage;
$handle = curl_init($url);
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($handle);
$responseDecoded = json_decode($response, true);
$responseCode = curl_getinfo($handle, CURLINFO_HTTP_CODE);
curl_close($handle);`

For testing i setup the project quotas as follows: Conigured QUOTA

With the chrome postman plugin i tried several requests, but it is not possibile to translate more than 10 characters within 100 seconds. I thought that it should be possible to translate 30 characters within 100 seconds.

2

2 Answers

0
votes

You need the quotaID=userID parameter

See https://support.google.com/cloud/answer/7035610?hl=en for how to make your API requests from multiple users

0
votes

At the moment, quotas for API keys and similarly service accounts, are treated as user quota. Thus, explaining the 100 000 characters per 100 seconds limit. In the future, this may change per this feature request given that many users up-voted it (click Me too). Meanwhile, I suggest submitting a request to increase this specific quota per this FAQ.