Cloud Explainers

OpenRouter vs Direct API Keys: Which One Should You Use?

OpenRouter (one API for many AI models)8 min video

OpenRouter or a key straight from the model's maker? The same free Gemma 4 model through both doors on a real grocery list app: Google's own key answered while OpenRouter's free door said rate-limited upstream (a shared pool), 14,400 free requests a day vs 50, one OpenRouter key reaching NVIDIA's model where Google's key gets 404, Google's own free tier for Gemini Flash vs a paid model on OpenRouter, the 5.5% credit fee, who sees your prompts, and bring your own key (BYOK) to get both.

One model, two keys

You're adding an AI model to your app: do you take a key from the model's maker, or one key from OpenRouter, a service for hundreds of models? Kari's grocery list app uses both, with the same free model, Google's Gemma 4. Her own Google key allows 14,400 free requests a day. Her OpenRouter key: 50.

Same free model, Gemma 4: requests a day: chart of Kari's own Google key: 14400 requests, Kari's OpenRouter key: 50 requests, Two keys, one model

Both reach the same Google servers. With her Google key, the app sorts the list into aisles. Through OpenRouter, it's refused: error 429, too many requests. By the end, you'll know which key fits your app, and the one setting that gets you both.

Kari's laptop
python sort.py googleProduce: apples, bananas
Dairy: milk, cheddar, eggs
Bakery: bread
Pantry: pasta, tomato sauce

model:        gemma-4-26b-a4b-it
sent to:      generativelanguage.googleapis.com
Kari's laptop
python sort.py routererror 429: google/gemma-4-26b-a4b-it:free is temporarily rate-limited upstream. Please retry shortly, or add your own provider key to use your own limits
provider:     Google AI Studio
limit source: upstream_provider_shared_pool

Two doors to the same model

Before we find out why OpenRouter refused her, let's see how each key gets to Google. An API key is the secret your app sends with each request, so the company knows who's asking, and who pays. Here are the two doors. With a direct key, your app talks to the model's maker itself. OpenRouter sits in the middle: one key and one bill for hundreds of models from dozens of companies. It forwards each request to a company that runs that model, and passes the answer back. That company is called the provider, and some models have many.

Two doors to the same model: diagram of Grocery list app, OpenRouter, Google AI Studio

So who runs OpenRouter's free Gemma? Kari runs a small script that asks OpenRouter who runs each model. The free version, the one with colon free at the end of its name, has one provider: Google AI Studio, the same service Kari's own key talks to. But Google published Gemma for anyone to run on their own servers, so the paid version has 15 providers. Each provider sets its own price, so OpenRouter can pick a cheap one, or whichever one is working right now. A direct key has one provider: the maker.

Kari's laptop
./providers google/gemma-4-26b-a4b-it:free1 provider runs google/gemma-4-26b-a4b-it:free
  Google AI Studio    $0.00 in, $0.00 out
Kari's laptop
./providers google/gemma-4-26b-a4b-it15 providers run google/gemma-4-26b-a4b-it
  Darkbloom           $0.05 in, $0.19 out
  DekaLLM             $0.06 in, $0.33 out
  Io Net              $0.07 in, $0.29 out
  NextBit             $0.07 in, $0.23 out
  AkashML             $0.07 in, $0.24 out

Think of a universal remote. One handset runs the TV, the sound bar and the streaming box. That's OpenRouter. The remote that came with the TV runs only that TV, but it has every button the maker built. That's a direct key. And like any universal remote, OpenRouter is one more thing between you and the TV.

A universal remote vs the TV's own remote: comparison table of Universal remote vs The TV's own remote, Works with, Is like, Buttons, In between

In code, the two doors look almost the same. Three settings change: the address, the model's name, and which key it sends. That works because Google's door also speaks OpenAI's format. OpenAI makes ChatGPT, and many services copy the way it talks. So Kari's app uses one library, ready-made code from OpenAI, for both doors.

Switching doors: three settings: code change of google.env -> router.env, BASE_URL=https://openrouter.ai/api/v1 (a different address), MODEL=google/gemma-4-26b-a4b-it:free (OpenRouter's name for the model)

Why the free door was full

So why was the free door full? A rate limit is a cap on how many requests can come in a minute or a day, and one was hit. The error even says where: in a pool everyone shares, on Google's side. For a free model, OpenRouter calls Google with its own account, and every free user shares that account's limits. When the pool runs dry, everyone waits. Kari's key lives in her own Google project, a folder for her app's keys and billing, with limits nobody else can use up.

So there are two different caps. Google's, on Kari's own project: 14,400 free Gemma requests a day, and up to 30 a minute. And OpenRouter's own, on its FAQ: 50 free requests a day, for all free models together. OpenRouter runs on credits: you pay ahead, and each credit is one dollar. Buy 10 of them once, and that cap rises to 1,000. But the shared pool at Google can still be full.

Two different caps: comparison table of Kari's Google key vs OpenRouter, free models, A day, A minute, After 10 credits ($10), Shared with

That's on OpenRouter's FAQ, word for word: with less than 10 credits bought, 50 free model requests per day.

Why the free door was full: browser screenshot from the video

One key, every company

Now the thing OpenRouter is really for. Kari changes only the model's name, to Nemotron, a free model from NVIDIA. Typing MODEL equals before the command swaps the model, just for that one run. Through OpenRouter, same key: sorted, and run by NVIDIA. Guess first: she sends that same name to Google's door. What comes back? 404, not found. Google's door only knows Google's models, so the name means nothing there. For NVIDIA's model, she'd need an NVIDIA account, another key, and another bill.

Kari's laptop
MODEL=nvidia/nemotron-3.5-lightning:free python sort.py routerProduce: apples, bananas
Dairy: milk, cheddar, eggs
Bakery: bread
Pasta: pasta
Canned Goods: tomato sauce

model:        nvidia/nemotron-3.5-lightning:free
sent to:      openrouter.ai
run by:       Nvidia
Kari's laptop
MODEL=nvidia/nemotron-3.5-lightning:free python sort.py googleerror 404: models/nvidia/nemotron-3.5-lightning:free is not found for API version v1main, or is not supported for generateContent. Call ModelService.ListModels to see the list of available models and their supported methods.

One more thing a single key can do: fall back. Kari sends OpenRouter a list: the free Gemma first, then Nemotron. Gemma's pool is still busy, so OpenRouter tries the next model, and the list comes back sorted, run by NVIDIA. With direct keys, that retry is code you write yourself, with a second account behind it.

Kari's laptop
MODEL=google/gemma-4-26b-a4b-it:free,nvidia/nemotron-3.5-lightning:free python sort.py routerProduce: apples, bananas
Dairy: milk, cheddar, eggs
Bakery: bread
Pantry: pasta, tomato sauce

model:        nvidia/nemotron-3.5-lightning:free
sent to:      openrouter.ai
run by:       Nvidia

What only the maker gives you

So OpenRouter reaches more models. Is there anything it can't give you? Try Gemini 3.6 Flash, one of Google's own models. Google gives some models away free, up to a limit. That's called a free tier. Kari's project gets 20 Flash requests a day, and her key sorts the list. OpenRouter offers free versions of only some models, and Flash isn't one: it's paid. Kari capped her OpenRouter key at zero dollars, so it can only use free models. The result: 403, key limit exceeded. Back to the remote: the maker's own free tier is one of the buttons the universal one doesn't have.

Kari's laptop
MODEL=gemini-3.6-flash python sort.py googleProduce: apples, bananas
Dairy: milk, cheddar, eggs
Bakery: bread
Pantry: pasta, tomato sauce

model:        gemini-3.6-flash
sent to:      generativelanguage.googleapis.com
Kari's laptop
MODEL=google/gemini-3.6-flash python sort.py routererror 403: Key limit exceeded (total limit).
limit source: openrouter_key_limit

What it costs

What about money, once you pay? You buy OpenRouter credits up front. Its FAQ says the model's price passes through with no markup. But each time you buy credits, it charges 5.5%, at least 80 cents. So to get $100 of model use, you pay $105.50; on a direct key, you pay $100. That extra is the price of one key and one bill.

What it costs: browser screenshot from the video

One key that reaches every model is also one key to guard. If it leaks, someone can spend your credits on any model. So OpenRouter lets you cap each key in its settings: that's the zero-dollar cap from before, and this small script reads it back. On Google's side, Kari's project has no billing turned on, so her key can't spend money either.

Kari's laptop
./usagefree tier:            true
spending limit:       $0
free requests today:  7 of 50

Who sees your prompts

A grocery list is harmless. But what if your app sends a shopper's name or address? Through OpenRouter, each prompt passes through two companies. OpenRouter's docs say it keeps your prompts only if you switch that on yourself, and each provider has its own rules on what it stores.

Where Kari's grocery list goes: diagram of Grocery list app, OpenRouter, Google AI Studio

On a free tier, read the terms. Google's say that on its free tier, what you send is used to improve its products, and human reviewers may read it. So keep personal data off a free tier, whichever door you use.

Who sees your prompts: browser screenshot from the video

How to get both

Remember that 429? Its full message ends with a hint: add your own provider key. OpenRouter calls it BYOK, bring your own key. Its guide says that with your own key, the limits and the costs go through your own account with the provider, not OpenRouter's. In return, OpenRouter takes a small fee from your credits: 5% of what the model would normally cost.

How to get both: browser screenshot from the video

So Kari could paste her Google key into OpenRouter's settings, trusting OpenRouter to hold it. Her Gemma requests then use her own project's limits, not the shared pool, while the same OpenRouter key still reaches NVIDIA and everyone else.

Bring your own key: both at once: diagram of Grocery list app, OpenRouter, Google AI Studio, NVIDIA

Which one should you use?

So which one should you use? Pick a direct key when one maker's model is all you need, and you want its free tier and limits that are yours alone. That's Kari's live app: it only sends grocery items, so Google's free tier fits. Pick OpenRouter when you're trying many models, switching often, or want one bill for several companies: that's Kari while she builds. Want both? Bring your own key. Just remember: your prompts still pass through OpenRouter, and it still takes its 5% fee from your credits.

Which key should you use?: comparison table of Direct key vs OpenRouter, Pick it for, You get, Kari uses it, Want both?

Recap

In short: free through OpenRouter means shared, a direct key means yours alone, and bringing your own key gets you both.

Recap: cards of Free through OpenRouter, A direct key, Both: your own key inside OpenRouter

If this helped you pick your key, subscribing brings more side-by-sides, each one run for real.

Every request here was real, and the lab files are linked in the description. Thanks for watching Cloud Explainers.

Sources

Demos: one container on our own Mac standing in for a laptop; real requests to the Gemini API (a project with no billing, free tier only) and to OpenRouter (free models, a $0 spending limit). The grocery list app is made up. Watch the full video on YouTube.

More videos

PostgreSQL9 min

Every PostgreSQL Setting to Change After You Install It

Docker9 min

What Happens When You Install Docker on Ubuntu

Python8 min

How to Fix Python 'Address Already in Use' Errors

Go (Golang)5 min

Golang Interfaces and Mocks in 5 Minutes

Git7 min

How to Fix Git 'Detached HEAD' State

Linux21 min

Linux Firewall with ufw: Full Tutorial for Beginners

Go (Golang)5 min

Golang defer Statements in 5 Minutes

Auth (OAuth, JWT)9 min

How to Fix OAuth 'invalid_grant' Errors

Databases & SQL11 min

The SQL Roadmap for Beginners

Go (Golang)5 min

Golang make() for Slices and Maps in 5 Minutes

Networking7 min

How to Fix Network 'No Route to Host' Errors on Linux

Linux6 min

How to Fix Linux 'Too Many Open Files' Errors

Django (Python web framework)11 min

Every Django Concept a Beginner Needs to Know

Linux24 min

SSH on Linux: Full Tutorial for Beginners

Go (Golang)5 min

Golang for range Loops in 5 Minutes

Databases & SQL10 min

SQL Databases: SQLite vs PostgreSQL

Django (Python web framework)10 min

The Django Roadmap for Beginners

Go (Golang)5 min

Golang Structs in 5 Minutes

Caching & Redis22 min

Redis: Full Tutorial for Beginners

Go (Golang)5 min

Golang context.Context in 5 Minutes

Databases & SQL7 min

How to Fix MySQL Database Error 1045: Access Denied for User

Go (Golang)5 min

Golang Method Receivers in 5 Minutes

Python8 min

How to Fix Python SSL: CERTIFICATE_VERIFY_FAILED Errors

Django (Python web framework)9 min

How to Fix Django Static Files Not Loading in Production

Go (Golang)5 min

Golang if err != nil Checks in 5 Minutes

Go (Golang)8 min

How to Fix Golang 'go.mod File Not Found' Errors

AI agents & MCP22 min

MCP Servers: Full Tutorial for Beginners

Go (Golang)5 min

Golang Error Return Values in 5 Minutes

Python8 min

How to Fix Python ModuleNotFoundError: No Module Named

Go (Golang)5 min

Golang Pointers in 5 Minutes

Kubernetes8 min

How to Fix a Kubernetes Pod Stuck in CrashLoopBackOff

Homelab & self-hosting9 min

How to Fix a Homelab ESXi Host Not Responding

PostgreSQL24 min

PostgreSQL: Full Tutorial for Beginners

Load balancing & Nginx9 min

How a Load Balancer Works with HAProxy

Python9 min

How Python Virtual Environments Work

Homelab & self-hosting9 min

How to Fix Cloudflare Tunnel Errors in a Homelab

APIs9 min

How to Fix API CORS Errors: No 'Access-Control-Allow-Origin'

Auth (OAuth, JWT)9 min

How Authenticator App Login Codes Work (TOTP)

Git22 min

Git and GitHub: Full Tutorial for Beginners

Homelab & self-hosting10 min

How a Homelab Hypervisor Works (VMware ESXi)

Kubernetes9 min

How to Fix Kubernetes ImagePullBackOff Errors

DNS8 min

How to Fix DNS 'Temporary Failure in Name Resolution' on Linux

AWS8 min

How to Fix AWS CLI 'Unable to Locate Credentials'

Homelab & self-hosting10 min

Proxmox vs ESXi for Your Homelab: When Each One Wins

PostgreSQL10 min

PostgreSQL UUID vs Auto Increment: Which Primary Key Should You Use?

Kubernetes21 min

Kubernetes: Full Tutorial for Beginners

Networking9 min

How TCP Sockets Work

PostgreSQL7 min

How to Fix PostgreSQL 'Could Not Connect to Server'

Claude & the Claude Developer Platform9 min

Claude Code Hooks Will Finally Make Sense After This

DevOps & CI/CD9 min

DevOps with Ansible Will Finally Make Sense After This

Networking9 min

How SNMP Network Monitoring Works

Git8 min

How to Fix GitHub 'Permission Denied (publickey)' Errors

Docker21 min

Docker: Full Tutorial for Beginners

PostgreSQL7 min

How to Fix PostgreSQL 'Password Authentication Failed'

Linux8 min

Why One Linux Server Handles More Users Than You Think

Networking7 min

How to Fix Network 'Connection Refused' Errors

DevOps & CI/CD9 min

DevOps Pipelines: Jenkins vs GitHub Actions

Linux11 min

Linux Nginx Reverse Proxy: Full Tutorial for Beginners

Networking11 min

Every Networking Term a Beginner Needs in 12 Minutes

Docker6 min

How to Fix Docker 'Permission Denied' on docker.sock

Git7 min

How to Fix Git 'Updates Were Rejected' When You Push

Linux7 min

How to Fix nginx 502 Bad Gateway Errors on Linux

Linux8 min

How to Fix Linux apt 'Could Not Get Lock' Errors (Ubuntu)

Networking9 min

How Email Works on the Internet (SMTP) in 10 Minutes

Python8 min

The Python Roadmap for Beginners

Go (Golang)21 min

Golang REST API with Gin: Full Tutorial for Beginners

Networking10 min

How a WireGuard VPN Network Works

Linux9 min

Linux Makefiles Will Finally Make Sense After This

Auth (OAuth, JWT)9 min

SAML vs OAuth vs OpenID Connect: What's the Difference?

Python7 min

How to Fix Python cron Jobs That Never Run

Linux22 min

Linux Bash Scripting: Full Tutorial for Beginners

Networking10 min

How PXE Network Boot Works

Active Directory9 min

How Active Directory Works

Linux10 min

How to Fix a Linux systemd Service That Won't Start

Linux9 min

Linux Logs: syslog vs journald

Auth (OAuth, JWT)9 min

JWT vs Session Cookies: Which One Should You Use?

Docker10 min

Docker vs Docker Compose: Which One Should You Use?

Docker9 min

How to Fix Docker Compose Containers That Can't Talk to Each Other

Django (Python web framework)22 min

Django Full Tutorial for Beginners

Linux9 min

How Linux systemd Works

Networking8 min

How to Fix 'Windows Cannot Access' Network Share Errors (SMB)

APIs10 min

REST vs gRPC: Which One Should You Use?

Certificates & PKI (ADCS)9 min

How to Fix SSL Certificate Chain Errors (Missing Intermediate)

Python9 min

Every Python Concept for Beginners in 10 Minutes

Databases & SQL9 min

Every SQL Join Type in 10 Minutes

OpenRouter (one API for many AI models)9 min

Why OpenRouter Free Models Hit Their Limit So Fast

Gemini API & Google AI Studio9 min

Why Your Gemini API Free Tier Runs Out So Fast

OpenRouter (one API for many AI models)10 min

OpenRouter Will Finally Make Sense After This

Caching & Redis10 min

How Redis Caching Works

Gemini API & Google AI Studio10 min

Gemini API vs Vertex AI: Which One Should You Use?

Gemini API & Google AI Studio8 min

How to Fix a Leaked Gemini API Key

Go (Golang)9 min

Why Golang Uses Goroutines Instead of Threads

Gemini API & Google AI Studio9 min

