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.

⭐ 24,232 Stars 🍴 3,588 Forks Python MIT Author: Alishahryar1
Source: per README View on GitHub →

Why it matters

This project is gaining attention due to 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 stands out for its ability to integrate multiple providers and its ease of use with minimal setup.

Source: Synthesis of README and project traits

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: per README
Drop-in Replacement

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

Source: per README
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: per README
Per-Model Mapping

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

Source: per README
Thinking Token Support

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

Source: per README
Heuristic Tool Parser

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

Source: per README
Request Optimization

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

Source: per README
Smart Rate Limiting

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

Source: per README
Discord / Telegram Bot

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

Source: per README
Subagent Control

Prevents runaway subagents by enforcing background execution control.

Source: per README
Extensible

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

Source: per README

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: Code tree + dependency files

Tech Stack

infra: Not specified, but likely to be run on a local server or development environment.  |  key_deps: fastapi, uvicorn, httpx, markdown-it-py, pydantic, python-dotenv, tiktoken, python-telegram-bot, discord.py, loguru  |  language: Python  |  framework: FastAPI 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

Source: Dependency files + code tree

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: README Installation/Quick Start

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: README

Strengths & Limitations

Strengths

  • Strength 1: Provides a cost-effective solution for using Claude Code.
  • Strength 2: Highly flexible with support for multiple providers.
  • Strength 3: Easy to set up and use.

Limitations

  • Limitation 1: Limited to the free or low-cost quotas provided by the supported providers.
  • Limitation 2: May have performance differences compared to direct Anthropic API usage.
Source: Synthesis of README, code structure and dependencies

Latest Release

Not enough information.

Source: GitHub Releases

Verdict

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

Transparency Notice
This page is auto-generated by AI (a large language model) from the following public materials: GitHub README, code tree, dependency files and release notes. Analyzed at: 2026-04-28 00:59. Quality score: 85/100.

Data sources: README, GitHub API, dependency files