Short answer
Hermes Agent (Nous Research) works with any OpenAI-compatible endpoint, so you can run Gemini 4 in it through TeamoRouter with one API key and no Google account:
- Run
hermes modeland choose Custom endpoint. - Base URL
https://api.teamorouter.com/v1, your TeamoRouter key, modelgemini-4-hydrogen(orgemini-4-carbon,gemini-4-argon). - Start a session. Switch models later with
/model custom:gemini-4-carbon.
The same key also runs Claude, GPT and other models in Hermes, so you can switch between them in one session.
Getting "User location is not supported" from Google? The Gemini API isn't available in every country. Through TeamoRouter you can call Gemini 4 Hydrogen, Carbon and Argon with one key and no Google account — see how or get an API key.
Get an API key for Hermes Agent
New accounts start with a $0 balance — top up before your first request. Top up from $5. If a request returns 402 (400 on the OpenAI format) with "wallet balance is insufficient", your balance is empty — your base URL and key are fine. Top up and retry.
Why Hermes Agent and Gemini 4
On OpenRouter's Gemini 4 Carbon apps page, Hermes Agent is among the largest named users of the model, with about 43 billion tokens; it ranks third on the Gemini 4 Hydrogen apps page (figures read November 18, 2026). Hermes is a long-running personal and CLI agent with tools, memory and sub-agents, which is the kind of work Google built Gemini 4 for.
Set it up
Install Hermes Agent with the official script, if you haven't:
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash
Then create a TeamoRouter API key (it starts with sk-teamo-).
Option 1: the setup wizard. Run this in your terminal, outside a chat session:
hermes model
# Choose "Custom endpoint (self-hosted / VLLM / etc.)"
# API base URL: https://api.teamorouter.com/v1
# API key: sk-teamo-...
# Model name: gemini-4-hydrogen
Option 2: edit ~/.hermes/config.yaml. Hermes treats config.yaml as the single source of truth for the model and endpoint:
model:
default: gemini-4-hydrogen
provider: custom
base_url: https://api.teamorouter.com/v1
key_env: TEAMOROUTER_API_KEY
and put the key in ~/.hermes/.env:
TEAMOROUTER_API_KEY=sk-teamo-...
(api_key: directly in config.yaml also works; key_env keeps the key out of the file.)
Switch models in a session
Inside a Hermes chat, /model switches between models on endpoints you've already set up:
/model custom:gemini-4-carbon # hardest problems
/model custom:gemini-4-hydrogen # everyday work
/model custom:claude-sonnet-5-5 # Claude on the same key
To add a different provider, leave the session and run hermes model again. By default Hermes also uses your main chat model for auxiliary tasks such as compression and vision; you can route those to a cheaper model in Hermes' configuration.
Which Gemini 4 model to use
| Model | Use it for | Google list price, input / output per 1M |
|---|---|---|
gemini-4-hydrogen |
Everyday agent work; the fastest and cheapest Gemini 4 | $1.50 / $7.50 |
gemini-4-carbon |
The hardest problems | $2 / $10 through Nov 30, 2026; $4 / $20 from Dec 1 |
gemini-4-argon |
Long multi-step tasks with fewer tokens than Carbon | $2 / $10 through Nov 30, 2026; $4 / $20 from Dec 1 |
Thinking tokens count as output. More detail: Gemini 4 Hydrogen vs Carbon vs Argon.
What's different from Google's native endpoint
Hermes has a native Gemini adapter, but per its Gemini guide it only uses it when the base URL is Google's own host (generativelanguage.googleapis.com); a proxy on any other host is treated as an OpenAI-compatible endpoint. Through TeamoRouter, Hermes therefore talks to Gemini 4 over Chat Completions:
- Tool calling and streaming work the same way they do for any OpenAI-compatible model.
- Google's Interactions API features, such as long decode at the
xhighlevel, aren't used, so a single answer stays within the standard output limit (65,536 tokens for Gemini 4).
How to pay
No subscription: top up your balance in the console from $5 and each request is billed by the tokens it uses. Cards are supported, and so are USDT, USDC and ETH. One balance covers Gemini, Claude, GPT and the rest.
FAQ
Does Hermes Agent support Gemini 4?
Yes. Hermes works with any endpoint that implements /v1/chat/completions, and TeamoRouter serves gemini-4-hydrogen, gemini-4-carbon and gemini-4-argon on one.
Do I need a Google account or a Google API key?
No. A TeamoRouter key is enough.
What base URL do I use?
https://api.teamorouter.com/v1, with provider: custom.
Can I use Claude in Hermes with the same key?
Yes. Switch with /model custom:claude-sonnet-5-5 or any other model ID on TeamoRouter.
Why can't I get answers longer than 65,536 tokens?
Long decode goes through Google's Interactions API, which Hermes only uses on Google's own host. Through an OpenAI-compatible endpoint the standard output limit applies.
Related
- Gemini 4 Hydrogen API: price, thinking levels and how to call it
- Gemini 4 vs Claude: Hydrogen and Carbon against Opus 5.5, Sonnet 5.5 and Haiku 5.5
- Connect Gemini CLI
- API integration guide