I am facing the 429 error when call the gemini API in colab

Hello

I am facing this issue, it used to be fine for 700 runs and then when the session in colab dead, I can not run more query anymore, here is below are issue

Error on item 729 (Attempt 1/10): Error code: 429 - {'message': 'The estimated cost of this operation ($0.001412) exceeds your available quota. Try again later.', 'type': 'invalid_request_error'}
Rate limit hit. Sleeping for 30 seconds before retrying...
Error on item 729 (Attempt 2/10): Error code: 429 - {'message': 'The estimated cost of this operation ($0.001412) exceeds your available quota. Try again later.', 'type': 'invalid_request_error'}
Rate limit hit. Sleeping for 60 seconds before retrying...
Error on item 729 (Attempt 3/10): Error code: 429 - {'message': 'The estimated cost of this operation ($0.001412) exceeds your available quota. Try again later.', 'type': 'invalid_request_error'}
Rate limit hit. Sleeping for 120 seconds before retrying...
Error on item 729 (Attempt 4/10): Error code: 429 - {'message': 'The estimated cost of this operation ($0.001412) exceeds your available quota. Try again later.', 'type': 'invalid_request_error'}
Rate limit hit. Sleeping for 240 seconds before retrying...
Error on item 729 (Attempt 5/10): Error code: 429 - {'message': 'The estimated cost of this operation ($0.001412) exceeds your available quota. Try again later.', 'type': 'invalid_request_error'}
Rate limit hit. Sleeping for 480 seconds before retrying...

---------------------------------------------------------------------------

RateLimitError                            Traceback (most recent call last)

/tmp/ipython-input-1083995870.py in <cell line: 0>()
     45                     chunks = []
---> 46                     stream = ai.generate_text(user_content, model_name=model_name, stream=True)
     47                     for chunk in stream:



6 frames


RateLimitError: Error code: 429 - {'message': 'The estimated cost of this operation ($0.001412) exceeds your available quota. Try again later.', 'type': 'invalid_request_error'}

During handling of the above exception, another exception occurred:


KeyboardInterrupt                         Traceback (most recent call last)

    [... skipping hidden 1 frame]


KeyboardInterrupt: 

During handling of the above exception, another exception occurred:


KeyboardInterrupt                         Traceback (most recent call last)

/usr/local/lib/python3.12/dist-packages/IPython/core/interactiveshell.py in run_code(self, code_obj, result, async_)
   3572         except:
   3573             if result is not None:
-> 3574                 result.error_in_exec = sys.exc_info()[1]
   3575             self.showtraceback(running_compiled_code=True)
   3576         else:


KeyboardInterrupt: