πŸ”‘ Claude Code for $0 β€” and the "AUTH Error" That Was Never the API Key

:key: That AUTH Error is lying. Your API key is almost never the problem β€” the session is stale, or your model can’t do the job. Two curls tell you which.

:puzzle_piece: Free Claude Code = a middleman app on your PC. Claude Code phones Anthropic; this answers the call itself and asks NVIDIA’s free models instead. Same terminal, $0 instead of $240/year.

:warning: Straight up: this does not hand you Claude. You keep the Claude Code tool β€” the thinking comes from someone else’s model.

🧠 What this actually is, in 30 seconds β€” no background needed

Claude Code is Anthropic’s coding assistant that lives in your terminal β€” it reads your files, writes code, runs commands, fixes its own mistakes. It normally costs $20/month (Pro) up to $200/month (Max).

Free Claude Code (FCC) is a small program you run on your own machine. Claude Code sends every request to Anthropic’s servers β€” FCC quietly stands in the middle, catches those requests, and forwards them to a different AI company that has a free tier. Claude Code never notices the swap.

β”œβ”€ :white_check_mark: You keep: the terminal, the file editing, the agent behaviour, /commands, everything
β”œβ”€ :counterclockwise_arrows_button: You swap: the brain β€” NVIDIA, DeepSeek, Gemini, Groq, Kimi, MiniMax, Z.ai, or a model on your own PC (Ollama / LM Studio / llama.cpp). 28 providers, switch anytime
└─ :cross_mark: You don’t get: actual Claude models. Nobody gives those away

:star: MIT licensed Β· 42,000+ stars Β· shipping updates the same week. It also launches Codex and Pi the same way (fcc-codex, fcc-pi).

⚑ The fix β€” changing the model mid-session does nothing

A live Claude session stays glued to whatever model it booted with. Pick a new one from the menu and it keeps hammering the old, dead one β€” throwing errors that look like auth failures.

# 1. exit Claude completely  (not a new tab β€” fully out)
# 2. restart the proxy
fcc-server restart
# 3. brand-new session
fcc-claude

First message to prove it’s alive:

Reply with exactly: FCC is working

:unlocked: Second cause, same symptom β€” and it’s FCC’s most-reported bug. If you ever logged into claude.ai from the terminal, that saved login outranks your proxy token. You get:

Auth conflict: Both a token (ANTHROPIC_AUTH_TOKEN) and an API key (/login managed key) are set.
API Error: 401 {"detail":"Invalid API key"}

Your key is fine. One command clears it:

claude /logout

…then relaunch with fcc-claude. :adhesive_bandage: Also check cat ~/.claude/settings.json | jq .env β€” a value saved in that file silently beats anything you export in your shell.

🩺 Two curls that split the blame in 10 seconds β€” key vs proxy

β‘  Is my NVIDIA key good?

curl -s -o /dev/null -w "%{http_code}\n" \
  -H "Authorization: Bearer $NVIDIA_API_KEY" \
  https://integrate.api.nvidia.com/v1/models

200 β†’ key is fine, account is fine. Stop making new keys. Β· 401 β†’ no key sent Β· 403 β†’ key rejected or that model isn’t granted to you β€” 403 alone can’t tell you which.

β‘‘ Is the proxy actually answering?

curl -X POST "http://localhost:8082/v1/messages" \
  -H "Authorization: Bearer freecc" -H "anthropic-version: 2023-06-01" \
  -H "content-type: application/json" \
  -d '{"model":"claude-sonnet-4-6","max_tokens":1,"messages":[{"role":"user","content":"."}]}'

