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 thenvidia 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_KEYis never used. - Base-URL order: explicit
baseURL→NVIDIA_NIM_API_BASE→https://integrate.api.nvidia.com/v1.
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 throughchat_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
PointbaseURL at your own NIM container; no key is needed.
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
- Tools
- Streaming
Related
NVIDIA NIM CLI Usage
Check your NIM setup from the terminal
Providers
All supported providers
Model Routing
How
llm strings resolve to providers
