How to Use Free Claude Code and Save Money (Full Setup Guide)

Summarize this post with AI

A 14-minute read, or the key points in about 30 seconds, in the assistant you already use.

Opens in a new tab with the prompt filled in. Nothing passes through this site.

You can keep the Claude Code interface you already like and stop paying Anthropic for every token — by pointing it at a free or near-free model provider instead. An open-source proxy called Free Claude Code sits between the Claude Code CLI and 17 different model backends, so you route your coding sessions to NVIDIA NIM, OpenRouter's free models, Google Gemini, or a local model on your own machine. I set it up in about ten minutes. Here's exactly how, command by command, plus the honest catch.

What is Free Claude Code, in one line

Free Claude Code is an open-source, Anthropic-compatible proxy that intercepts Claude Code's API traffic and forwards it to a cheaper or free model provider of your choice. The Claude Code CLI still runs as normal — same terminal, same VS Code and JetBrains integration — but the model answering your prompts is whatever backend you wire up, not Anthropic's metered API.

In plain terms: you keep the tool, you swap the engine, and you stop the meter.

Still choosing a terminal agent in the first place? My Claude Code vs Gemini CLI vs Codex CLI comparison shows which plan includes each one, plus their config files and sandbox defaults.

How it actually saves you money

Claude Code billed through Anthropic's API charges per token, and a real coding session burns a lot of them. The proxy breaks that link. It exposes a local endpoint that speaks Anthropic's API format, then translates your requests to providers that either have a free tier or charge a fraction of the price.

That's the whole trick. Providers like NVIDIA NIM and OpenRouter publish free model slugs; Google Gemini's free tier is generous; and if you run Ollama or LM Studio locally, your cost is electricity. The proxy even supports per-tier routing — you can send the heavy "Opus" requests to one provider and the lighter "Haiku" ones to another, so you spend nothing where you don't need the big model.

Watch the setup walkthrough first

If you'd rather see it running before you type anything, this video walks through the install and the Admin UI end to end.

What you need before you start

