OpenAI: Authenticate action

This topic describes how to generate an API Key to authenticate and get access to use the OpenAI models.

Prerequisites

  • You must have the Bot creator role to use the OpenAI Authenticate action in a bot.
  • Ensure that you have the necessary credentials (API Key) to send a request.

To use OpenAI models, you send a request containing the inputs and your API key, and then get authenticated to use the models. The Chat Completions API and Completions API of OpenAI are both supported using the OpenAI Chat AI action and OpenAI Prompt AI action. The difference between these APIs derives from the underlying GPT models. To use either of these APIs, you will need to create an OpenAI API key.

To create an OpenAI API key:

Procedure

  1. Create an account at: Create OpenAI Account.
  2. Log in to your OpenAI account.
  3. Access this link: API-Keys.
  4. Click Create new secret key.
  5. Copy the secret to your clipboard.
  6. In the Automation Anywhere Control Room, navigate to the Actions pane, select Generative AI > OpenAI, drag Authenticate, and place it in the canvas.
  7. Do the following:OpenAI Authenticate action
    1. In the API Key field, paste the API Key copied.
      Note: You can use one of the following options to specify the API Key:
      • Credential: To implement stronger security, you can use the Credential Vault.
      • Variable: To implement stronger security, you can use a credential variable.
      • Insecure string: Enables you to enter the API key directly.
    2. Enter Default as the session name to confine to the current session.