# OpenAI/ChatGPT

You'll need to configure an OpenAI integration if you want to use OpenAI as part of your mods. First, you'll need to obtain an API key from OpenAI.

### Finding the API key from OpenAI

To get the API key, [go to your OpenAI account page](https://platform.openai.com/account/api-keys).

If you haven’t already created an account, you’ll need to create one. (It’s free at this time of writing.) If you aren’t logged in, you’ll need to log in. Once logged in, you’ll be directed to your API keys page.

Create a new API key by selecting the **+ Create new secret key** button displayed in the middle of the page.

<figure><img src="https://2274778196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq123bF1HPQPV35s5vHa1%2Fuploads%2FdfoYeGVwqxwZilK2oJMT%2Fimage.png?alt=media&#x26;token=d35d19dc-4d4e-4151-b6c1-db422ee31581" alt=""><figcaption></figcaption></figure>

A new modal appears confirming the new key was generated and displaying the key. Click the green copy button after the string to copy it to your clipboard and paste it into the `apiKey` field in PixieBrix.

<figure><img src="https://2274778196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq123bF1HPQPV35s5vHa1%2Fuploads%2FcR4Y8eBP8rIxbjvZarf9%2Fimage.png?alt=media&#x26;token=54c686ad-054d-4501-894a-40c9f2ae3804" alt="" width="345"><figcaption></figcaption></figure>

Click **Save** on the OpenAI configuration modal in PixieBrix and you’re ready to start using your OpenAI integration! You’ll be able to select this integration from the dropdown menu when configuring mods that use OpenAI.

### Configuring an OpenAI Integration in PixieBrix&#x20;

{% hint style="info" %}
To set up a cloud integration that your team can access, head to the [Admin Console](https://app.pixiebrix.com/). *(If you'd rather set up something locally, use the Extension Console. Learn more about* [configuring-integrations](https://docs.pixiebrix.com/integrations/configuring-integrations "mention").*)*
{% endhint %}

From the **Integrations** section in the Admin or Extension Console, click the **+** **Add Integration** button in the top right corne&#x72;**.**&#x20;

<figure><img src="https://2274778196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq123bF1HPQPV35s5vHa1%2Fuploads%2F3qBrlz6UEva1Y1oAmQmz%2Fimage.png?alt=media&#x26;token=b3e90a7b-40f8-4242-826e-811b6fde9da7" alt=""><figcaption></figcaption></figure>

Search for and select the OpenAI integration.

<figure><img src="https://2274778196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq123bF1HPQPV35s5vHa1%2Fuploads%2FSWc1TPy41E29glRuOBVI%2Fimage.png?alt=media&#x26;token=53161e58-023f-407f-8a19-ea00c496b421" alt=""><figcaption></figcaption></figure>

You can then follow the prompts for setting up an integration. Label the integration with a useful name, and paste in the API key from OpenAI.

<figure><img src="https://2274778196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq123bF1HPQPV35s5vHa1%2Fuploads%2FHwqqkdtAabVh4uZUNeL3%2Fimage.png?alt=media&#x26;token=fc32e1c8-9810-4165-9d3c-c73d8b92d7e9" alt=""><figcaption></figcaption></figure>

Click **Save,** and your integration will be ready for use in any [OpenAI mods](https://www.pixiebrix.com/marketplace/search/?tags=openai-chatgpt).
