Great question — answering as the UphillTech team:
The limit: 0 error appears because your Google Cloud project does not have Free Tier quotas activated. Since March 2024, Google requires linking a billing account even for Gemini Free Tier. If billing is not enabled, the free quotas for: generate_content_free_tier_requests input_token_count output_token_count are all 0 , which causes the 429 ResourceExhausted error even on a new project. After you link a billing account, the free-tier quotas (50 requests/day, token limits, etc.) become available and the API will work. The reason the error refers to gemini-2.0-flash is because the client library falls back to the default model internally when quota lookup fails, even if you requested...
Full answer by MAHESWARAN M: https://stackoverflow.stackexchange.com/a/79840299 (CC BY-SA 4.0).
Need it done for your business? UphillTech.