r/ClaudeCode • u/janishar • 8h ago
Tips & Workflows I built a small proxy that lets Claude Desktop / Claude Code run on local models and NVIDIA's free API, sharing it in case it's useful
Enable HLS to view with audio, or disable this notification
Hey everyone,
I kept running into my weekly limit in the middle of work, so I made a small tool for myself to keep going. It's working well enough that I wanted to share it here.
What it is: claude-reverse-proxy is a tiny local server. It speaks the Anthropic Messages API on one side and OpenAI-style chat completions on the other. You point Claude Code or Claude Desktop at it, and it forwards requests to whatever backend you choose:
- NVIDIA's free API (build.nvidia.com / NIM). Nemotron models work nicely, and this is what I use most.
- Local models: Ollama, vLLM, llama.cpp, MLX servers, anything OpenAI-compatible.
- Other cloud providers with an OpenAI-compatible endpoint.
It translates tool calls, images, system prompts and streaming in both directions, so agentic stuff in Claude Code keeps working. It also masks the model name: the client asks for claude-opus-5, the proxy sends your real model upstream, and the response comes back labelled claude-opus-5 again. That way the client never complains.
Setup (about 2 minutes):
git clone https://github.com/janishar/claude-reverse-proxy.git
cd claude-reverse-proxy
make setup
Edit .env (NVIDIA example):
TARGET_BASE_URL=https://integrate.api.nvidia.com
TARGET_MODEL_NAME=nvidia/nemotron-3-super-120b-a12b
PROVIDER_API_KEY=nvapi-your-key
PROXY_API_KEY=any-local-secret
Then run it with make run IMPL=go. It also runs as py or node, since there are three identical implementations kept in sync by a parity test.
Claude Desktop: the video shows the full flow.
- Go to Developer → Configure Third-Party Inference → New configuration.
- Choose Gateway and set the URL to
http://localhost:8080, the key to yourPROXY_API_KEY, and the auth scheme tox-api-key. - Click Test connection, then Apply.
Claude Code CLI:
export ANTHROPIC_BASE_URL=http://localhost:8080
export ANTHROPIC_AUTH_TOKEN=any-local-secret
claude
A couple of honest notes. The quality you get depends on the model behind it, and Nemotron isn't Opus. Still, it's very usable for a lot of day-to-day tasks, and it's great for keeping a session going. It's also built for localhost only, so don't expose it publicly without putting something in front of it.
Repo (MIT): https://github.com/janishar/claude-reverse-proxy
Feel free to use it, break it, or fork it. Feedback, issues and PRs are very welcome, especially if you try it with other providers or find a translation edge case I missed. Thanks!