# NVIDIA API Catalog API keys: find, store, rotate, and use them safely with AI agents

Source: https://botpassword.com/keys/nvidia
Last checked: 2026-11-08

NVIDIA API Catalog keys for the NIM endpoints at `build.nvidia.com` typically start with `nvapi-` and come from a model page's **Get API Key** button or from **Settings** → **API keys** in the profile menu. They call the hosted endpoints at `https://integrate.api.nvidia.com` and are usually exported as `NVIDIA_API_KEY`. Pulling NIM containers from `nvcr.io` or Helm charts needs an NGC personal key instead, created at `org.ngc.nvidia.com/setup/api-keys`; NVIDIA warns the two strings are not interchangeable.

## Key types

| Type | Prefix | Secret | Scope | Expiry |
|---|---|---|---|---|
| NVIDIA API key (build.nvidia.com) | `nvapi-` | Yes | NVIDIA-hosted API Catalog endpoints for your NVIDIA account | — |
| NGC personal key | — | Yes | The services chosen at creation, such as **NGC Catalog** and **Public API Endpoints**, in your NGC organization | A preset period, a custom date or never, chosen at creation |
| NGC service key | — | Yes | Organization-level access for automation | — |

## How to create a NVIDIA API Catalog key

1. Open a model on `build.nvidia.com` and click **Get API Key** in the right-hand pane, or go to the profile menu → **Settings** → **API keys**.
2. Enter your email and sign in, or finish creating an NVIDIA account, which joins the Developer Program.
3. Click **Copy Key** in the pop-up and store the key in `NVIDIA_API_KEY`.
4. For containers and Helm charts, go to `org.ngc.nvidia.com/setup/api-keys`, click **Generate Personal Key**, name it, set an expiration and select **NGC Catalog** and **Public API Endpoints**.

## Limiting what the key can do

An NGC personal key is limited by the services chosen at creation, so select only **Public API Endpoints** for API Catalog calls and add **NGC Catalog** only where images or charts must be pulled. The **Public API Endpoints** option appears only if your org role includes the Public API Endpoints User role. Org owners and user admins can revoke any member's key, and removing a user from the NGC org revokes their keys. NVIDIA's RAG blueprint looks for a service-specific key first, then `NVIDIA_API_KEY`, then `NGC_API_KEY`, so a stale value in one variable can shadow a fresh one in another.

## How to rotate a NVIDIA API Catalog key

1. In NGC, open the API keys page and use the vertical ellipsis menu on a personal key to rotate it.
2. Update `NGC_API_KEY`, `ngc config set` and any `docker login nvcr.io` credentials with the new value.
3. For a `build.nvidia.com` key, generate a new key, replace `NVIDIA_API_KEY`, and stop using the old one.

## How to revoke a NVIDIA API Catalog key

1. In NGC, open the API keys page and use the vertical ellipsis menu to delete the personal key.
2. Org owners and organization-level user admins can revoke any member's key on demand.

## If the key leaked

1. Delete or rotate the exposed NGC personal key from the API keys page.
2. Replace an exposed `build.nvidia.com` key with a new one from **Settings** → **API keys**.
3. Update `NVIDIA_API_KEY`, `NGC_API_KEY`, the NGC CLI config and Docker credentials on every machine.
4. Ask an org owner to review keys in the organization and revoke any that are no longer needed.

## Environment variables

- `NVIDIA_API_KEY`
- `NGC_API_KEY`

## Gotchas

- The `build.nvidia.com` key and the NGC personal key are different strings; NVIDIA warns not to substitute one for the other.
- The `docker login nvcr.io` username must be exactly `'$oauthtoken'`, as NVIDIA shows it, with the key as the password.
- NGC service keys cannot yet list artifacts in the NGC CLI or Docker CLI.

## Using this key with AI agents (BotPassword)

- `run_with`: Runs a command with the key injected as an environment variable or a 0600 temporary file, never on the command line, and redacts the key from the output.
- `http_request`: Makes an authenticated API call after checking the destination against the hosts this key may be sent to. The response comes back with credential-shaped values redacted, and one that holds the key itself is refused.

## FAQ

### How do I get an NVIDIA API key for build.nvidia.com?

Open any model on `build.nvidia.com`, click **Get API Key**, sign in, and click **Copy Key**. Keys can also be created from the profile menu under **Settings** → **API keys**.

### What is the difference between NVIDIA_API_KEY and NGC_API_KEY?

`NVIDIA_API_KEY` usually holds the `nvapi-` key for hosted API Catalog endpoints. `NGC_API_KEY` holds an NGC personal key for pulling NIM containers from `nvcr.io` and Helm charts.

### How do I log in to nvcr.io to pull NIM containers?

Run `docker login nvcr.io --username '$oauthtoken'` and paste your NGC personal key at the password prompt.

### Do NGC API keys expire?

You choose at creation: a preset period, a custom date, or never. NGC keys are also revoked when the user leaves the NGC org.

### Can a coding agent call NVIDIA NIM endpoints?

Yes. The hosted endpoints at `https://integrate.api.nvidia.com` take the `nvapi-` key, for example on `POST /v1/chat/completions`. Give the agent that key rather than an NGC personal key that can also pull containers.

### Can an AI agent use my NVIDIA API Catalog key without seeing it?

Yes, if the key never enters the agent's context. Instead of pasting the key into a chat or leaving it in a `.env` file the agent can read, keep it in a credential broker that injects it into the command or request on the agent's behalf. BotPassword does this with `run_with`, `http_request`, so the agent gets the result and never the value.

## Sources

- https://docs.api.nvidia.com/nim/docs/api-quickstart
- https://docs.api.nvidia.com/nim/reference/llm-apis
- https://docs.nvidia.com/nemo/retriever/26.5.0/extraction/api-keys/
- https://docs.nvidia.com/rag/latest/api-key.html
- https://docs.nvidia.com/ngc/latest/ngc-user-guide.html
