> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# NVIDIA NIM Provider

> Run Nemotron 3 and other NIM models from the TypeScript SDK with just NVIDIA_API_KEY

Point an agent at NVIDIA NIM with one `llm` string and one API key.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
graph LR
    U[User prompt] --> A[Agent]
    A -->|NVIDIA_API_KEY| N[NVIDIA NIM]
    N --> M[Nemotron 3 / Llama / ...]
    M --> R[Response]

    classDef in fill:#6366F1,stroke:#7C90A0,color:#fff
    classDef agent fill:#8B0000,stroke:#7C90A0,color:#fff
    classDef edge fill:#189AB4,stroke:#7C90A0,color:#fff
    classDef model fill:#F59E0B,stroke:#7C90A0,color:#fff
    classDef out fill:#10B981,stroke:#7C90A0,color:#fff

    class U in
    class A agent
    class N edge
    class M model
    class R out
```

## Quick Start

**1. Simple Usage**

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
export NVIDIA_API_KEY=nvapi-...
```

```typescript theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
import { Agent } from 'praisonai';

const agent = new Agent({
  instructions: 'Be brief.',
  llm: 'nvidia/nemotron-super',
});

await agent.chat('Hello in one sentence.');
```

**2. With Per-Agent Credentials**

```typescript theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
import { Agent } from 'praisonai';

const agent = new Agent({
  instructions: 'Be brief.',
  llm: 'nvidia/nemotron-super',
  apiKey: process.env.MY_NVIDIA_KEY,
  baseURL: 'https://integrate.api.nvidia.com/v1',
});
```

> [!NOTE]
>
> Per-agent `apiKey` and `baseURL` take effect on `nvidia-nim` as of [PraisonAI PR #5831](https://github.com/MervinPraison/PraisonAI/pull/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.

| You write | Sent on the wire |
| - | - |
| `nvidia/nemotron-super` | `nvidia/nemotron-3-super-120b-a12b` |
| `nvidia/nemotron-nano` | `nvidia/nemotron-nano-3-30b-a3b` |
| `nvidia/nemotron-ultra` | `nvidia/nemotron-3-ultra-550b-a55b` |
| `nvidia/nemotron-3-super-120b-a12b` | `nvidia/nemotron-3-super-120b-a12b` |
| `nvidia/meta/llama-3.3-70b-instruct` | `meta/llama-3.3-70b-instruct` |
| `nim/nemotron-super` | `nvidia/nemotron-3-super-120b-a12b` |
| `nvidia-nim/nvidia/nemotron-3-super-120b-a12b` | `nvidia/nemotron-3-super-120b-a12b` |

***

## Environment Variables

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Hosted (build.nvidia.com)
export NVIDIA_API_KEY=nvapi-...

# Optional overrides
export NVIDIA_NIM_API_KEY=nvapi-...                   # takes precedence over NVIDIA_API_KEY
export NVIDIA_NIM_API_BASE=http://localhost:8000/v1   # any OpenAI-compatible NIM endpoint
```

* **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`.

> [!WARNING]
>
> 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.

> [!NOTE]
>
> 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.

```typescript theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
import { Agent } from 'praisonai';

const agent = new Agent({
  instructions: 'Be brief.',
  llm: 'nvidia/nemotron-super',
  reasoningEffort: 'off', // or 'minimal' | 'low' | 'medium' | 'high'
});
```

| `reasoningEffort` | Sent to NIM |
| - | - |
| `"off"` | `chat_template_kwargs: { enable_thinking: false }` |
| `"minimal"` or `"low"` | `chat_template_kwargs: { enable_thinking: true, low_effort: true }` |
| `"medium"` or `"high"` | `chat_template_kwargs: { enable_thinking: true }` |
| unset | nothing — server default (thinking on) |

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.

```typescript theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
import { Agent } from 'praisonai';

const agent = new Agent({
  instructions: 'Be brief.',
  llm: 'nvidia/nemotron-super',
  baseURL: 'http://localhost:8000/v1',
});
```

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

> [tab] Tools
>
> ```typescript theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
> import { Agent } from 'praisonai';
>
> const getWeather = (city: string) => `Weather in ${city}: 20C, sunny`;
>
> const agent = new Agent({
>   instructions: 'Report the weather using the tool.',
>   llm: 'nvidia/nemotron-super',
>   reasoningEffort: 'off',
>   tools: [getWeather],
> });
>
> await agent.start('Weather in Paris?');
> ```

> [tab] Streaming
>
> ```typescript theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
> import { Agent } from 'praisonai';
>
> const agent = new Agent({
>   instructions: 'You tell stories.',
>   llm: 'nvidia/nemotron-super',
>   reasoningEffort: 'off',
> });
>
> for await (const token of agent.stream('Tell me a short story about a robot')) {
>   process.stdout.write(token);
> }
> ```

> [!TIP]
>
> `reasoningEffort: 'off'` keeps thinking tokens out of the output.

***

## Related

> [card] [NVIDIA NIM CLI Usage](https://praison.ai/docs/js/providers/nvidia-nim-cli.md)
>
> Check your NIM setup from the terminal

> [card] [Providers](https://praison.ai/docs/js/providers.md)
>
> All supported providers

> [card] [Model Routing](https://praison.ai/docs/js/model-routing.md)
>
> How `llm` strings resolve to providers


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.