Gemini API returns 429 issue when using OpenAI compatible API

I have been using gemini google API with openAI format through this API

https://generativelanguage.googleapis.com/v1beta/openai/

But suddenly I’m getting this error

RateLimitError: Error code: 429 - [{'error': {'code': 429, 'message': 'Resource has been exhausted 
(e.g. check quota).', 'status': 'RESOURCE_EXHAUSTED'}}]

Even though I’m sending only one query at a time with small question "What is the capital of Egypt)

If I used gemini through the google sdk it works just fine. Did I hit the OpenAI format limit?

Sure! Here are a few options:

  • Thanks for the heads-up - I’ll check my usage.
  • I’m also seeing this issue. Any updates from Google?
  • That’s odd! I’ll try using the Google SDK instead.

Yes, you did.
Wait a little bit or try again tomorrow.