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.
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.
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.
ββ
You keep: the terminal, the file editing, the agent behaviour, /commands, everything
ββ
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
ββ
You donβt get: actual Claude models. Nobody gives those away
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
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.
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.
Both curls green but Claude Code still 401s? Then itβs the stale session above, 100%.
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.
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.
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
ββ
Full live list: integrate.api.nvidia.com/v1/models β 118 models, no key needed to look
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.
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
No tray icon on Linux β thatβs Windows/macOS only, so two terminals is normal, not a broken install.
Paste your NVIDIA key into the admin panel: http://127.0.0.1:8082/admin (your PC only, nobody else can reach it).
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
ββ
No credit card β but a phone number is mandatory. NVIDIA sends an SMS code before itβll issue a key.
ββ
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).
ββ
~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.
ββ
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
Β· client code, anything under NDA ![]()
ββ
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
ββ
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.
ββ
You hit your planβs limit at 11pm mid-task β flip to fcc-claude and keep going on the free backend instead of stopping.
ββ
Youβre on your 4th regenerated API key at 2am. All four were valid. The curl would have said so in ten seconds.
ββ
Claude confidently explains the fix, βwritesβ the fileβ¦ and nothing changes on disk. Thatβs the tool-calling trap, not you doing it wrong.
ββ
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.
!