LLM quota errors and fallback not working in my n8n workflow

Hello n8n Support Team,

I’m building an AI Agent workflow in n8n for generating and validating physics lessons. The workflow logic, nodes, connections, memory, and validation flow are already set up, but I’m currently blocked by an LLM quota issue.

My main model is Gemini 2.5 Flash. It started returning:

“429 Too Many Requests — You exceeded your current quota.”

I enabled Retry On Fail with 3 attempts and a 5-second wait, but this only helped temporarily.

I also added multiple fallback LLM providers, including OpenAI, Anthropic, and Grok, but they also require available API quota/credits, so the fallback does not currently solve the problem.

I have already optimized the workflow to reduce unnecessary LLM calls and I’m using a Flash model rather than a larger model. I also adjusted the prompts to reduce unnecessary token usage.

At this point, I mainly want to understand whether there is a way to make the workflow reliable without adding paid API credits, or whether there is another n8n configuration/architecture I’m missing that could help handle Gemini quota/rate-limit errors more effectively.

I don’t want to change the workflow architecture unnecessarily because the workflow itself is already completed and working logically; I mainly need help with the LLM availability/quota and fallback behavior.

Could you please review this situation and suggest a solution that does not require me to purchase additional API credits if possible?

Thank you.

Hey @Marwa_Sayed_Hassan_M, while you wait for a response, here are some things that might help:

Suggested resources

Automatically matched to your question.

Docs:

Forum:

@Niffzy, @achamm, @Zelite - you’ve helped with similar issues before, can you take a look?

Automatically suggested by n8n’s community bot. It’s a pilot - please share feedback here.

Hi @Marwa_Sayed_Hassan_M Welcome!
“You exceeded your current quota” is the daily ceiling on Google’s free tier, not the per-minute one. Retry On Fail only clears per-minute bursts, and once the daily count is spent every call fails until Google resets it at midnight Pacific, which is why the retries and a fallback chain of providers that also need credit stop helping. Google applies the quota per Cloud project, not per API key.
A local model is the only fallback with no quota. Assuming you are self-hosted, install Ollama, pull a small instruct model, and connect an Ollama Chat Model node as the agent’s fallback model:

More on which providers still have a usable free tier and a native n8n credential:

hey I have two possible solutions for you. You can try to simplify the information as much as possible so the LLM doesn’t waste unnecessary tokens, but if you have a lot of requests you’re going to end up using up your quota anyway. The other option is to switch models — I highly recommend Open Router, which has many free flash alternatives for high-volume requests

The info here needs some update.
Groq is not so generous anymore.
They keep retiring LLM models on the free tier without replacing it with new ones :-1:

On free tier, you can only use 20 requests per day.
Switching to gemini-3.1-flash-lite or gemini-3.5-flash-lite gives you
500 request per day.