Overview
NVIDIA NIM (NVIDIA Inference Microservices) packages optimised LLMs as containers exposing an OpenAI-compatible API. NIMs run on-premises on NVIDIA GPU infrastructure or on NGC-hosted endpoints. Because NIM speaks the OpenAI API protocol, Cognisafe intercepts all traffic transparently — no NIM configuration changes required.Self-hosted NIM
Prerequisites
- NVIDIA GPU with CUDA 12.x
- Docker with NVIDIA Container Toolkit
- NGC API key from ngc.nvidia.com
Run a NIM container
http://localhost:8000/v1.
Proxy configuration
SDK setup
NGC-hosted NIM endpoints
NVIDIA hosts NIM endpoints athttps://integrate.api.nvidia.com/v1. These are useful for testing before deploying your own GPU infrastructure.
The Cognisafe proxy strips and rewrites the
base_url — your client always points at the proxy, and the proxy forwards to UPSTREAM_URL. This means your application code never contains the NIM endpoint URL directly.Kubernetes with NVIDIA GPU Operator
UPSTREAM_URL=http://nim-llama.cognisafe-system.svc.cluster.local:8000 on the Cognisafe proxy.

