# Setting Up an OpenAI API Key

## What is an Open AI API Key

**An OpenAI API Key** is a unique credential that allows your CRM system to connect to OpenAI's AI services. Once the key is added to the system, the AI Assistant can send requests to OpenAI models and use their capabilities to perform tasks that require artificial intelligence.

### What Is an API Key Used For

OpenAI APIKey is used to connect your CRM system to OpenAI services and enable AI-powered functionality. It authenticates requests sent from the CRM and allows the system to access OpenAI on behalf of your account.

Once the API Key is connected, the AI Assistant can automatically use OpenAI capabilities within your CRM to analyze information, generate responses, process customer inquiries, and support the automation of various business processes.
![Pasted image (2)](https://app.gudhub.com:443/userdata/41557/1179837.png)

## How the AI Assistant Uses an OpenAI APIKey 

The AI Assistant relies on an API Key to access OpenAI services. Whenever your CRM needs to analyze data, generate a response, or perform another AI-driven task, the system automatically sends a request to OpenAI using the account associated with the key.

Once the API Key has been added to your CRM settings, all communication with OpenAI takes place automatically in the background. The results are then returned to the CRM, where they can be used by the AI Assistant to support daily workflows without requiring the key to be entered again.

## How to Get OpenAI API Key

To enable the AI Assistant in your CRM to use OpenAI capabilities, you first need to create OpenAI API Key credentials in **OpenAI Platform** and add them to your CRM settings. 

Follow the step-by-step instructions below to get OpenAI API Key credentials and connect them to your system.

### Step 1

Sign in to **OpenAI Platform** using your preferred authentication method.
![арі_1](https://app.gudhub.com:443/userdata/41557/1179838.png)

### Step 2

Open the **API Keys** section.
![арі_2(1)](https://app.gudhub.com:443/userdata/41557/1179839.png)

### Step 3

Click **“Create new secret key”**.
![арі_3(1)](https://app.gudhub.com:443/userdata/41557/1179840.png)

### Step 4

Enter a name for your OpenAI API Key, then select a **Project** and configure the **Permissions** settings.

**Project** refers to the workspace where the API Key will be created. If you are not using separate projects in OpenAI Platform, you can leave Default project selected.

For **Permissions**, it is recommended to choose All to ensure the AI Assistant has full access to the OpenAI features required for proper operation.
![арі_4](https://app.gudhub.com:443/userdata/41557/1179841.png)

### Step 5

Your OpenAI APIKey has been generated. Copy the key and paste it into the appropriate field in your CRM to activate the AI Assistant. 
![арі_5(1)](https://app.gudhub.com:443/userdata/41557/1179842.png)
Then click **“Done”** to confirm.
![арі_6(1)](https://app.gudhub.com:443/userdata/41557/1179843.png)
After the process is complete, the new key will appear in the **API Keys** section of your OpenAI account.
![арі_7](https://app.gudhub.com:443/userdata/41557/1179844.png)
**Important.** For security reasons, the full API Key is displayed **only once** during creation. Be sure to save it in a secure location before closing the window.

Your OpenAI Key is now ready to use. After it has been added to your CRM, the AI Assistant will be able to send requests to OpenAI services and use the results to support its tasks and workflows.

Before you start using the key, there are a few important details about OpenAI API Keys that you should be aware of.

## Things to Know About OpenAI API Key

### API Key Pricing and Billing

OpenAI API operates on a **pay-as-you-go** pricing model, meaning your costs depend on the selected model and the number of requests sent through the API.

All API-related charges are billed to the account associated with the API Key.

It is important to note that **ChatGPT Plus** and **ChatGPT Pro** subscriptions do not include access to the OpenAI API. To use API-based services, billing must be configured separately in **OpenAI Platform**.

### API Key Security

An API Key is a confidential credential used to access OpenAI services. All requests made with the key are processed under the account it is associated with.

For security reasons, you should never share your API Key with unauthorized users, publish it publicly, or store it in unsecured locations. If the key is exposed, anyone who has access to it may be able to send requests using your account.

If you believe your API Key has been compromised, you can revoke it in your account settings and generate a new one.
![арі_7(1)](https://app.gudhub.com:443/userdata/41557/1179845.png)

### Storing and Using an Open AI Key in Your CRM

Once the API Key has been added to your CRM, it is used to authenticate all requests sent to OpenAI on behalf of the AI Assistant. As a result, communication with OpenAI services takes place automatically and does not require the key to be entered again.

If you need to replace the key, you can update it in your CRM settings. After saving the changes, the system will automatically use the new API Key for all future interactions with OpenAI.