Google_search_retrieval: 429 Resource has been exhausted (e.g. check quota)

response = model.generate_content(contents=“Who won Wimbledon this year?”)

runs without problems. But if I add tools=‘google_search_retrieval’ as described in the documentation:

response = model.generate_content(contents=“Who won Wimbledon this year?”,
tools=‘google_search_retrieval’)

then I get the error message: ResourceExhausted: 429 Resource has been exhausted (e.g. check quota).

Is tools=‘google_search_retrieval’ available only for paid account? Thank you!

Welcome to the forum.

The blog post Gemini API and Google AI Studio now offer Grounding with Google Search - Google Developers Blog makes the point:

QUOTE
Grounding is available to test for free in Google AI Studio. In the API, developers can access the tool with the paid tier for $35 per 1,000 grounded queries.
END QUOTE

1 Like