# Dall-E 2

## Connection <a href="#connect" id="connect"></a>

When you're setting up your first workflow with Dall-E 2, you'll need to create an OpenAI API Key.

<figure><img src="/files/u2DAz70qJhd3LCgovAbR" alt=""><figcaption></figcaption></figure>

To create an API Key, go to this url: <https://platform.openai.com/account/api-keys>. Once there, click on the Create new secret key button.

<figure><img src="/files/KYxHtcUniaOXw3Ajark7" alt=""><figcaption></figcaption></figure>

Then, click on the copy button in the API key generated modal. Paste the copied values into MESA's Dall-E 2 Account Connections API Key field.

<figure><img src="/files/dtERgixoroza0Cc1JxET" alt=""><figcaption></figcaption></figure>

Lastly, click on Add connection and then you are all set! MESA is now connected with Dall-E 2.

## Configure <a href="#configuring" id="configuring"></a>

#### Generated image expires after 1 hour <a href="#expiration" id="expiration"></a>

When using MESA's Dall-E 2 Generate Image action, you will need to keep in mind that all generated images will expire after one hour. Therefore, it is highly recommended to create workflows that use the generated image immediately after an automation runs. You should not store these images in a third party service because they will no longer work.

#### Best Usage <a href="#usage" id="usage"></a>

For the Prompt field, you will want to write a very detailed prompt. The more detailed the prompt is, the more likely you are going to get the result that you want.

<figure><img src="/files/etq8UbG3PGrhEakSvty7" alt=""><figcaption></figcaption></figure>

#### Following OpenAI's Usage Policies <a href="#policy" id="policy"></a>

Please ensure that you follow OpenAI's Usage Policies when using MESA's Dall-E 2 integration: <https://openai.com/policies/usage-policies>

#### ShopPad's Recommendation <a href="#recommendation" id="recommendation"></a>

We recommend using OpenAI's [Dall-E website](https://labs.openai.com/) first when conducting a manual run with MESA's Generate Image action. This lets you test the prompt that you enter into the action.

## Technical Notes <a href="#data-security" id="data-security"></a>

### How Dall-E 2 Uses Your Data <a href="#data-security" id="data-security"></a>

The Dall-E 2 app makes API calls to OpenAI. Only the variables explicitly configured in the MESA builder will be shared with OpenAI. MESA does not store any of this information beyond your data retention date. OpenAI does not use data submitted to and generated by their API to train OpenAI models or improve OpenAI's service offering.

To opt out of any data sharing with AI models, simply do not use the Dall-E 2 step in any of your workflows.

[Learn more](https://help.openai.com/en/articles/5722486-how-your-data-is-used-to-improve-model-performance) about how and when OpenAI uses use to train their models. Read [MESA's Data Processing Agreement](https://www.getmesa.com/dpa).


---

# 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.getmesa.com/connect/dall-e-2.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.