Anything starting {"id":"msg_ β†’ working. Even an unknown-model error counts as a pass β€” it authenticated you before rejecting the name.

:bullseye: Both curls green but Claude Code still 401s? Then it’s the stale session above, 100%. :warning: ANTHROPIC_BASE_URL must be the root β€” http://localhost:8082, no /v1. Claude Code adds that itself.

🧨 The model trap β€” anything named "coder" quietly breaks it

Claude Code needs tool calling β€” the model’s ability to actually run commands and edit files, not just talk about them. Without it you get the worst kind of failure: no error at all. Claude describes what it’s about to do, prints tool JSON as plain text, and never touches a single file.

:skull_and_crossbones: Trap: models with coder, codellama, starcoder, codestral or granite-code in the name are mostly 2023-era builds from before tool calling existed. They’re the obvious-looking pick in the catalog and they’re the wrong one β€” deepseek-coder-6.7b-instruct is exactly this.

:white_check_mark: Picks that work:
β”œβ”€ nvidia/nemotron-3-super-120b-a12b β€” FCC’s default, tool calling confirmed (120B total brain, 12B used per answer β€” fast for its size)
β”œβ”€ minimaxai/minimax-m2.7 β€” the one with a confirmed working Claude-Code-on-NIM report; switch to it the moment tools stop firing
└─ :clipboard: Full live list: integrate.api.nvidia.com/v1/models β€” 118 models, no key needed to look

:microscope: That list carries zero capability info β€” presence proves nothing. Smoke-test any model before you trust it. Context limits: NVIDIA’s docs claim up to 1M, sibling models measured ~131K β€” test your own ceiling.

πŸš€ Full setup from zero β€” install, run, Linux needs two terminals
curl -fsSL "https://raw.githubusercontent.com/Alishahryar1/free-claude-code/main/scripts/install.sh" | sh

Same command updates it later. Add --dry-run first to see what it does without doing it.

:package: It also installs Claude Code and Codex, and offers Pi β€” not a single-package install. It pulls its own Python 3.14 through uv; on Ubuntu that’s expected, not a bug. It refuses to run while any fcc-* process is alive.

fcc-server     # terminal 1 β€” leave it open, this IS the proxy
fcc-claude     # terminal 2 β€” your Claude Code session

:desktop_computer: No tray icon on Linux β€” that’s Windows/macOS only, so two terminals is normal, not a broken install.
:gear: Paste your NVIDIA key into the admin panel: http://127.0.0.1:8082/admin (your PC only, nobody else can reach it).
:key: Get the key free at build.nvidia.com.

Real commands are fcc-server fcc-claude fcc-codex fcc-pi. (fcc-init and free-claude-code aren’t commands β€” you’ll get command-not-found.)

⚠️ Read before you start β€” phone gate, blocked countries, rate limit, terms

β”œβ”€ :mobile_phone: No credit card β€” but a phone number is mandatory. NVIDIA sends an SMS code before it’ll issue a key.
β”œβ”€ :prohibited: Country blocks on that SMS step: TR, IR, SY, CU, KP, RU, BY. If you’re in one, you hit a wall at the key step β€” use a different provider in FCC instead (OpenRouter, Gemini, Groq, Cerebras all have free tiers).
β”œβ”€ :turtle: ~40 requests per minute is the real free-tier ceiling. No official way to raise it. Old β€œ1,000 credits” numbers floating around are years stale.
β”œβ”€ :open_book: Terms: NVIDIA keeps what you send and what comes back to improve their models, and the free API is for testing and evaluation β€” not production. So: personal projects, learning, messing around :white_check_mark: Β· client code, anything under NDA :cross_mark:
└─ :fire_extinguisher: Never overwrite ~/.claude.json with a fresh file β€” merge into it, or you wipe your whole Claude Code config.

πŸ’‘ Five moments this actually saves you

β”œβ”€ :money_with_wings: You want to try an agent that edits your own files, but $20/month to find out if you even like it is a hard no.
β”œβ”€ :crescent_moon: You hit your plan’s limit at 11pm mid-task β€” flip to fcc-claude and keep going on the free backend instead of stopping.
β”œβ”€ :repeat_button: You’re on your 4th regenerated API key at 2am. All four were valid. The curl would have said so in ten seconds.
β”œβ”€ :robot: Claude confidently explains the fix, β€œwrites” the file… and nothing changes on disk. That’s the tool-calling trap, not you doing it wrong.
└─ :house: You’ve got a decent GPU sitting idle β€” same tool, pointed at Ollama or LM Studio, fully offline, no key at all.

Fast version: curl the key β†’ 200 β†’ claude /logout β†’ quit β†’ fcc-server restart β†’ new session. And if tools never fire, it’s the model, not you.

A key that answers 200 has nothing left to confess β€” everything after that is the client’s fault, not your account’s.

2 Likes