β‘ The EASIEST setup to use Claude Code with custom API endpoints. One command. Done.
irm https://raw.githubusercontent.com/keepuahead/custom-claude-code/main/install.ps1 | iexcurl -fsSL https://raw.githubusercontent.com/keepuahead/custom-claude-code/main/install.sh | bashnpm install -g @anthropic-ai/claude-code@2.0.64 && npm install -g @keepuahead/free-claude-code && fcc start# Clone and install
git clone https://github.com/keepuahead/custom-claude-code.git
cd custom-claude-code
pnpm install && pnpm build
npm link
# Install Claude Code
npm install -g @anthropic-ai/claude-code@2.0.64Create ~/.free-claude-code/config.json:
Windows: C:\Users\YOUR_NAME\.free-claude-code\config.json
Mac/Linux: ~/.free-claude-code/config.json
{
"Providers": [{
"name": "myapi",
"api_base_url": "https://freeaiapikey.com/v1/chat/completions",
"api_key": "YOUR_API_KEY",
"models": ["gpt-5", "claude-sonnet-4.5"]
}],
"Router": { "default": "myapi,gpt-5" }
}fcc codeThat's it! You're now using Claude Code with your custom API. π
{
"Providers": [{
"name": "freeaiapikey",
"api_base_url": "https://freeaiapikey.com/v1/chat/completions",
"api_key": "YOUR_KEY",
"models": ["gpt-5", "claude-sonnet-4.5", "gemini-3", "deepseek-chat"]
}],
"Router": { "default": "freeaiapikey,gpt-5" }
}π Get $2 FREE credit at freeaiapikey.com
{
"Providers": [{
"name": "deepseek",
"api_base_url": "https://api.deepseek.com/chat/completions",
"api_key": "YOUR_KEY",
"models": ["deepseek-chat"]
}],
"Router": { "default": "deepseek,deepseek-chat" }
}{
"Providers": [{
"name": "openrouter",
"api_base_url": "https://openrouter.ai/api/v1/chat/completions",
"api_key": "YOUR_KEY",
"models": ["anthropic/claude-sonnet-4"]
}],
"Router": { "default": "openrouter,anthropic/claude-sonnet-4" }
}{
"Providers": [{
"name": "openai",
"api_base_url": "https://api.openai.com/v1/chat/completions",
"api_key": "YOUR_KEY",
"models": ["gpt-5", "gpt-4o"]
}],
"Router": { "default": "openai,gpt-5" }
}{
"Providers": [{
"name": "custom",
"api_base_url": "https://YOUR-API-URL/v1/chat/completions",
"api_key": "YOUR_KEY",
"models": ["your-model"]
}],
"Router": { "default": "custom,your-model" }
}| Command | Description |
|---|---|
fcc code |
π Start coding with Claude |
fcc start |
|
fcc stop |
βΉοΈ Stop router server |
fcc status |
π Show server status |
fcc model |
π Switch model interactively |
fcc ui |
π Open web config UI |
fcc help |
β Show all commands |
| Model | Official Price | Our Price | You Save |
|---|---|---|---|
| GPT-5 | $1.25/1M tokens | $0.25/1M | 80% |
| Claude Sonnet 4.5 | $3/1M tokens | $0.60/1M | 80% |
| Claude Opus 4.5 | $5/1M tokens | $1/1M | 80% |
| Gemini 3 | $2/1M tokens | $0.40/1M | 80% |
| DeepSeek V3.2 | $0.50/1M tokens | $0.20/1M | 60% |
π Get $2 FREE Credit β freeaiapikey.com
No credit card required β’ No rate limits β’ Instant access
βββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β Claude Code β βββΊ β Free Claude Code β βββΊ β Your API (80% β
β (You) β β (Router) β β cheaper!) β
βββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
- You run
fcc codeinstead ofclaude - Free Claude Code routes requests to YOUR API
- Works with ANY OpenAI-compatible endpoint
- Save up to 80% on API costs!
Why do I need Claude Code v2.0.64?
Claude Code v2.0.64 has the best compatibility with custom API routers. Newer versions may have issues.
Can I use any OpenAI-compatible API?
Yes! Just set your api_base_url and api_key. Works with:
- FreeAIAPIKey.com
- DeepSeek
- OpenRouter
- OpenAI
- Gemini
- Groq
- Ollama (local)
- Any custom endpoint
How do I switch models?
Inside Claude Code, type:
/model provider,model-name
Example: /model freeaiapikey,claude-sonnet-4.5
Is my data safe?
Yes! Free Claude Code runs locally on your machine. Your API key never leaves your computer.
fcc stop && fcc start- Windows:
C:\Users\YOUR_NAME\.free-claude-code\config.json - Mac/Linux:
~/.free-claude-code/config.json
Logs are stored in ~/.free-claude-code/logs/
- β Router Server - Routes Claude Code to any API
- β
Web UI - Visual config at
fcc ui - β
Model Switcher - Change models with
fcc model - β Preset System - Save and share configs
- β Multiple Providers - Use different APIs for different tasks
Contributions welcome! See GitHub.
MIT License - Use freely!
Made with β€οΈ by keepuahead