FastAPI gateway that lets Claude Code call NVIDIA's OpenAI-compatible chat API through Claude Code's Anthropic-compatible /v1/messages interface.
cd D:\test\nvidia-claude-code-proxy
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
Copy-Item .env.example .env
notepad .envSet at least:
NVIDIA_API_KEY=nvapi-your-key
NVIDIA_MODEL=stepfun-ai/step-3.5-flash.\start.ps1Health check:
Invoke-RestMethod http://127.0.0.1:8082/healthIn the shell where you start Claude Code:
$env:ANTHROPIC_BASE_URL = "http://127.0.0.1:8082"
$env:ANTHROPIC_AUTH_TOKEN = "local-proxy"
claudeIf PROXY_API_KEY is empty in .env, you can omit ANTHROPIC_AUTH_TOKEN. If PROXY_API_KEY is set, ANTHROPIC_AUTH_TOKEN must match it.
- The proxy always sends requests to
NVIDIA_MODEL; Claude Code model names are accepted but ignored upstream. /v1/messages/count_tokensuses a local approximation so Claude Code can continue operating.- Tool calls are translated between Anthropic
tool_use/tool_resultblocks and OpenAI-compatibletool_calls. - Streaming responses are converted to Anthropic-style server-sent events.