Gemini API - 429 Resource has been exhausted (e.g. check quota).

I have implemented a logic where I have created 15 API keys and allowed access to them. The whole process goes to GeminiPro1.0, which is Google's AI. The reason for all this is that if I use only one API key simultaneously, the entire process takes 4-5 days, as I want to stay outside the 60 calls per minute per API key limit, so that Gemini can be used for free. Accordingly, I now have 15 running in parallel so that the time should be limited to a few hours. However, I received the message "429 Resource has been exhausted (e.g. check quota)." As well as: "limit 'GenerateContent request limit per minute for a region' of service 'generativelanguage.googleapis.com' for consumer 'project_number:11111111111(sample)'". Could this possibly be because almost all the API keys are associated with one project? How do I increase that and what would it cost?

1 6 4,295
6 REPLIES 6

Possibly that you are sending too many requests in a short period of time. If possible can you place a delay for your request to avoid the error.  As for quota increase you can follow the instruction provided here.  Sample instructions below: 

 


  1. Go to the Quotas page:

     

    Go to Quotas

    The remaining steps will appear automatically in the Google Cloud console.

     

  2. On the Quotas page, find the quota you want to increase in the Quota column.

    You can use the Filter search box to search for your quota.

  3. Select the checkbox to the left of your quota.

  4. Click  EDIT QUOTAS. The Quota changes form displays.

  5. In the Quota changes form, enter the increased quota that you want for your project in the New limit field.

  6. Complete any additional fields in the form, and then click DONE.

  7. Click SUBMIT REQUEST.


 

Yesterday, I used Gemini to translate eBook. Now the problem is that the send request is displayed error 429 Resource has been exhausted (e.g. check quota).  too many request. And i go to quotas, but i don`t find anyone over 90%.then i don`t know which is need to change

 

I'm running into this same issue. I'm using workflows to do two tasks (via Cloud Functions) that are generative and build on each other. I'm using 2 different API keys, but the second task always fails with  the Cloud Function giving me a final error of 429. 
Even after implementing 30 seconds of wait time in the workflow, it still happens, with 2 different keys, using 2 different models.

Are we limited at a project level of how often we can call the Gemini Generative endpoint?

My theory is that the gemini-pro-1.5-latest endpoint has some sort of other limit, that we as users can't see when using the "generativeai" python SDK. The only thing that shows up in metrics is failed API calls, but NOT limit hits. 

The way around this, I believe, would be to directly use the Vertex SDK directly, not the GenAI API.




I found this GoogleAI API vs VertextAI API a whole mess. GoogleAI API won't allow us to use PDFs in prompt even for gemini-1.5-pro. But we can do it using VertextAI. Not sure why a company like Google has failed to develop a good API that's easy to understand.

I'm looking at my quotas and I'm not even seeing anything for GenAI content generation even though the metrics show 400 requests.