---
title: "How to get an OpenAI API key"
description: "Create an OpenAI API key and connect GPT to Workflow Transactional Email to create, edit and translate email layouts."
canonical: "https://docs.workflow-transactional-email.app/get-openai-api-key"
---

# How to get an OpenAI API key

To create, edit and translate email layouts with GPT, connect your own OpenAI API key. Creating one takes a minute.

## Create the key

1. Sign in to the **OpenAI platform**, or create an account: <a href="https://platform.openai.com" target="_blank" rel="noopener">platform.openai.com</a>.
2. Open **API keys**, direct link: <a href="https://platform.openai.com/api-keys" target="_blank" rel="noopener">platform.openai.com/api-keys</a>.
3. Select **Create new secret key**, name it (for example `Workflow Transactional Email`) and **copy the key**. It starts with `sk-` and is shown only once.
4. Make sure your OpenAI account has a payment method or credit: <a href="https://platform.openai.com/settings/organization/billing/overview" target="_blank" rel="noopener">platform.openai.com/settings/organization/billing</a>. Generations are billed to your account.

OpenAI's own quickstart for the API: <a href="https://developers.openai.com/api/docs/quickstart" target="_blank" rel="noopener">developers.openai.com/api/docs/quickstart</a>.

## Connect it

1. In your Shopify admin, open **Workflow Transactional Email > Developer > Connections**.
2. Paste the key into the **OpenAI** card and select **Save key**. The key is checked with the provider before it is saved.
3. Pick your **Default model** from the list of models your key can use.

The key is encrypted and used only when you generate, edit or translate a layout. It is never shown again. Then create a layout, or open one and use **Edit with AI**.

> [!NOTE]
> **Billing and models**
> Generations are billed to your own OpenAI account, not your Workflow Transactional Email plan. See [Create, edit and translate layouts with AI](https://docs.workflow-transactional-email.app/create-layouts-with-ai.md) for the GPT models and cost estimates.
