How to get an OpenAI API key

To use Generate with AI with GPT, connect your own OpenAI API key. Here's how to create one - it takes a minute.

Create the key

  1. Go to the OpenAI platform and sign in (or create an account): platform.openai.com.
  2. Open API keys - direct link: platform.openai.com/api-keys.
  3. Select Create new secret key, give it a name (for example Workflow Trigger Extensions), and copy the key - it starts with sk-. You can only see it once, so copy it now.
  4. Make sure your OpenAI account has credit or a billing method - generation calls are billed to your account.

Connect it

  1. In your Shopify admin, open Workflow Trigger Extensions -> Developer -> Connections.
  2. Paste the key into the OpenAI card and select Save key.

Your key is encrypted at rest and used only for generation. It is never shown again, and it never runs inside your trigger code. Then open a custom trigger and use Generate with AI on the Code tab.