# OpenAI

With our new OpenAI integration, we allow you to unleash the power of AI in your day-to-day processed to auto-generate content, responses, tag data or extract structured data from text.

## Connecting to your MySQL Database

To connect your MySQL database, follow the steps below:

1. Go to **Data Management** and click on "**New source**" to create a new data source.&#x20;
2. Select **OpenAI** from the list of available data sources.
3. Name your data source connection and provide the connection details:

<table><thead><tr><th width="201">Setting</th><th>Description</th></tr></thead><tbody><tr><td><strong>API key</strong></td><td>Your unique API key to link your OpenAI account to your Uify apps. Your API key can be found <a href="https://platform.openai.com/account/api-keys">here</a>.</td></tr><tr><td><strong>Organization ID</strong></td><td>If your company has an account of their own, you can provide the org id to count requests towards the organization API quota instead of your account's quota.</td></tr></tbody></table>

4. Click on "**Test connection"** to ensure that your connection works reliably and save your data source connection with "**Connect**".

Note: You can configure the data source for two different environments, Staging and Production. You can find more information about it [here](broken://pages/FM88Izx8RDNtGtuF6cvH).&#x20;

## Action modes

Like any other integration, you can use the OpenAI integration by creating an OpenAI action in your  editor.

We support several modes from a highly customizable manual mode which allows you to specify all aspects of the model inference to use-case specific modes like the "Text to structured data" mode that only asks you for the most important inputs to handle the task out of the box. There is one subpage for each mode.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.uify.io/integrations/openai.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
