Blog

Gemini 4 in Claude Code: run Hydrogen, Carbon and Argon with one key, no Google account

Short answer

Claude Code can run on Gemini 4, with no Google account and no Anthropic account. Claude Code sends requests in the Anthropic format; TeamoRouter accepts them and passes them to Gemini 4. Three steps:

  1. Get a TeamoRouter API key and top up from $5.
  2. Set the environment variables: ANTHROPIC_BASE_URL=https://api.teamorouter.com, ANTHROPIC_AUTH_TOKEN with your key, and ANTHROPIC_MODEL=gemini-4-hydrogen.
  3. Run claude in your project folder.

TeamoRouter users already do this: from November 13 to 18, 2026, Claude Code sent about 1,900 requests to Gemini 4 and all of them succeeded, including tool calls (reading and editing files, running terminal commands).

Get an API key: sign up and top up from $5.

Why run Claude Code on Gemini 4

  • Hydrogen costs less than Sonnet 5.5 and scores about the same. On Artificial Analysis as of November 18, 2026, Gemini 4 Hydrogen scores 54 on the Intelligence Index and Claude Sonnet 5.5 scores 55. A task from their test set costs $3.16 on Hydrogen and $10.02 on Sonnet 5.5.
  • Carbon is level with Opus 5.5. It scores 60 against 59, and until November 30 a task costs $5.48 against $10.04.
  • All three Gemini 4 models have a 1M-token context window, enough for a large repository.
  • No Claude account needed. Through an API gateway Claude Code doesn't sign in to Anthropic, which also helps if you're in a country Anthropic doesn't support.

The full comparison is in Gemini 4 vs Claude.

Step 1. Install Claude Code

If you don't have it yet, install it with npm (Node.js 18 or later):

bash
npm install -g @anthropic-ai/claude-code

Step 2. Key and environment variables

A new account starts at $0, so top up before your first request. You can top up from $5. If a request returns 402 with "wallet balance is insufficient", your balance is empty and the URL and key are set correctly.

Create a key in the TeamoRouter console. It's shown once, so save it.

macOS and Linux: add this to ~/.zshrc (or ~/.bashrc):

bash
export ANTHROPIC_BASE_URL=https://api.teamorouter.com
export ANTHROPIC_AUTH_TOKEN="your TeamoRouter key"
export ANTHROPIC_MODEL=gemini-4-hydrogen
export ANTHROPIC_DEFAULT_SONNET_MODEL=gemini-4-hydrogen
export ANTHROPIC_DEFAULT_OPUS_MODEL=gemini-4-carbon
export ANTHROPIC_DEFAULT_HAIKU_MODEL=gemini-4-hydrogen

Then run source ~/.zshrc.

Windows (PowerShell):

powershell
setx ANTHROPIC_BASE_URL "https://api.teamorouter.com"
setx ANTHROPIC_AUTH_TOKEN "your TeamoRouter key"
setx ANTHROPIC_MODEL "gemini-4-hydrogen"
setx ANTHROPIC_DEFAULT_SONNET_MODEL "gemini-4-hydrogen"
setx ANTHROPIC_DEFAULT_OPUS_MODEL "gemini-4-carbon"
setx ANTHROPIC_DEFAULT_HAIKU_MODEL "gemini-4-hydrogen"

setx saves the variables permanently but only for new windows, so close the terminal and open a new one.

What each line does:

  • ANTHROPIC_BASE_URL: where Claude Code sends requests. Leave off the trailing /v1.
  • ANTHROPIC_AUTH_TOKEN: your TeamoRouter key. You don't need /login. If you also have ANTHROPIC_API_KEY set, remove it, or Claude Code will try to sign in to Anthropic.
  • ANTHROPIC_MODEL: the model a session starts on.
  • ANTHROPIC_DEFAULT_SONNET_MODEL, ..._OPUS_MODEL, ..._HAIKU_MODEL: what sonnet, opus and haiku mean in the /model menu. Claude Code uses haiku for small background jobs such as session titles, so point it at Gemini too.

Step 3. Start and switch models

bash
cd ~/projects/my-app
claude

Ask "Briefly describe how this project is structured". If you get an answer, you're connected.

Switch models inside a session:

  • /model opus: Gemini 4 Carbon (with the setup above), for hard tasks;
  • /model sonnet: back to Hydrogen;
  • /model gemini-4-argon: Argon, by model ID;
  • /model claude-sonnet-5-5: Claude, with the same key.

Which Gemini 4 model to pick

Model ID Official price, input / output per 1M tokens Use it for
Gemini 4 Hydrogen gemini-4-hydrogen $1.50 / $7.50 Everyday coding, agent loops, most tasks
Gemini 4 Carbon gemini-4-carbon $2 / $10 until November 30, 2026, then $4 / $20 Complex architecture, hard bugs, security reviews
Gemini 4 Argon gemini-4-argon $2 / $10 until November 30, 2026, then $4 / $20 Long tasks where you don't want to spend extra tokens on thinking
For comparison: Claude Sonnet 5.5 claude-sonnet-5-5 $2 / $10 —
For comparison: Claude Opus 5.5 claude-opus-5-5 $4 / $20 —

Prices are from the official Google and Anthropic pages. TeamoRouter prices are lower than official; see the pricing page for current ones. How the three Gemini 4 models differ: Gemini 4 Hydrogen vs Carbon vs Argon.

Good to know before you start

  • Gemini 4 caching is implicit only. Google doesn't support explicit caching for Gemini 4; repeated code in a long session is cached automatically.
  • Default output is up to 65,536 tokens, plenty for Claude Code.
  • Type the model ID exactly: gemini-4-hydrogen, gemini-4-carbon, gemini-4-argon, with no prefix and no suffix like [1m].
  • You won't see "User location is not supported": requests go to api.teamorouter.com, not straight to Google.

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. The same key also calls Claude, GPT and DeepSeek models.

Common errors

  • 402 "wallet balance is insufficient": the balance is empty. Top up and retry.
  • 401, or Claude Code asks you to /login: the key wasn't picked up. Check echo $ANTHROPIC_AUTH_TOKEN in the same terminal; on Windows open a new window after setx.
  • 404 or "model not found": a typo in the model ID, or an extra /v1 in ANTHROPIC_BASE_URL.

FAQ

Do I need a Google account?

No, and no Google AI Studio key either. A TeamoRouter key is enough.

Do I need an Anthropic account or a Claude Pro subscription?

No. Claude Code runs on your TeamoRouter key and never signs in to Anthropic.

Can I switch between Gemini and Claude in one session?

Yes, with /model. One key covers both.

Read next

Ready to connect?Log in · top up · create an API key — three steps to start.