genkit icon indicating copy to clipboard operation
genkit copied to clipboard

[Docs] Gemini free tier quota errors

Open webberig opened this issue 11 months ago • 5 comments

Is your report related to a problem? Please describe. I'm trying to quick start a genkit project using the Angular examples. Both the Angular docs and genkit docs state following:

This guide uses the Gemini API, which offers a generous free tier and doesn’t require a credit card to get started. Source: https://genkit.dev/docs/get-started/

However, upon starting the application, I immediately get following error:

Non-streaming request failed with error: [GoogleGenerativeAI Error]: Error fetching from https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent: [429 Too Many Requests] You exceeded your current quota, please check your plan and billing details. For more information on this error, head to: https://ai.google.dev/gemini-api/docs/rate-limits. To monitor your current usage, head to: https://ai.dev/usage?tab=rate-limit.
* 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_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

It looks like I can't use the free tier without setting up billing. This is fine, but they docs aren't very accurate about this setting this up...

Is your report related to a suggestion/improvement? Please describe. I would definately drop the "generous" part :-)

webberig avatar Dec 10 '25 15:12 webberig

@webberig

Quota errors are usually solvable short-term with backoff + jitter and tighter concurrency limits, plus batching where possible. Longer-term it helps to support a fallback/provider swap so apps don’t hard-stop on quota. If you’re open to it, I can share a tiny OpenAI-compatible verify snippet that lets you route the same client calls via base_url (reversible) and validate chat/embeddings in ~60 seconds—what language/client are you on?

michaelmanly avatar Dec 23 '25 03:12 michaelmanly

@michaelbrinkworth I don't understand your message.

All I did was:

  1. Clone the Angular examples and followed the instructions to get started. The Angular docs are very similar to the instructions of Genkit quick start.
  2. Created an API key in Google AI studio
  3. Used that key to start the starter example

I get the errors instantaneously, the example doesn't work.

I suspect you need to setup billing before you can use the free tier prompts...

webberig avatar Dec 24 '25 16:12 webberig

Might be the model you are trying to use (ex: gemini-2.0-flash), try gemini-2.5-flash instead

henriquejnmarques avatar Jan 17 '26 17:01 henriquejnmarques

I used the samples of the Angular team: https://github.com/angular/examples/blob/main/genkit-angular-starter-kit/src/flows.ts#L13

It looks like they use 2.0.

Can you confirm this will actually be the problem ? I can't seem to find any clear documentation surrounding the free tier and how to set it up (avoiding having to setup billing)

webberig avatar Jan 19 '26 07:01 webberig

Those samples are very out of date, unfortunately. I'll ping the Angular folks to see if we can modernize them.

MichaelDoyle avatar Nov 19 '26 16:11 MichaelDoyle