Stop Paying to Test LLMs in n8n: Here’s How to Use LLMs for Free (and When to Try OpenRouter)
- NodeLearn
- Aug 2
- 3 min read

If you’re new to building AI agent workflows in n8n, you’ve probably run into this problem: Most LLMs (Large Language Models) cost money, even if you just want to test your automation.
But good news: you don’t have to pay to get started. In this guide, I’ll show you how to use Google’s Gemini API free tier so you can experiment with AI in n8n without worrying about costs. And if you ever want to explore other models (like OpenAI, Anthropic, or Mistral), I’ll introduce you to OpenRouter—the “one wallet, all LLMs” solution.
Solution: Use Google Gemini Free Tier in n8n
What is Gemini?
Gemini is Google’s answer to ChatGPT—an LLM you can access via API.
The best part? Google offers a generous free tier, perfect for testing.
How to Set Up Gemini in n8n (for Free)
Create a Google AI Studio Account
Go to Google AI Studio and sign up. (If you already have Gmail, you can use your existing account.)

Create a Gemini API Key
Click on Dashboard at the top right of your screen.
Click on the blue button with the text "Create API Key" to create your Gemini API Key


Copy the API Key
Copy the API you just generated to connect to Gemini in n8n

Select Gemini as Your LLM Model for Your AI Agent

Create a New Google Gemini Credential and Paste In Your API Key
Open the Google Gemini chat model node and click on "Create new credential"
Paste in the API key you copied in step 3 and click "Save"


Congrats! You may start testing your AI agent workflow for free with Gemini
Important: Privacy Warning When Using Gemini Free Tier
Before you start using Google Gemini’s free tier, be aware of how your data is handled:
When you use Gemini’s unpaid/free tier (including the API), Google may use the content you submit—and the AI’s responses—to improve their products and AI models.Human reviewers may also see your data as part of their quality checks.
What this means for you:
Never submit sensitive, confidential, or personal information (such as passwords, private client data, or anything you wouldn’t want others to see) to the Gemini free tier.
Use the free tier for safe, non-sensitive testing and experimentation only.

What If You Want to Try Other LLMs?
Maybe you want to test your workflow with GPT-4, Claude 3, or any other model. Usually, this means creating multiple accounts, juggling API keys, and worrying about billing.
Enter OpenRouter: One Wallet, All the Models
OpenRouter is like the “Stripe for LLMs”—one account, one wallet, access to all major models.
How it works:
Create a free account at OpenRouter.ai
Top up your wallet (small amounts are fine)
Create a new API key and connect to Open Router Credentials in n8n
Choose and switch between models directly in n8n or your app, no more key-hopping.

Summary: Your Zero-Risk Path to AI Automation
If you’re just starting out: Use Google Gemini’s free tier in n8n. It’s powerful and perfect for learning and experimenting.
When you’re ready for more: Try OpenRouter to access any LLM with one simple account.
Check Out Our Free AI Agent Templates
It's a lot faster to start building with a template than building an AI agent completely from scratch.
Now that you have your n8n account and you are ready to build your first AI agent, check out NodeLearn's free ready-made AI agent templates to make your days more productive!
New templates release on a weekly basis, so stay tuned!
Have a Question?
Contact NodeLearn and we'll answer your questions ASAP!
Never Miss an Update
Get the latest AI automation templates, guides, and exclusive tips delivered straight to your inbox.
Join the NodeLearn newsletter today and unlock members-only resources, new use cases, and automation strategies you can actually use—no spam, just real value.
Comments