Open-source gateway

Use Claude Code with
NVIDIA NIM

Connect Claude Code to NVIDIA-hosted models using your own API key. No Anthropic account needed.

Get Started Learn More
Overview

What is Claude-NIM?

Claude-NIM is a lightweight API gateway that bridges Claude Code with NVIDIA-hosted models. It translates requests and responses between the two formats so everything works transparently.

Drop-in Replacement

Point Claude Code at your instance and everything works — streaming, tool use, file uploads, all handled automatically.

Your Key, Your Account

Use your own NVIDIA NIM key. Requests and data flow through your account with your own quotas and limits.

Real-time Streaming

Responses stream back as you type — no waiting for complete replies. Supports thinking blocks and extended reasoning.

File Handling

Upload images and documents. They're processed and passed to the model automatically.

Secure by Default

Keys are never stored or logged. Each request is authenticated and isolated per user.

No Cold Starts

Built-in keepalive pings keep your instance warm on serverless platforms.

Model Flexibility

Switch between any NIM-supported model by changing a single config value.

Getting Started

Set up in minutes

Deploy Claude-NIM, configure Claude Code, and start coding — it's that simple.

  1. 1

    Deploy the service

    Run the Docker container or deploy to your preferred platform. The service listens on port 8000 out of the box.

  2. 2

    Get a NIM API key

    Create an API key from the NVIDIA Build dashboard. Your key starts with nvapi-.

  3. 3

    Configure Claude Code

    Point Claude Code to your deployment URL and set your NIM key as the auth token. Choose the NIM models you want to use.

Config Claude Code settings
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://your-instance.example.com",
    "ANTHROPIC_AUTH_TOKEN": "nvapi-...",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "meta/llama-3.1-70b-instruct"
  }
}

Model names are passed through as-is to NIM. Use the ANTHROPIC_DEFAULT_*_MODEL env vars to map Claude Code's model tiers to NIM model IDs of your choice.

Usage

Start building

Once configured, Claude Code works exactly as you'd expect. All features route through your instance transparently.

Coding Sessions

Open Claude Code and start a session. It connects to your instance automatically — chat, edits, and tool calls all work seamlessly.

File Uploads

Upload images and documents through the Files API. They're processed and sent to the model as appropriate inputs.

Browse Models

Use the models endpoint to see which NIM models are available to your key, with context windows and pricing details.

Quick Test Verify your setup works
curl -X POST https://your-instance.example.com/v1/messages \
  -H "anthropic-version: 2023-06-01" \
  -H "x-api-key: nvapi-..." \
  -H "content-type: application/json" \
  -d '{
    "model": "meta/llama-3.1-70b-instruct",
    "max_tokens": 256,
    "messages": [{"role": "user", "content": "Hello!"}]
  }'