AI and model APIs

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

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.

NVIDIA API Catalog key types

TypePrefixSecret?ScopeExpiry
NVIDIA API key (build.nvidia.com)
The full secret may not be viewable again after the page is closed, so copy it when it is shown.
nvapi-YesNVIDIA-hosted API Catalog endpoints for your NVIDIA account—
NGC personal key
Up to 32 personal keys per user across organizations. Revoked automatically when the user is removed from the NGC org.
—YesThe services chosen at creation, such as **NGC Catalog** and **Public API Endpoints**, in your NGC organizationA preset period, a custom date or never, chosen at creation
NGC service key
At most 64 per organization, managed only by org owners and organization-level user admins.
—YesOrganization-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.

Open NVIDIA API Catalog's key settings

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.

NGC does not save personal keys, so a rotated key must be copied when shown. Choosing an expiration date at creation forces rotation instead of relying on a never-expiring key.

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 your NVIDIA API Catalog 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 and CLI

NVIDIA API Catalog's SDKs and docs read the key from NVIDIA_API_KEY or NGC_API_KEY.

NGC CLI (ngc): ngc config set prompts for the NGC key at the API_KEY prompt; docker login nvcr.io uses the username $oauthtoken and the key as the password

Things that catch people out

  • 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 your NVIDIA API Catalog key with AI agents

A coding agent that can read your .env file or your shell history can read the key, and anything in its context can end up in logs, transcripts or a prompt-injected request. The safer pattern is to keep the key in a credential broker that performs the authenticated step for the agent and hands back only the result.

BotPassword works this way. For a NVIDIA API Catalog key, these intents fit:

IntentWhat BotPassword does
run_withRuns 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_requestMakes 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.

Set it up in your agent: Aider · Amp · Claude Code · Claude Desktop · Cline · OpenAI Codex CLI · all agents

Frequently asked questions

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.

Stop pasting NVIDIA API Catalog keys into agents

BotPassword is in early access. Request an invite and we'll email you when your spot opens.