Generate Image with NVIDIA NIM > Using the Generate Image with NVIDIA NIM recipe > Step 2. Configure and publish the NVIDIA NIM connection
  

Step 2. Configure and publish the NVIDIA NIM connection

Configure the API key to authenticate NVIDIA NIM API requests, and then publish the NVIDIANIMGenerateImageConnection connection.
  1. 1Open the NVIDIANIMGenerateImageConnection connection.
  2. 2From the Type list, select NVIDIA NIM.
  3. 3From the Runtime Environment list, select Cloud Server or any Secure Agent.
  4. 4From the Authentication Type list, select OAuth2 and enter values for the following properties:
  5. Property
    Description
    Grant Type
    Required. Select the required grant type based on your use case.
    Authorization URL
    Required. Enter the OAuth authorization URL for the OAuth provider to authorize the user request.
    Token Request URL
    Required. Enter the OAuth token request URL that handles token requests.
    The expiration of the refresh token depends on the OAuth provider. You must re-authenticate and publish the connection before the token expires.
    Note: The refresh token doesn't apply to agents and agent groups.
    Client ID
    Required. Specify the identifier value from the OAuth provider.
    Client Secret
    Required. Enter the client secret to connect to the OAuth provider.
    Scope
    Required. Specify the scope. The scope in OAuth authentication limits an application's access to a user's account. You can select multiple scopes for a single client. To enter multiple scopes, separate each value with a space.
    Session Duration
    Optional. Enter the number of minutes to wait before refreshing the session. This is used if you cannot obtain the token expiration from the OAuth provider. Default is 60 minutes.
    Other Parameters
    Optional. Enter parameters to customize the authorization request, separated with semicolons. You can provide extra information or specify requirements of the OAuth provider.
    Authorization Status
    Optional. Indicates the current status, the name of the user who authorized, and the last time when the authorization was completed.
    Authorize Access
    Click to initiate the authorization workflow using OAuth.
  6. 5In the Connection Properties section, enter the API key in the Api_Key property. The Api_Key property authenticates NVIDIA NIM API requests.
  7. 6Save and publish the connection.