npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

nvidia-claude-proxy

v1.0.1

Published

Proxy that exposes Anthropic/Claude-style POST /v1/messages, converts to OpenAI Chat Completions, and forwards to NVIDIA API

Readme

nvidia-claude-proxy

Proxy that exposes Anthropic/Claude-style POST /v1/messages, converts to OpenAI Chat Completions format, and forwards to NVIDIA API.

Visit build.nvidia.com/explore/discover, register an account, and generate an API key. NVIDIA provides hidden models such as moonshotai/kimi-k2.5, z-ai/glm4.7, and minimaxai/minimax-m2.1.

Install

npm install -g nvidia-claude-proxy@latest
# or
npx nvidia-claude-proxy

Initialization

Run the init command to set up your NVIDIA API Key and port interactively. The configuration will be saved to your user home directory (e.g., ~/.nvidia-claude-proxy/config.json).

nvidia-claude-proxy init
# or
npx nvidia-claude-proxy init

Config

The configuration is stored in ~/.nvidia-claude-proxy/config.json (or %USERPROFILE%\.nvidia-claude-proxy\config.json on Windows).

To update your configuration, you can edit this file directly:

{
  "nvidia_url": "https://integrate.api.nvidia.com/v1/chat/completions",
  "nvidia_key": "your-nvidia-api-key",
  "port": 3001,
  "host": "0.0.0.0"
}

Alternatively, you can re-run the init command to overwrite the existing configuration.

| Option | Description | |--------|-------------| | nvidia_url | Upstream API URL (default: https://integrate.api.nvidia.com/v1/chat/completions) | | nvidia_key | Required. Used for upstream authentication. Usually keys starting nvapi- ... | | port | Listen port (default: 3001) | | host | Listen host (default: 0.0.0.0) |

Environment Variables

| Variable | Default | Description | |----------|---------|-------------| | CONFIG_PATH | ~/.nvidia-claude-proxy/config.json | Path to config file | | PROVIDER_API_KEY | from config | Overrides nvidia_key | | UPSTREAM_URL | from config | Overrides nvidia_url | | ADDR | from config / port+host | Full listen address (e.g. :3001, 0.0.0.0:8080); overrides PORT and HOST when set | | PORT | from config | Listen port (used when ADDR is not set) | | HOST | from config | Listen host (used when ADDR is not set) | | UPSTREAM_TIMEOUT_SECONDS | 300 | Upstream request timeout | | LOG_BODY_MAX_CHARS | 0 | Max chars to log in request/response bodies (0 disables) | | LOG_STREAM_TEXT_PREVIEW_CHARS | 0 | Max chars for stream preview in logs (0 disables) | | VERBOSE | false | Set to 1 or true to enable detailed logs |

Run

nvidia-claude-proxy
# or
npx nvidia-claude-proxy

Build & Test

npm run build   # verify modules load (uses config.json.example)
npm test        # run tests (Node built-in test runner)

Usage with Claude CLI

Using moonshotai/kimi-k2.5:

export ANTHROPIC_BASE_URL=http://localhost:3001
export ANTHROPIC_AUTH_TOKEN=any
export ANTHROPIC_DEFAULT_HAIKU_MODEL=moonshotai/kimi-k2.5
export ANTHROPIC_DEFAULT_SONNET_MODEL=moonshotai/kimi-k2.5
export ANTHROPIC_DEFAULT_OPUS_MODEL=moonshotai/kimi-k2.5
claude

Using z-ai/glm4.7:

export ANTHROPIC_BASE_URL=http://localhost:3001
export ANTHROPIC_AUTH_TOKEN=any
export ANTHROPIC_DEFAULT_HAIKU_MODEL=z-ai/glm4.7
export ANTHROPIC_DEFAULT_SONNET_MODEL=z-ai/glm4.7
export ANTHROPIC_DEFAULT_OPUS_MODEL=z-ai/glm4.7
claude

Using minimaxai/minimax-m2.1:

export ANTHROPIC_BASE_URL=http://localhost:3001
export ANTHROPIC_AUTH_TOKEN=any
export ANTHROPIC_DEFAULT_HAIKU_MODEL=minimaxai/minimax-m2.1
export ANTHROPIC_DEFAULT_SONNET_MODEL=minimaxai/minimax-m2.1
export ANTHROPIC_DEFAULT_OPUS_MODEL=minimaxai/minimax-m2.1
claude

API

POST /v1/messages

  • Upstream auth: Always sends Authorization: Bearer <nvidia_key> to NVIDIA.

Example (non-stream):

curl -sS http://127.0.0.1:3001/v1/messages \
  -H 'Content-Type: application/json' \
  -d '{
    "model":"z-ai/glm4.7",
    "max_tokens":256,
    "messages":[{"role":"user","content":"hello"}]
  }'

Example (stream):

curl -N http://127.0.0.1:3001/v1/messages \
  -H 'Content-Type: application/json' \
  -d '{
    "model":"z-ai/glm4.7",
    "max_tokens":256,
    "stream":true,
    "messages":[{"role":"user","content":"hello"}]
  }'

POST /v1/chat/completions (OpenAI-compatible)

Same upstream as /v1/messages, but accepts OpenAI request format and returns the response as-is (no conversion). Use this when your client (e.g. Cursor, OpenAI SDK) calls the OpenAI-style endpoint. Upstream auth behaves the same as /v1/messages.

GET /

Health check. Returns {"message":"nvidia-claude-proxy","health":"ok"}.

Notes / Limitations

  • Streaming conversion supports delta.content text and delta.tool_calls tool-use blocks.
  • Logs may show forwarded request bodies; keep LOG_BODY_MAX_CHARS small and avoid secrets in prompts.
  • Requires Node.js >= 18.