Skip to main content
Point an agent at NVIDIA NIM with one llm string and one API key.

Quick Start

1

Simple Usage

2

With Per-Agent Credentials

Per-agent apiKey and baseURL take effect on nvidia-nim as of PraisonAI PR #5831. Before that, they were silently ignored for aliased providers such as nvidia.

Model Names

NIM model ids always carry their publisher; short aliases map to the catalog slug, and a bare name under the nvidia prefix gets nvidia/ reattached. nvidia/, nim/ and nvidia-nim/ all select the same provider.

Environment Variables

  • Key order: explicit apiKey → NVIDIA_NIM_API_KEY → NVIDIA_API_KEY. OPENAI_API_KEY is never used.
  • Base-URL order: explicit baseURL → NVIDIA_NIM_API_BASE → https://integrate.api.nvidia.com/v1.
If no key is set and the base URL is the hosted endpoint, calls throw AUTHENTICATION. Get a key at build.nvidia.com, or pass a baseURL for a local NIM.
The provider uses the optional peer dependency @ai-sdk/openai-compatible. Install it if your package manager does not pull it in: npm install @ai-sdk/openai-compatible.

Reasoning Mode (Nemotron 3)

Nemotron 3 on NIM switches thinking through chat_template_kwargs, and the SDK translates reasoningEffort for you.
This mapping only applies to Nemotron 3 (and nemotron-nano-3) via the NIM route. Nemotron served by other providers, and non-Nemotron models on NIM, use the standard reasoning_effort path.

Local NIM Container

Point baseURL at your own NIM container; no key is needed.
Any baseURL outside integrate.api.nvidia.com is treated as a local or self-hosted NIM, and the SDK sends a placeholder key if none is set. Set NVIDIA_NIM_API_BASE to the same URL to make it the default.

Tools and Streaming

reasoningEffort: 'off' keeps thinking tokens out of the output.

NVIDIA NIM CLI Usage

Check your NIM setup from the terminal

Providers

All supported providers

Model Routing

How llm strings resolve to providers