Gemini API Key 429 Error despite no requests raised

Hi all, this is my first time using the Gemini API key, and I’m using that for an Agentic AI project.

I don’t kno w what’s happening, but whenever I try to raise a request with any model using Langchain’s ChatGoogleGenerativeAI feature on all my projects, on all my API keys, I am unable to get any response whatsoever. I want to very specifically use Gemini 2.5 Pro because my use case involves tool calling and structured outputs both together, but I am just unable to get any response, it rate limits me saying that the limit for gemini 2.5 pro on my account is 0…

I thought that up until a certain a point, I can use the 2.5 pro model.

This is the Python script I’m running:

from langchain_google_genai import ChatGoogleGenerativeAI

from pydantic import BaseModel

class MatchResult(BaseModel):
  winner: str
  final_match_score: str
  scorers: list[str]

llm = ChatGoogleGenerativeAI(model=“gemini-2.5-pro”, api_key=“<MY_API_KEY>”)

llm_with_search = llm.bind(
  tools=[{"google_search": {}}],
  response_mime_type="application/json",  
  response_schema=MatchResult.model_json_schema(),
)

response = llm_with_search.invoke(
  "Search for details of the latest Euro championship final match."
)

print(response)

This is the error I’m getting (can’t paste image coz of new user rule)

Whereas these are the logs for the exact same project whose key I’m using in the script:

Can someone please help with this? This is genuinely my first time using Gemini keys, and I thought I’d have fun, but there’s been nothing but stress involved…

It seems that my error was removed from the post. Here’s the error:

1 Like