claude-code-proxy

Configure a local FastAPI proxy routing Claude Code through OpenRouter free-tier models.

Updated Jul 3, 2026
One-click install
npx skills add https://github.com/decniner/HermesP1 --skill claude-code-proxy-decniner
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: claude-code-proxy
Source: https://github.com/decniner/HermesP1/tree/main/.hermes-backup/skills/autonomous-ai-agents/claude-code-proxy
Command: npx skills add https://github.com/decniner/HermesP1 --skill claude-code-proxy-decniner

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Claude Code normally requires an Anthropic subscription, and its v2.1+ binary validates model names client-side, blocking alternative providers. This Skill sets up a local translation proxy so Claude Code runs against OpenRouter's free tier or any OpenAI-compatible endpoint. ## Core Features & Use Cases - API Translation Proxy: Runs a FastAPI proxy on port 8082 that converts Anthropic Messages API requests into OpenAI Chat Completions format. - Model Name Spoofing: Uses the ANTHROPIC_MODEL environment variable to bypass Claude Code's client-side model validation before any network call. - Free Model Discovery: Provides a curl-based query to list currently available OpenRouter free-tier models such as qwen/qwen3-coder:free. - Use Case: A developer without an Anthropic subscription wants to run Claude Code CLI for refactoring tasks; this Skill walks them through cloning the proxy, configuring .env, adding a free-claude shell function, and verifying end-to-end operation. ## Quick Start Set up the claude-code-proxy so I can run Claude Code through OpenRouter free models, then verify it with a test prompt.

Frequently Asked Questions about claude-code-proxy

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use Claude Code with OpenRouter free models?▼

Run a local proxy like claude-code-proxy that translates Anthropic Messages API calls into OpenAI Chat Completions format. Point ANTHROPIC_BASE_URL at the proxy, set a free model slug in .env, and launch Claude Code through a shell wrapper function.

How to bypass Claude Code model validation error?▼

Set the ANTHROPIC_MODEL environment variable to a known Anthropic model string such as claude-3-5-sonnet-20241022. Claude Code v2.1+ validates model names client-side in its compiled binary, and this env var overrides the name before validation runs.

Can I use Claude Code without an Anthropic subscription?▼

Yes, by routing requests through a local translation proxy to OpenRouter's free tier or another OpenAI-compatible endpoint. The proxy handles format conversion while the spoofed model name satisfies Claude Code's internal checks.

Why does Claude Code proxy return 429 Too Many Requests?▼

OpenRouter's free tier enforces aggressive rate limits, especially when multiple Claude Code sessions open simultaneous connections. The proxy retries with exponential backoff, but sustained load will still fail; reduce concurrency or switch free models.

Why is my OpenRouter free model returning 404 unavailable?▼

OpenRouter removes the :free suffix from models without notice, causing 404 errors on previously free slugs. Query the /api/v1/models endpoint to list currently free models and update the BIG_MODEL, MIDDLE_MODEL, and SMALL_MODEL values in .env.