ARTICLE AD BOX
I am trying to use the Google Gemini API with langchain-google-genai in Python. I want to use the Free Tier, so I created a fresh project in Google AI Studio (without linking any billing account).
However, I immediately get a ResourceExhausted error that says my limit is 0.
The Error: ResourceExhausted: 429 You exceeded your current quota, please check your plan and billing details. * Quota exceeded for metric: generativelanguage.googleapis.com/generate_content_free_tier_requests, limit: 0, model: gemini-2.0-flash * Quota exceeded for metric: generativelanguage.googleapis.com/generate_content_free_tier_input_token_count, limit: 0, model: gemini-2.0-flash My Code: from langchain_google_genai import ChatGoogleGenerativeAI # I am trying to force a different model, but the error persists llm = ChatGoogleGenerativeAI( model="gemini-2.5-flash", # I also tried "gemini-1.5-flash" google_api_key="MY_API_KEY" ) response = llm.invoke("Hello world")What I have tried:
Created a brand new project in Google AI Studio (no billing added) to ensure I am on the Free Tier.
Generated a new API key.
Tried changing the model name in the code to gemini-1.5-flash and gemini-2.5-flash.
Issue: The error log specifically mentions model: gemini-2.0-flash with limit: 0, even though I am trying to use other models in my code.
Questions:
Why does the error log show limit: 0 for the Free Tier?
Why does the error cite gemini-2.0-flash even when I specify gemini-2.5-flash in the LangChain constructor? Does LangChain default to an old model if the specified one isn't found?
This is my api rate limit list [enter Any help on how to access the actual Free Tier would be appreciated.
