> ## Documentation Index
> Fetch the complete documentation index at: https://koreai.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Configuring the OpenAI Action

[Back to Actions Integrations](https://koreai.mintlify.site/ai-for-service/integrations/overview.md#actions)

Connect OpenAI to generate answers from context and extract skills from documents. See [OpenAI Documentation](https://platform.openai.com/docs/api-reference/introduction) for more information.

***

## Authorizations Supported

The Platform supports basic authentication for OpenAI. See [App Authorization Overview](https://koreai.mintlify.site/ai-for-service/app-settings.md#authorization-profiles) for details.

| Authorization Type | Basic Auth |
| - | - |
| Pre-authorize the Integration | Yes |
| Allow Users to Authorize the Integration | Yes |

***

## Step 1: Enable the OpenAI Action

**Prerequisites:**

* If you don't have OpenAI credentials, create a developer account at [OpenAI](https://platform.openai.com/docs/api-reference/authentication).
* Copy your API Key.

**Steps:**

1. Go to **App Settings** > **Integrations** > **Actions**.
2. Select **OpenAI**.

### Pre-authorize the Integration

**Basic Auth**

1. Go to **App Settings** > **Integrations** > **Actions** and select **OpenAI**.

2. In **Configurations**, select the **Authorization** tab.

3. Set **Authorization Type** to **Pre-authorize the Integration** > **Basic Auth**.

4. Enter your **API Key**.

   ![Auth Type and API Key](https://mintcdn.com/koreai/NuCnGNJCXSVC7wUP/ai-for-service/integrations/actions/images/open-ai-action-img2.png?fit=max\&auto=format\&n=NuCnGNJCXSVC7wUP\&q=85\&s=b858e8867ae344f37a493b11e2b668c9)

   > [!NOTE]
   >
   > The Platform uses the configured API Key to authorize and generate suggestions from OpenAI.

5. Click **Enable**. The **Integration Successful** pop-up is displayed.

   ![Enable integration](https://mintcdn.com/koreai/NuCnGNJCXSVC7wUP/ai-for-service/integrations/actions/images/open-ai-action-img3.png?fit=max\&auto=format\&n=NuCnGNJCXSVC7wUP\&q=85\&s=c9dfe582992691225e94ef34f29f5bf0)

> [!NOTE]
>
> The OpenAI action moves from **Available** to **Configured** after enabling.

### Allow End User to Authorize

1. Go to **App Settings** > **Integrations** > **Actions** and select **OpenAI**.

2. In **Configurations**, select the **Authorization** tab.

3. Set **Authorization Type** to **Allow Users to Authorize the Integration** > **Basic Auth**.

   ![Auth type - Basic Auth](https://mintcdn.com/koreai/NuCnGNJCXSVC7wUP/ai-for-service/integrations/actions/images/open-ai-action-img4.png?fit=max\&auto=format\&n=NuCnGNJCXSVC7wUP\&q=85\&s=049cc95b0312f2cef27a34d48e2f1b13)

4. Click **Select Authorization** > **Create New**.

   ![Create new Auth](https://mintcdn.com/koreai/NuCnGNJCXSVC7wUP/ai-for-service/integrations/actions/images/open-ai-action-img5.png?fit=max\&auto=format\&n=NuCnGNJCXSVC7wUP\&q=85\&s=2139bd4bfc1bdf688cf32e0eee966cad)

5. Select **API Key** as the authorization mechanism. See [App Authorization Overview](https://koreai.mintlify.site/ai-for-service/app-settings.md#authorization-profiles).

   ![Auth mechanism - API Key](https://mintcdn.com/koreai/NuCnGNJCXSVC7wUP/ai-for-service/integrations/actions/images/open-ai-action-img6.png?fit=max\&auto=format\&n=NuCnGNJCXSVC7wUP\&q=85\&s=9b171b6e77b558aafbd950665d0510a8)

6. Enter the Basic Auth credentials:
   * **Name** - Name for the auth profile.
   * **Base URL** - Base tenant URL for OpenAI instance.
   * **Authorization Check URL** - Authorization check URL for your OpenAI instance.
   * **Description** - Description of the profile.

7. Click **Save Auth**.

   ![Save auth profile](https://mintcdn.com/koreai/NuCnGNJCXSVC7wUP/ai-for-service/integrations/actions/images/open-ai-action-img7.png?fit=max\&auto=format\&n=NuCnGNJCXSVC7wUP\&q=85\&s=108d1eae8d79f185f197074dffac6a82)

8. Select the new **Authorization Profile**.

   ![Select auth profile to complete integration](https://mintcdn.com/koreai/NuCnGNJCXSVC7wUP/ai-for-service/integrations/actions/images/open-ai-action-img8.png?fit=max\&auto=format\&n=NuCnGNJCXSVC7wUP\&q=85\&s=d0be59f038ccb574ebeb62604222ed5c)

9. Click **Enable**.

***

## Step 2: Install the OpenAI Action Templates

1. On the **Integration Successful** dialog, click **Explore Templates**.

   ![Explore Templates](https://mintcdn.com/koreai/NuCnGNJCXSVC7wUP/ai-for-service/integrations/actions/images/open-ai-action-img9.png?fit=max\&auto=format\&n=NuCnGNJCXSVC7wUP\&q=85\&s=e77b182af5fe3f7700dabd6c0d251d9d)

2. Click **Install** to begin installation.

   ![Begin installation](https://mintcdn.com/koreai/NuCnGNJCXSVC7wUP/ai-for-service/integrations/actions/images/open-ai-action-img10.png?fit=max\&auto=format\&n=NuCnGNJCXSVC7wUP\&q=85\&s=edf07fe5db6388ff6a126603b512e1e2)

3. Once installed, click **Go to Dialog**. A dialog task for each template is auto-created.

   ![Dialog task for each template](https://mintcdn.com/koreai/NuCnGNJCXSVC7wUP/ai-for-service/integrations/actions/images/open-ai-action-img11.png?fit=max\&auto=format\&n=NuCnGNJCXSVC7wUP\&q=85\&s=298334cf0977c39e1e98529935d61e6c)

4. Select the desired dialog task and click **Proceed**.

   ![Select desired task from template](https://mintcdn.com/koreai/NuCnGNJCXSVC7wUP/ai-for-service/integrations/actions/images/open-ai-action-img12.png?fit=max\&auto=format\&n=NuCnGNJCXSVC7wUP\&q=85\&s=7dfb0bf9d4359e529a13ada5b183a151)

5. The dialog task is auto-created and the canvas opens with all required entity nodes, service nodes, and message scripts.

   ![dialog task is auto-created](https://mintcdn.com/koreai/NuCnGNJCXSVC7wUP/ai-for-service/integrations/actions/images/open-ai-action-img13.png?fit=max\&auto=format\&n=NuCnGNJCXSVC7wUP\&q=85\&s=dd70941339e9c42263f09234b98ed1ab)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.