# OpenAI integration (legacy)

> This section provides guides on how to install and use the OpenAI integration.

Source: https://docs.uniform.app/docs/integrations/generative-ai/openai

> **Legacy feature:**
>
> This integration is based on the legacy [AI prompts](https://docs.uniform.app/docs/guides/ai/ai-prompts) feature, which will continue working for existing projects but is not recommended for new implementations.
>
> For a more flexible and powerful approach, use [Scout](https://docs.uniform.app/docs/guides/ai/scout) for AI-assisted composition building, [AI guidance](https://docs.uniform.app/docs/guides/ai/ai-guidance) to define context for your components and content types, and [AI quick edits](https://docs.uniform.app/docs/guides/ai/ai-quick-edits) for rapid content updates.
>
> AI prompts are likely to be deprecated and removed in the future.

[OpenAI](https://openai.com/product) is an AI research and deployment company. Their mission is to ensure that artificial general intelligence benefits all of humanity.

This integration allows business users to configure and use prompts to generate text and images for use in Uniform compositions and entries.

## Add Uniform integration

Adding the OpenAI integration to your Uniform project adds new parameter types that you can add prompts to your Uniform project.

1. In Uniform, open your project.
2. Navigate to **Settings > Integrations**.
3. Scroll to the section **Browse Integrations**.
4. Click **OpenAI**.
5. Click **Add to project**.

   ![](https://docs.uniform.app/images/integrations/generative-ai/openai/add-integration-to-project.png)
6. Enter the required values.

   | Uniform setting | Value |
   | --- | --- |
   | Organization | The organization ID from your settings in OpenAI. |
   | API key | Your OpenAI API key. |
7. The following optional settings are available:

   | Uniform setting | Description |
   | --- | --- |
   | Default Open AI model |  |
   | Number of image variations | This many images will be generated when a prompt that uses this connection is run. |
   | Default Open AI model for Images |  |
   | Image resolution |  |
8. Click **Save**.

## Built-in prompts

After you add the Uniform integration, a number of built-in prompts are available.

> **Where are the prompts?:**
>
> You can find prompts in the section **Settings > Prompts**.

> **Note:**
>
> Built-in prompts can't be edited so that Uniform can actively manage and update prompts based on customer feedback. You can replace built-in prompts with custom ones by duplicating and disabling the original ones.

### Ask ChatGPT

Answers a question posed by the user. The following variables provide the user with control over the content that is generated.

| Variable | Description |
| --- | --- |
| Prompt | The question the user wants answered. |

### Generate image from topic

Generates an image based on the topic provided by the user. The following variables provide the user with control over the image that is generated.

| Variable | Description |
| --- | --- |
| Topic | The image that is generated is based entirely on this value. |

### Generate image from topic (color)

Generates an image based on the topic provided by the user. The following variables provide the user with control over the image that is generated.

| Variable | Description |
| --- | --- |
| Color | The primary color of the image that is generated. |
| Topic | The image that is generated is based on this value. |

### Make text longer

Takes existing text and expands it up to three times its current length.

### Make text shorter

Takes existing text and reduces it to a maximum of 250 characters.

### Personalize for given audience

Takes existing text and rewrites it to target a specific [audience](https://docs.uniform.app/docs/guides/classification/audiences).
