This guide walks you through routing Claude Code to NVIDIA NIM using a local proxy server.
Before starting, ensure you have uv installed on your system to manage Python tools.
- Visit the NVIDIA API Keys settings page.
- Generate a new API key and save it securely. You will need this to authenticate with the NIM models.
Install the proxy tool using uv and launch the server.
# Install the free-claude-code proxy
uv tool install --force git+https://github.com/Alishahryar1/free-claude-code.git
# Launch the proxy server
fcc-server
Note: Keep this terminal window open. The server runs on port
8082. You can access the admin panel at http://127.0.0.1:8082/admin.
Open a new terminal window. You must set these environment variables to intercept Claude Code traffic and route it to your local server.
# Set the dummy authentication token
export ANTHROPIC_AUTH_TOKEN="freecc"
# Redirect the base URL to your local proxy
export ANTHROPIC_BASE_URL="http://localhost:8082"
See the comment below on how you can add this to your .bashrc as a custom function
In the same terminal where you just configured the environment variables, launch Claude Code.
# Start Claude Code
claude
Once inside the Claude Code interface, verify that the routing is working properly by running the status command:
/status
Ram N
Here's a nice
custom functionto add to your .bashrc to turn it on or off.