Google translate API rate limit much lower than documented quota

Hi - I'm running googleLanguageR to call the cloud translation api in some R code. I've run this code many times before. For the first time today, I am getting the Request Status Code:  403 that Characters per 100 seconds rate limit reached yet it's only translating Translating text: 23 characters at a time. 

When I check my quota dashboard it clearly indicates my default requests per minute are 300,000 and I'm currently using 5.143! At this rate my extremely small translation task will take days instead of minutes.

Is the api call somehow not reading my account correctly? Other options I can tweak to keep this running?

thank you,

megan

2 2 889
2 REPLIES 2

I'm updating this message to note that I've seen some old postings about this sometimes being triggered by a hidden quota of characters per second. Those posts recommend requesting an increase to the (at the time) total characters/day quota. Presumably now I would request an increase to the total characters/minute quota, although a) I do not seem to have exceeded that and b) I cannot seem to request an increase, no matter how much I follow the documentation for which roles to create and add to my profile to make the request. Could really use some help. Thanks!

It seems like you're encountering a rate limit issue with the Google Cloud Translation API despite having sufficient quota. Here are a few steps you can take to troubleshoot and potentially resolve this issue:

  • Double-Check Quotas: While you mentioned that your quota seems sufficient, it's worth double-checking if there are any specific quotas related to the Translation API that might be getting exceeded. Sometimes, there are different quotas for different types of requests (e.g., per character translated, per API call, etc.).
  • Verify API Key or Credentials: Ensure that the API key or credentials you're using to authenticate your requests are correct and properly configured. Sometimes, issues can arise if there are authentication problems.
  • Check for Changes in API Usage Policies: Google occasionally updates its usage policies and quotas, so it's possible that there have been changes since you last checked. Review the latest documentation or announcements related to the Translation API to see if there are any relevant updates.
  • Rate Limiting Logic: Review the logic in your code that sends requests to the Translation API. Make sure that you're not inadvertently sending an unusually high number of requests in a short period, which could trigger rate limiting.
  • Error Handling: Implement proper error handling in your code to handle rate limit errors gracefully. You can use exponential backoff strategies to automatically retry failed requests after a brief delay, which can help alleviate rate limit issues.

If none of the above steps resolve the issue, consider reaching out to Google Cloud support for assistance. They can provide specific guidance and help troubleshoot any underlying issues with your account or API usage.