API Access Setup

To interact with the NVIDIA Run:ai platform programmatically, configure API access using access keys. This section outlines the steps to create a service, generate tokens using the appropriate OAuth2 grant types, and authenticate securely with the platform APIs.

Authenticate with Admin Credentials

Before registering a service account, authenticate using administrator credentials. You can use the default credentials ([email protected] / Abcd!234) or custom credentials configured via global.adminUser.username and global.adminUser.password as detailed in the customized installation section.

Send a POST request to the /api/v1/token endpoint with grantType: password to generate a token. See the Tokens API endpoint for more details.

Example request:

curl -L 'https://console.<DOMAIN>/api/v1/token' \ 
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <TOKEN>' \ 
{
  "grantType": "password",
  "username": "[email protected]",
  "password": "yourPassword"
}

Example response:

{
  "accessToken": "<TOKEN>"
}

Use the returned accessToken as a Bearer token in the Authorization header for subsequent API requests.

Create a Service Account

After generating a token using the admin password, use it to register a service account. Service accounts contain a clientID and clientSecret that are used to authenticate future API requests via the client_credentials grant type.

Send a POST request to the /api/v1/apps endpoint. See the Service accounts API endpoint for more details.

Example request:

Example response:

Generate a Token with Client Credentials

Use the clientId and clientSecret from your application to generate an access token for authenticated API calls using the client_credentials grant type.

Send a POST request to the /api/v1/token endpoint with grantType: client_credentials. See the Tokens API endpoint for more details.

Example request:

Example response:

Use the accessToken as a Bearer token in the Authorization header for all subsequent API requests

Create a Local User

Send a POST request to the /api/v1/users endpoint to create a local user. See the Users API endpoint for more details.

Example request:

Example response:

Last updated