Service Keys
NGC Service Keys allow programmatic access to NVIDIA Cloud Functions with fine-grained scope control. Unlike Personal API Keys, which are tied to an individual user, Service Keys are tied to a Nvidia Cloud Account. This means permissions are not dependent on any individual user’s account status. Service Keys let you grant only the specific permissions a workload requires — for example, an inference service may only need the Invoke Function scope while a deployment pipeline may need Deploy Function and List Functions.
Service Keys can be created and managed at org.ngc.nvidia.com/service-keys. For general information on NGC API keys, see the NGC User Guide.
Available Scopes
Each Service Key is configured with one or more scopes that determine which Cloud Functions operations are permitted.
Resource Types
Each Service Key is configured with a resource type that controls which entities the key can access. You select the resource type in the UI when creating the key.
The following scopes only work with the All Entity resource type. Selecting any other resource type will result in a 403 error:
- Manage Registry Credentials
- Manage Telemetries
- Read GPU Quota Rule
- GPU Capacity
Scope Requirements
The table below shows which scopes are required for each Cloud Functions CLI action, and which entity types the key resource must be set to.
A Service Key must be configured with both the required scope and a compatible resource type. If an action supports multiple resource types (e.g. All Functions or Function), you can use either to grant broad or narrowed access respectively.
Troubleshooting
Common 403 Errors
A 403 Forbidden response when using a Service Key typically means either a required scope is
missing or the resource type is not compatible with the API being called. The following scenarios
cover the most common causes.
Scope is missing for the action
Each API operation requires a specific scope. If your key was not configured with that scope, the request will be rejected with a 403. Verify the scope your key has against the Scope Requirements Matrix and regenerate the key with the correct scope if needed.
Example: Calling the deploy API with a key that only has the Register Function scope will fail. The key must also include Deploy Function.
Resource type is incompatible with the scope
Each scope only authorizes requests for compatible resource types. Even if the scope is correct, using the wrong resource type will cause a 403.
Example: A key with Manage Registry Credentials and resource type All Functions will be rejected — this scope requires the All Entity resource type. See the important note in the Resource Types section for the full list of scopes that require All Entity.
Key is scoped to a specific Function but the request targets a different function
When a key is configured with the Function resource type and a specific function ID, it can only be used for that function. Requests targeting any other function ID will return a 403.
Example: A deploy key scoped to function
abc-123cannot be used to deploy functionxyz-789. Use the All Functions resource type for keys that need to operate across multiple functions.
Deploying a function requires both Deploy Function and List Functions scopes
The deploy API requires the Deploy Function scope to create or update a deployment, but it also calls the function listing API internally to validate the function. A key that has only Deploy Function without List Functions will return a 403.
Ensure keys used for deployment include both Deploy Function and List Functions scopes.
Authorize Clients used with a non-All Functions resource type
The Authorize Clients scope only supports the All Functions resource type. Using it with Function, Function Versions, or All Entity will result in a 403.
Recently updated key still returning 403
After modifying a Service Key’s scopes or resource type, it can take up to 15 minutes for the changes to propagate. Requests made before propagation completes will continue to be evaluated against the previous authorization policy and may return a 403.
If you have recently updated a key and are seeing unexpected 403 errors, wait 15 minutes and retry before further debugging.