Skip to content

Instantly share code, notes, and snippets.

@Ram-N
Last active June 13, 2026 09:33
Show Gist options
  • Select an option

  • Save Ram-N/57f759fa90abd3ac23acbb1bca25f9e5 to your computer and use it in GitHub Desktop.

Select an option

Save Ram-N/57f759fa90abd3ac23acbb1bca25f9e5 to your computer and use it in GitHub Desktop.
Running Claude Code via NVIDIA NIM Proxy

This guide walks you through routing Claude Code to NVIDIA NIM using a local proxy server.

Prerequisites

Before starting, ensure you have uv installed on your system to manage Python tools.


Step 1: Get an NVIDIA NIM API Key

  1. Visit the NVIDIA API Keys settings page.
  2. Generate a new API key and save it securely. You will need this to authenticate with the NIM models.

Step 2: Install and Start the Proxy Server

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.

Step 3: Configure Environment Variables

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

Step 4: Launch and Verify Claude Code

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


Reference Links

@Ram-N

Ram-N commented May 27, 2026

Copy link
Copy Markdown
Author

Here's a nice custom function to add to your .bashrc to turn it on or off.

# Function to point Anthropic traffic to your local proxy
anthropic_proxy_on() {
    export ANTHROPIC_AUTH_TOKEN="freecc"
    export ANTHROPIC_BASE_URL="http://localhost:8082"
    echo "πŸ€– Anthropic proxy enabled (Localhost:8082)"
}

# Function to clear it and go back to normal
anthropic_proxy_off() {
    unset ANTHROPIC_AUTH_TOKEN
    unset ANTHROPIC_BASE_URL
    echo "🌐 Anthropic proxy disabled (Default routing)"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment