# OpenAI

The OpenAI API offers an uncomplicated platform that enables developers to integrate a cutting-edge intelligence system into their applications. This system utilizes OpenAI's advanced models to enhance user experience. The Chat Completions endpoint, which supports ChatGPT, offers a straightforward method for inputting text and utilizing a powerful model like GPT-4o to produce a response.

## Prerequisites

* Get OpenAI API connection parameters from the datasource owner.

## Connect to OpenAI API

Create a new data source in two ways. Note that this permission is restricted to workspace admins and developers.

<figure><img src="https://125370873-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzdpN2Lz0hzXpnNScDzVt%2Fuploads%2FdXtu1M6EQUNM3bhmmYd6%2FConnectNewDataSourceOverview.gif?alt=media&#x26;token=7795e1a8-b552-4b43-9380-83780bebc924" alt=""><figcaption></figcaption></figure>

Select **APIs** > **OpenAI** as the data source type.

<figure><img src="https://125370873-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzdpN2Lz0hzXpnNScDzVt%2Fuploads%2FYA5R2SDVqmKy6QQCDW37%2Fimage.png?alt=media&#x26;token=8fb47190-335a-443f-bda5-3a738f727114" alt=""><figcaption></figcaption></figure>

Set the details with the connection parameter fetched from the datasource owner.

<figure><img src="https://125370873-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzdpN2Lz0hzXpnNScDzVt%2Fuploads%2FX28fyW2Ne4E8w1XWUVyN%2Fimage.png?alt=media&#x26;token=5fa05bc7-5df1-4fec-b110-70d82a96bddb" alt=""><figcaption></figcaption></figure>

(Optional) Click **Test connection** to check whether the API is successfully connected.

Click **Save**, and it will be saved to your data source library.