The install script handles most of it, but here's the full checklist so nothing surprises you:

  • The Claude Code CLI (the installer will set it up if you don't have it).
  • The uv package manager — a fast Python package and project manager.
  • Python 3.14.0.
  • At least one API key from a supported provider. The free ones (NVIDIA NIM, OpenRouter, Google Gemini) are the obvious place to start.

Step 1: Install the proxy

One command does it. On macOS or Linux, run:

code
curl -fsSL "https://github.com/Alishahryar1/free-claude-code/blob/main/scripts/install.sh?raw=1" | sh

On Windows, open PowerShell and run:

code
irm "https://github.com/Alishahryar1/free-claude-code/blob/main/scripts/install.ps1?raw=1" | iex

The script pulls in uv, the proxy, and Claude Code if it's missing. Give it a minute to finish.

Step 2: Start the server

Once it's installed, launch the proxy:

code
fcc-server

The terminal prints the Admin UI address — usually:

code
http://127.0.0.1:8082/admin

Leave this running. It's the bridge that all your Claude Code traffic will flow through.

Step 3: Get a free API key

Open the Admin UI URL in your browser, then grab a key from whichever provider you want to route to. The free-friendly starting points:

  • NVIDIA NIM — create a key at build.nvidia.com/settings/api-keys. The default model slug is nvidia_nim/nvidia/nemotron-3-super-120b-a12b.
  • OpenRouter — create a key at openrouter.ai/keys. Free model slugs look like open_router/stepfun/step-3.5-flash:free.
  • Google Gemini — create a key at aistudio.google.com/apikey. A solid free slug is gemini/gemini-2.5-flash.

Other supported backends include DeepSeek, Mistral, Codestral, Groq, Cerebras, Fireworks, Kimi, Z.ai, plus local options like Ollama, LM Studio, and llama.cpp. Seventeen in total — pick one to start and add more later.

Step 4: Configure the model in the Admin UI

Inside the Admin UI, the flow is the same no matter which provider you chose:

  • Paste your key into the matching field — for NVIDIA NIM that's NVIDIA_NIM_API_KEY, for OpenRouter it's OPENROUTER_API_KEY, for Gemini it's GEMINI_API_KEY.
  • Set the MODEL field to the provider-prefixed slug (for example gemini/gemini-2.5-flash).
  • Click Validate to confirm the key works, then Apply to save it.

Validate is the step people skip and then wonder why nothing connects. Don't skip it — it catches a bad key before you waste a session.

Step 5: Connect Claude Code to the proxy

Now point the actual tool at your local proxy.

For the terminal, the package gives you a wrapper that sets everything up for you. Just run:

code
fcc-claude

For VS Code, add this to your settings.json so the Claude Code extension talks to the proxy instead of Anthropic:

code
"claudeCode.environmentVariables": [
  { "name": "ANTHROPIC_BASE_URL", "value": "http://localhost:8082" },
  { "name": "ANTHROPIC_AUTH_TOKEN", "value": "freecc" },
  { "name": "CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY", "value": "1" },
  { "name": "CLAUDE_CODE_AUTO_COMPACT_WINDOW", "value": "190000" }
]

For JetBrains IDEs (the ACP integration), put the same environment variables into ~/.jetbrains/acp.json on macOS and Linux, or AppData/Roaming/JetBrains/acp-agents/installed.json on Windows.

That's it. Open Claude Code and your prompts now run through the free backend.

Optional: voice, Discord, and Telegram

If you want to drive Claude Code from a chat bot or by voice, the project supports that too. Install the voice extras by adding a flag to the install command:

code
curl -fsSL "..." | sh -s -- --voice-all

Then open the Admin UI, go to the Messaging section, pick Discord or Telegram, paste your bot token and channel or user ID, set the Allowed Directory to the workspace the bot may touch, and hit Validate then Apply. In-chat you get commands like /stop, /clear, and /stats. Nice for kicking off a task from your phone, but completely optional — skip it if you only want the cost savings.

Free Claude Code vs paying Anthropic directly

The honest trade-off. You're swapping money for a bit of setup and, depending on the backend, some quality.

FactorFree Claude Code (proxy)Claude Code on Anthropic API
CostFree / near-free backendsPer-token, adds up fast
Model qualityDepends on provider you pickAnthropic's own Claude models
SetupOne install + Admin UI configBuilt-in, zero config
Provider choice17 backends, local includedAnthropic only
Privacy optionLocal models keep code offlineSent to Anthropic
Best forHobby projects, learning, high-volume cheap workProduction work where top quality matters

The short version: if your bill is the problem, or you want to run a local model for privacy, the proxy is an easy win. If you specifically need Anthropic's Claude quality for shipping production code, pay for the real thing — the proxy can't conjure that from a free model.

Where it falls short

The part that makes the rest believable. This is a genuinely useful project, but be clear-eyed about it.

  • You're not getting Anthropic's Claude for free. You're getting the Claude Code interface in front of a different model. A free 120B model is good; it is not Opus.
  • Free tiers have rate limits. Heavy sessions on NVIDIA NIM or OpenRouter free slugs will hit caps — annoying mid-task.
  • It's a community open-source project, not an official Anthropic product. Updates, stability, and provider compatibility ride on the maintainer.
  • Local models (Ollama, LM Studio) are free and private but need decent hardware to feel snappy, and smaller local models struggle with long, tool-heavy coding tasks.
  • Tool use and streaming are supported, but odd provider quirks can surface. Keep your provider list short until you find one that's reliable for your work.

Frequently asked questions

Is Free Claude Code actually free?▾
The proxy software is free and open-source under the MIT license. Whether your usage is free depends on the provider you route to — NVIDIA NIM, OpenRouter free slugs, Gemini's free tier, and local models like Ollama cost nothing, while paid providers charge their own (usually much cheaper) rates.
Does this give me real Claude models for free?▾
No. It gives you the Claude Code tool powered by a different model backend. You keep the workflow and interface, but the answers come from whatever provider you connect. If you need Anthropic's own Claude quality, you still need a paid Anthropic key.
Is it safe to run the install script?▾
It's an open-source project, so you can read both install.sh and install.ps1 in the GitHub repo before running them. If you're cautious, clone the repo and run it from source instead of piping the script straight into your shell.
Can I keep my code private with this?▾
Yes, if you route to a local backend like Ollama, LM Studio, or llama.cpp. Then nothing leaves your machine. Cloud providers (NVIDIA, OpenRouter, Gemini) receive your prompts the same way any API would, so check each provider's data policy.
Does it work with VS Code and JetBrains?▾
Yes. Set the ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN environment variables (shown in Step 5) in VS Code's settings.json or the JetBrains ACP config, and the editor's Claude Code integration routes through the proxy.
Which free provider should I start with?▾
Start with Google Gemini (gemini/gemini-2.5-flash) for a reliable free tier and good coding ability, or NVIDIA NIM for a large free model. Try one, see if the rate limits and quality fit your work, then add a second as a fallback.

If your Claude Code bill has been creeping up, this is the lowest-effort way to cut it: install the proxy, drop in a free API key, point Claude Code at localhost, and keep working. Start with one free provider, see how it handles your day-to-day coding, and keep a paid key for the work that has to be perfect.

Share