Skip to main content

Run Claude Code (and any Anthropic SDK client) on NVIDIA NIM models via a local proxy.

Project description

nvd-claude-proxy

PyPI Python License: MIT Code Style: Ruff

Run Claude Code — and any Anthropic SDK client — on enterprise-grade NVIDIA NIM models.

nvd-claude-proxy is a production-hardened local HTTP proxy that translates between the Anthropic Messages API and the NVIDIA NIM (OpenAI-compatible) API. It enables you to run Claude Code, the Anthropic SDK, and other clients using high-performance NVIDIA-hosted models with official-grade resilience and scaling.


🚀 Key Features

  • Architectural Excellence: Fully decoupled core translation logic from the transport layer.
  • Enterprise Resilience: Built-in Circuit Breakers and automated failover chains to protect against upstream outages.
  • Scalable State: Distributed session management via Redis (with SQLite and In-Memory fallbacks).
  • Official-Grade Security: Unified AuthMiddleware protecting all endpoints with global API key enforcement.
  • Claude Code Optimized: Specifically tuned for Claude Code's complex tool-calling and reasoning patterns.
  • Modular Pipeline: Event-driven streaming architecture for deterministic state management.

🛠 Deployment & Configuration

Environment Variables

Variable Default Description
NVIDIA_API_KEY (Required) Your NVIDIA NIM API key.
PROXY_API_KEY None Optional key to protect the proxy itself.
STORAGE_ENGINE sqlite Persistence backend: redis, sqlite, or memory.
REDIS_URL None Required if STORAGE_ENGINE=redis (e.g., redis://localhost:6379).
PROXY_PORT 8788 Local port for the proxy.
RATE_LIMIT_RPM 0 Global rate limit (requests per minute). 0 to disable.

Quick Start

# Install the proxy
pip install nvd-claude-proxy[full]

# Export your API key
export NVIDIA_API_KEY=nvapi-...

# Run the proxy
ncp run

Then point your Claude Code at the proxy:

export ANTHROPIC_BASE_URL=http://localhost:8788
claude

🏗 Architecture

The proxy uses a Chain of Responsibility pattern for streaming events: MetadataProcessor -> TextProcessor -> ToolProcessor -> SafetyProcessor -> FinalizerProcessor

This ensures that even complex interleaved reasoning and parallel tool calls are correctly reconstructed for the Anthropic SDK.


Official-Grade Infrastructure for the AI Era.

Project details


Release history Release notifications | RSS feed

This version

1.1.3

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nvd_claude_proxy-1.1.3.tar.gz (103.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nvd_claude_proxy-1.1.3-py3-none-any.whl (127.5 kB view details)

Uploaded Python 3

File details

Details for the file nvd_claude_proxy-1.1.3.tar.gz.

File metadata

  • Download URL: nvd_claude_proxy-1.1.3.tar.gz
  • Upload date:
  • Size: 103.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for nvd_claude_proxy-1.1.3.tar.gz
Algorithm Hash digest
SHA256 6b80c8113e9be4463bc2b6bfc4caa357f8bdace80e7c3abd01ceb3b229efb3f6
MD5 d2ecbf115d5333e8045ed80eda9d2836
BLAKE2b-256 f2f1dfe10bb4a33a6183282db499605a4e09c42d8342bf61e6e92c8fd1e1cfee

See more details on using hashes here.

File details

Details for the file nvd_claude_proxy-1.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for nvd_claude_proxy-1.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 65e2d67053a08c8d19d4377ff1ba22e61eee34b623f1796343fa1c567af518b5
MD5 67d4c297a4245c9a45d1eae6cd13c3a7
BLAKE2b-256 a579dc9067c7d0eaebf077f5dd8e7071b20133de444fe1f7e720fb95eee60ffc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page