NVIDIA Models for Claude Code
Setup and installation guide for the local NVIDIA proxy and launcher
This package runs Claude Code against NVIDIA's hosted API instead of Anthropic's. A small local proxy translates between the two APIs, and a launcher starts Claude Code pointed at that proxy with a model picker populated from NVIDIA's catalog (GLM and DeepSeek by default). Nothing is installed system-wide: the proxy runs only for the lifetime of the Claude Code session.
Version 1.0.0 · Windows
1. How it works
There are three moving parts, all contained in this folder:
- Launcher (
launch.mjs) — starts the proxy, writes a session-only model picker, sets the environment variables Claude Code reads, then startsclaude.exe. - Proxy (
proxy.mjs) — listens on127.0.0.1on a random port. It accepts Anthropic Messages API requests from Claude Code and forwards them to NVIDIA's/v1/chat/completionsendpoint in OpenAI format, converting the responses (including streaming text, thinking, and tool calls) back again. - Credentials (
credentials.mjs+set-key.ps1) — reads the NVIDIA API key from an environment variable or a DPAPI-encrypted file in this folder.
Sessions use an isolated Claude config directory at %USERPROFILE%\.claude-nvidia, so model choices and
session state never touch your normal ~/.claude setup. Shared rules, skills, agents, and commands are
copied in at each launch.
2. Requirements
| Requirement | Details |
|---|---|
| Windows | Windows 10 or 11. Key storage uses Windows DPAPI and PowerShell. |
| Node.js | Version 20 or newer (tested on 24). Check with node --version. |
| Claude Code | The native Windows build, normally at %USERPROFILE%\.local\bin\claude.exe.
If yours is elsewhere, set the CLAUDE_BIN environment variable to the full path of claude.exe. |
| NVIDIA API key | A key beginning nvapi- from
build.nvidia.com. The key needs access to each model listed in
models.json. |
Run claude at least once before using this launcher, so its global configuration exists and is fully
initialized. The launcher reads it to seed the isolated session.
3. Installation
-
Extract the package to a permanent folder, for example
C:\Tools\nvidia-claude-proxy. Keep all files together; the launcher resolves everything relative to its own folder.If Windows blocked the downloaded zip, right-click it → Properties → check Unblock before extracting, or run
Unblock-Fileon the extracted.ps1. -
Save your NVIDIA API key. Open PowerShell in the extracted folder and run:
powershell -ExecutionPolicy Bypass -File .\set-key.ps1Paste the key when prompted. It is encrypted with DPAPI and written to
credential.dpapiin this folder; only your Windows user account can decrypt it. No plaintext key is stored.To use an environment variable instead, set
NVIDIA_API_KEYin the terminal before launching. The environment variable takes precedence over the file:$env:NVIDIA_API_KEY = "nvapi-your-key-here" -
Run the launcher. From the extracted folder:
.\claude-nvidia.cmdOr directly:
node launch.mjsAny arguments are passed through to Claude Code, for example:
.\claude-nvidia.cmd -p "summarize this repository"You can also double-click
claude-nvidia.cmdin File Explorer.
Optional: to launch from any folder, add the extracted folder to your user PATH:
Settings → System → About → Advanced system settings → Environment Variables,
edit Path under User variables, and add the folder. Then claude-nvidia works everywhere.
4. Verify the install
Run the test suite from the extracted folder. It checks the request/response translation and a simulated streaming session:
node --test proxy.test.mjs
You should see pass 5 and fail 0. Tests use a fake upstream server and do not consume API credits.
For a live check, launch claude-nvidia.cmd and ask a short question. If you get a reply, the key,
proxy, and model routing are all working. Every launch writes a proxy.log in this folder with request
metadata, which is the first place to look if something fails.
5. Everyday use
- Start sessions with
claude-nvidia.cmd(ornode launch.mjs). Your normalclaudecommand is untouched and still uses Anthropic. - Use
/modelinside the session to switch between the four NVIDIA-backed slots. - The model picker is written to
claude-settings.jsonat every launch and applies only to this launcher, so other Claude Code sessions keep their own model list. - To reset this launcher's saved preferences, close the session and delete
%USERPROFILE%\.claude-nvidia. It is recreated on the next launch. - To update, replace the program files and keep
credential.dpapi; the key does not need to be entered again.
6. Choosing models
models.json maps the four Claude Code model slots to entries in a catalog. The slot names are fixed
(fable, opus, sonnet, haiku); the catalog is yours to edit.
{
"slots": {
"fable": "glm",
"opus": "glm-flash",
"sonnet": "deepseek-flash",
"haiku": "deepseek-flash"
},
"catalog": {
"glm": { "id": "z-ai/glm-5.3", "label": "GLM 5.3" },
"glm-flash": { "id": "z-ai/glm-5.3-flash", "label": "GLM 5.3 Flash" },
"deepseek-flash": { "id": "deepseek-ai/deepseek-v4.1-flash", "label": "DeepSeek V4.1 Flash" }
}
}
| Slot | Used for |
|---|---|
fable | Main session model and default picker selection. |
opus | Selectable main model; useful as a stronger alternative. |
sonnet | Selectable main model and the default subagent model. |
haiku | Background and small tasks, plus behavesAs haiku in the picker. |
To use a different model, add a catalog entry and point a slot at it. Restart the launcher; picker labels and
environment variables are regenerated from models.json each time. Model IDs must be the exact names
accepted by NVIDIA's API. If a model is not enabled for your key, requests return 404 or 403 (see below).
The launcher appends [1m] to model IDs internally. This is a Claude Code hint that the context
window is 1M tokens; the proxy strips it before calling NVIDIA. All catalog models are expected to be 1M-context
models. If you add a smaller model, the hint remains a hint only and does not change the model's real limit.
7. Troubleshooting
| Symptom | Cause and fix |
|---|---|
No NVIDIA API key |
Run powershell -ExecutionPolicy Bypass -File .\set-key.ps1, or set NVIDIA_API_KEY
in the same terminal before launching. |
Cannot run set-key.ps1 |
Execution policy blocked the unsigned script. Use the -ExecutionPolicy Bypass form shown above,
and run Unblock-File .\set-key.ps1 if the file came from another machine. |
Could not find claude.exe |
Install Claude Code's native Windows build, or set CLAUDE_BIN to the full path of
claude.exe and relaunch. |
| 401 or 403 from NVIDIA | The key is invalid, expired, or lacks access to that model. Re-run set-key.ps1 and confirm
model access on build.nvidia.com. The upstream message is logged in proxy.log. |
| 404 model not found | The model ID in models.json is misspelled or not served by NVIDIA. Check the exact ID.
Fix the catalog (not the slot) and relaunch. |
| Responses cut off or time out | The launcher already disables the non-streaming fallback and raises timeouts to 60 minutes, because NVIDIA's
gateway cuts long non-streaming requests at 5 minutes. Confirm the launcher started the session (a
REQ /v1/messages line in proxy.log). |
| Model picker shows Anthropic models | Launch via claude-nvidia.cmd, not the plain claude command. The picker is injected
only into sessions started by this launcher. |
| Node not recognized | Install Node.js 20+ from nodejs.org, then open a new terminal so the updated PATH is picked up. |
8. Files in this package
| File | Purpose |
|---|---|
guide.html | This guide. Open it in any browser. |
claude-nvidia.cmd | Convenience launcher; runs launch.mjs and passes arguments through. |
launch.mjs | Starts the proxy, prepares the isolated config, and launches Claude Code. |
proxy.mjs | Anthropic-to-OpenAI translation proxy, including streaming and tool calls. |
credentials.mjs | Reads the API key from NVIDIA_API_KEY or credential.dpapi. |
set-key.ps1 | Prompts for the key and saves it DPAPI-encrypted. |
models.json | Slot-to-model mapping. Edit this to change models. |
proxy.test.mjs | Five offline tests; run with node --test proxy.test.mjs. |
package.json | Declares the ESM module type and the test script. |
claude-settings.json | Generated at launch: the model picker for this launcher. Do not edit by hand. |
proxy.log | Generated at runtime: request metadata and upstream errors. Safe to delete. |
credential.dpapi | Generated by set-key.ps1: your encrypted key. Do not share or commit it. |
9. Security and data
- The API key is encrypted with Windows DPAPI under your user account; the file is useless when copied to
another account or machine. The
NVIDIA_API_KEYenvironment variable, if used, is plaintext in that process environment and is the less private option. - The key is sent only to
integrate.api.nvidia.com; the proxy binds to127.0.0.1and is not reachable from the network. proxy.logrecords request metadata (model, stream flag, message and tool counts, byte sizes, upstream status and error text). It does not record prompt or response content.- The isolated config at
%USERPROFILE%\.claude-nvidiais separate from~/.claude, so this launcher cannot modify your regular Claude Code settings. It does copy your shared rules, skills, agents, commands, andCLAUDE.mdinto the isolated directory at launch. - Your prompts and code are sent to NVIDIA under your account and are subject to NVIDIA's API terms, not Anthropic's. Treat model availability and data handling according to your NVIDIA agreement.