What the proxy does
A claude code proxy is any server you run between Anthropic's coding CLI and the model that answers. Claude Code reads an environment variable for the API address and sends its requests there. If that address is a proxy, the proxy decides what really happens: it can log traffic, add rules, or forward the call to a different model.
The key detail is the wire format. Claude Code uses Anthropic's Messages format. The API at https://api.claudecodeproxyapi.com/v1 uses the OpenAI Chat Completions format, with model ID uncensored. The two are close in spirit but not interchangeable, so you cannot paste our URL straight into Claude Code. A translation layer has to rewrite each request and each response, including streaming chunks and tool calls.
What sits where
| Part | Speaks | Job |
|---|---|---|
| Claude Code CLI | Anthropic Messages format | Plans edits, calls tools, shows diffs |
| Translating proxy (local) | Both formats | Converts requests and streams, maps model names |
| This API | OpenAI Chat Completions | Runs the open-weight model, bills per token |
Community projects handle the middle part. LiteLLM's proxy and claude-code-router are two that are publicly documented for this purpose. Both are third-party software, so check their current docs for supported versions and flags before you build on them. If something fails along the way, the proxy troubleshooting guide is the place to start, and this site also has a separate step-by-step setup article.
Before you set it up: be honest about the model
Claude Code was built around Anthropic's own models. Swapping in a different model changes behaviour, and no proxy can hide that. The model here is one open-weight model run by an independent provider and tuned to answer without content refusals for lawful adult use. It is not Claude, and it is not an official API of Anthropic or any other vendor.
What it does give you for agent-style work:
- Tool calling with
tools,tool_choiceand streamedtool_calls, with results returned asrole: "tool"messages. - A 100,000-token context window, prompt and completion together.
- JSON mode with
response_format, and streaming over SSE.
What you should verify yourself: how well it follows a long agent loop, how often it makes malformed tool calls, and how it handles your language and framework. Run three or four real tasks from your repository before moving a whole workflow. The $0.50 trial credit, claimed with one click after sign-up, is enough for that.
Test the upstream first
Before touching Claude Code, confirm that the API side works with a plain request, including a tool call, since agents depend on it:
curl https://api.claudecodeproxyapi.com/v1/chat/completions \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "List the files in the src folder."}],
"tools": [{
"type": "function",
"function": {
"name": "list_files",
"description": "List files in a directory",
"parameters": {
"type": "object",
"properties": {"path": {"type": "string"}},
"required": ["path"]
}
}
}],
"tool_choice": "auto"
}'
A good answer contains a tool_calls entry with list_files and a JSON argument string. If you see that, the upstream is ready and any later trouble belongs to the proxy or CLI configuration.
Two routes, and when to pick each
Route 1: a translating proxy for Claude Code
Pick this if you like the Claude Code interface, its permission prompts and its workflow, and want a different model behind it. You run the proxy locally, point the CLI at it and map the model names the CLI sends to uncensored. The exact variables are covered in the docs and the setup article.
Route 2: a client that already speaks OpenAI
Several open-source coding assistants and editor extensions, including Aider, Continue and Cline, can use any OpenAI-compatible endpoint directly. You enter the base URL, key and model name and there is no translation layer to maintain. If you do not specifically need the Claude Code interface, this is the shorter path and has fewer parts that can break.
A rule of thumb: choose route 2 for a quick trial of the model on code, and route 1 when your team already relies on the Claude Code workflow.
Cost of a coding session
Agents resend a lot of context, so input tokens dominate the bill. Take a session of 30 requests, each with 20,000 tokens of input (files, history, tool output) and 800 tokens of output:
- Input: 30 x 20,000 = 600,000 tokens, which is 0.6 x $0.15 = $0.09
- Output: 30 x 800 = 24,000 tokens, which is 0.024 x $0.50 = $0.012
- Total: $0.102
Prices are $0.15 per 1M input tokens and $0.50 per 1M output tokens. Billing is from prepaid credit with no subscription, failed or refused requests are not charged, and credit does not expire. Top-ups run from $20 to $500 with bonuses of +5% from $50, +10% from $100 and +15% from $200. This site accepts top-ups by crypto (USDT on TRC20, USDC on Base). The pricing page has the full table, and the key page is where you sign up with Google or email.
Limits that affect agent loops
A full key allows 8 concurrent requests and 300 requests per minute. The trial key allows 2 concurrent and 60 per minute. Agents that fan out sub-tasks can hit the concurrency cap first. The API then answers HTTP 429 with the code concurrency, while the request-rate cap returns rate_limited. A temporary overload also returns 429, with Retry-After: 5. A good proxy retries on 429 after the delay, and a streamed request holds its slot until the stream ends, so stuck streams count against you.
The request body can be up to 8 MB. Keep that in mind if your tool pastes large files into prompts, and keep the whole prompt under the 100,000-token window.
Security notes for a local proxy
A proxy holds your upstream key, so treat it like any credential. Bind it to localhost, not to all network interfaces, unless you really need other machines to reach it. Store the key in an environment variable or a secrets manager rather than in a file that goes into version control. If you share a proxy among a team, give it its own master key so you can rotate it without touching the upstream key.
Also remember what an agent sends. A coding CLI forwards file contents, command output and your prompts to the model. Prompts are not used for training here, but you should still keep secrets such as private keys and .env files out of the working directory the agent can read.
A fair way to evaluate the model on your code
Pick three tasks of increasing difficulty from a real repository: a one-file fix, a change that touches three files, and a small refactor with tests. Run each with the same prompt twice, once with your current model and once with uncensored, and keep notes on four things: did the edits apply cleanly, did tool calls parse, how many retries were needed, and what each run cost. An hour of this tells you more than any leaderboard.
If the open-weight model falls short on the hardest task, you still may find it fits cheaper chores such as drafting tests, writing commit messages or explaining unfamiliar code. Since billing is pay as you go from prepaid credit with no subscription, there is no penalty for using it only for those jobs.
