Using Claude Code for Free

Published on 2026-05-04

Claude Code is a powerful agentic tool that integrates directly into your workflow. By using a proxy, you can leverage various high-performance LLM providers to power the Claude Code experience without high costs.

1. Environment Setup

Before installing the proxy, ensure you have the necessary runtime tools:

  • Install Python 3.14
  • Install uv (the fast Python package manager)

// Install uv on macOS/Linux:

curl -LsSf https://astral.sh/uv/install.sh | sh

// Install Python:

uv python install 3.14

2. Configuring the Proxy

The proxy acts as a "drop-in" replacement for Claude Code's Anthropic API calls.

  1. Clone the free-claude-code repository.
  2. Copy .env.example to .env.
  3. Configure your provider in .env:
    • NVIDIA NIM: Set NVIDIA_NIM_API_KEY
    • OpenRouter: Set OPENROUTER_API_KEY
    • DeepSeek: Set DEEPSEEK_API_KEY
    • Local: Works with Ollama or llama.cpp.
  4. Start the proxy: uv run uvicorn server:app --host 0.0.0.0 --port 8082

3. Client Configuration

Tell the Claude CLI to talk to your local proxy instead of the official API:

// CLI Launch Command:

ANTHROPIC_AUTH_TOKEN="freecc" ANTHROPIC_BASE_URL="http://localhost:8082" claude

IDE Integration

VS Code

Add to settings.json:

{
  "claudeCode.environmentVariables": [
    { "name": "ANTHROPIC_BASE_URL", "value": "http://localhost:8082" },
    { "name": "ANTHROPIC_AUTH_TOKEN", "value": "freecc" }
  ]
}

JetBrains

Edit installed.json / acp.json:

"env": {
  "ANTHROPIC_BASE_URL": "http://localhost:8082",
  "ANTHROPIC_AUTH_TOKEN": "freecc"
}

4. Pro Tips & Troubleshooting

  • Model Switching: Use /model inside the CLI to choose any discovered provider model.
  • Thinking Models: If a model fails during "thinking" phases, try the "(no thinking)" variant in the picker.
  • Connection Errors: Ensure your proxy is running and that you've pointed the Base URL to the root http://localhost:8082 (do not append /v1).