free-claude-code — What is it?

Free Claude Code is a middleware that routes Claude Code's Anthropic API calls to various providers, enabling free usage of Claude Code without an Anthropic API key.

⭐ 39,704 Stars 🍴 6,485 Forks Python MIT Author: Alishahryar1
Source: Official README and linked documentation View on GitHub →

Why it matters

This project is being discussed because its unique approach of providing free access to Claude Code by routing through alternative providers. It addresses the pain point of high costs associated with Anthropic API usage and fills the gap for users seeking cost-effective AI tools. The project differs through its ability to integrate multiple providers and its ease of use with minimal setup.

Source: Official README and linked documentation

Core Features

Zero Cost

Routes Anthropic API calls to free or low-cost providers like NVIDIA NIM, OpenRouter, DeepSeek, LM Studio, and llama.cpp, allowing for free usage of Claude Code.

Source: Official README and linked documentation
Drop-in Replacement

Simple configuration through environment variables, requiring no modifications to Claude Code CLI or VSCode extension.

Source: Official README and linked documentation
5 Providers

Supports multiple providers, including NVIDIA NIM, OpenRouter, DeepSeek, LM Studio, and llama.cpp, offering flexibility in choosing the best service for different models.

Source: Official README and linked documentation
Per-Model Mapping

Enables routing of specific Claude models to different providers, allowing for optimized performance and cost efficiency.

Source: Official README and linked documentation
Thinking Token Support

Parses special tags for reasoning and tool calls, enhancing the functionality of Claude Code.

Source: Official README and linked documentation
Heuristic Tool Parser

Automatically parses tool calls from model outputs into structured data, improving the usability of Claude Code outputs.

Source: Official README and linked documentation
Request Optimization

Intercepts and handles trivial API calls locally to save quota and reduce latency.

Source: Official README and linked documentation
Smart Rate Limiting

Implements proactive throttling and reactive backoff strategies to manage API usage effectively.

Source: Official README and linked documentation
Discord / Telegram Bot

Supports remote coding with features like tree-based threading, session persistence, and live progress tracking.

Source: Official README and linked documentation
Subagent Control

Prevents runaway subagents by enforcing background execution control.

Source: Official README and linked documentation
Extensible

Cleanly designed with abstract base classes for easy addition of new providers or platforms.

Source: Official README and linked documentation

Architecture

The architecture is modular, with distinct components for API routing, request optimization, and provider integration. It uses a combination of design patterns like the Factory Method for provider creation and the Strategy pattern for rate limiting. Data flows through a series of handlers and processors, with key technical decisions focusing on flexibility and performance optimization.

Source: Official repository tree and dependency files

Project Knowledge Graph

Knowledge graph: project (center) + core features (inner hexagons) + key dependencies (outer chips) fastapi uvicorn httpx markdown-it-py pydantic Zero Cost Drop-in Replacement 5 Providers Per-Model Mapping Thinking Token SupportThinking Token Supp… Heuristic Tool ParserHeuristic Tool Pars… Request Optimization Smart Rate Limiting free-claude-code Project Core feature Key dependency

Tech Stack

LanguagePythonFrameworkFastAPI for the API server, uvicorn for ASGI server, httpx for HTTP requests, markdown-it-py for Markdown rendering, pydantic for data validation, python-dotenv for environment variable management, tiktoken for tokenization, python-telegram-bot and discord.py for messaging platforms, loguru for logging
fastapiuvicornhttpxmarkdown-it-pypydanticpython-dotenvtiktokenpython-telegram-botdiscord.pyloguru
Not specified, but likely to be run on a local server or development environment.
Source: Official repository tree and dependency files

Quick Start

1. Get an API key from NVIDIA NIM, OpenRouter, DeepSeek, LM Studio, or llama.cpp. 2. Install Claude Code. 3. Clone the repository and configure the `.env` file with your API keys and model names. 4. Start the proxy server with `uv run uvicorn server:app --host 0.0.0.0 --port 8082`. 5. Run Claude Code with the proxy server running, pointing `ANTHROPIC_BASE_URL` at the proxy root URL. 6. (Optional) Set up the VSCode extension by editing settings.json and reloading extensions.
Source: Official README and linked documentation

Use Cases

1. Developers seeking cost-effective AI tools for their projects. 2. Users who want to experiment with Claude Code without incurring API costs. 3. Individuals or organizations looking to integrate Claude Code into their workflows without relying on Anthropic's API.

Source: Official README and linked documentation

Strengths & Limitations

Strengths

  • Provides a cost-effective solution for using Claude Code.
  • Highly configurable with support for multiple providers.
  • Easy to set up and use.

Limitations

  • Limited to the free or low-cost quotas provided by the supported providers.
  • May have performance differences compared to direct Anthropic API usage.
Source: Official README and linked documentation

Latest Release

Not enough information.

Source: Official releases

Verdict

Free Claude Code is a tool for developers and users looking to use Claude Code's capabilities without the associated costs. Its modular design and support for multiple providers make it a configurable and practical solution for various AI integration needs.

Sources and review scope
This review is based on the project's public documentation. Versions, installation commands, and feature boundaries can change upstream; check the cited sources and current release before use. Sources checked on: 2026-04-28 00:59.

Reference materials: README, GitHub API, dependency files