How to Fix Gemini API Error 429: Resource Exhausted

Claude & the Claude Developer Platform10 min

Claude Token Pricing Will Finally Make Sense After This

Python11 min

Why Python Web Scraping Returns Nothing (and the Fix)

Python10 min

Python uv vs pip: Which One Should You Use?

Python22 min

Python Automation: Full Tutorial for Beginners

Auth (OAuth, JWT)9 min

How OAuth Login Works

Gemini API & Google AI Studio10 min

Google AI Studio Will Finally Make Sense After This

Docker10 min

What Happens When You Run a Docker Container

Claude & the Claude Developer Platform8 min

How to Fix Claude Code Billing Your API Key Instead of Your Plan

Auth (OAuth, JWT)9 min

Why Passkeys Can't Be Phished Like Passwords

PowerShell10 min

PowerShell vs Bash: Which One Should You Learn?

Linux10 min

The Linux Roadmap for Beginners

Django (Python web framework)9 min

Django vs FastAPI: Which One Should You Use?

Databases & SQL10 min

Why SQLite Is the Most Used Database in the World

Databases & SQL11 min

How a NoSQL Database Like MongoDB Works

Python11 min

How to Fix Python pip error: externally-managed-environment

Databases & SQL9 min

How to Fix MySQL Too Many Connections Database Errors

Go (Golang)9 min

Golang Concurrency Will Finally Make Sense After This

AWS10 min

How Amazon S3 Works

Kubernetes10 min

How Kubernetes Works

Git10 min

How Git Works

Docker10 min

How to Fix Docker Port Already Allocated Errors

PostgreSQL10 min

How PostgreSQL Works

Git8 min

How to Fix Git Merge Conflicts

Linux9 min

How to Fix No Space Left on Device in Linux

Networking10 min

How the Internet Works

Databases & SQL9 min

SQL vs NoSQL: When Each One Wins

Auth (OAuth, JWT)8 min

How to Fix JWT Token Expired Errors (401 Unauthorized)

Claude & the Claude Developer Platform9 min

Claude API vs Claude Pro: Why Your Subscription Doesn't Include It

AI agent skills9 min

Why AI Agent Skills Beat Giant Prompts

Linux10 min

Linux Cron Jobs Will Finally Make Sense After This

Cybersecurity10 min

Security Logs Will Finally Make Sense After This

Cybersecurity8 min

How to Fix a Security Leak: An API Key Pushed to GitHub

DNS9 min

DNS Will Finally Make Sense After This

Cybersecurity9 min

Never Ignore a Security Update

Auth (OAuth, JWT)9 min

Two-Factor Authentication Will Finally Make Sense

Networking8 min

Never Expose a Database to the Internet

Cybersecurity10 min

SSH Keys vs Passwords: Which Is Safer for Security?

Linux10 min

The 5 Levels of Linux Boot: From Power On to Login

Networking12 min

The 5 Levels of Network Firewalls

Cybersecurity10 min

Password Security: Why Hackers Crack Weak Passwords

Linux9 min

Why Your Linux Server Runs Out of Memory

Networking10 min

HTTP vs HTTPS: What Actually Changes on Your Network

Linux12 min

Every Linux File Permission You Need to Know

Linux10 min

Linux Processes vs Threads: When Each One Wins

Networking11 min

The OSI Model Will Finally Make Sense After This

Git11 min

The 7 Levels of Git

Networking10 min

Every Network Troubleshooting Command You Need

Cybersecurity10 min

Hashing vs Encryption in Cybersecurity: When Each One Wins

Networking11 min

Why the Internet Ran Out of IP Addresses

Linux11 min

Linux Package Managers: apt vs Snap vs Flatpak

Python9 min

Why Python Is Slow (and When It Doesn't Matter)

Networking11 min

TCP vs UDP: When Each One Wins

Linux8 min

Stop Running Linux as Root (Do This Instead)

Linux11 min

Linux Users and Groups Will Finally Make Sense

Cybersecurity9 min

Why Phishing Beats Good Security (and How to Spot It)

Docker12 min

The 7 Levels of Docker

AI agents & MCP12 min

AI Agents Will Finally Make Sense After This

Git8 min

Stop Using git push --force (Use This Instead)

AI agent skills10 min

Agent Skills vs MCP: When Each One Wins

Networking12 min

Networking Will Finally Make Sense After This

Linux12 min

Every Linux Command You Actually Need

Cybersecurity12 min

The 7 Levels of Cybersecurity

System design12 min

Every System Design Concept You Need, in One Diagram

PostgreSQL10 min

Why PostgreSQL Ignores Your Index