How to get an OpenAI API key
Create an OpenAI API key and connect it to Workflow Functions to generate functions with GPT.
To use Write with AI with GPT, connect your own OpenAI API key. Here's how to create one - it takes a minute.
Create the key
- Go to the OpenAI platform and sign in (or create an account): platform.openai.com.
- Open API keys - direct link: platform.openai.com/api-keys.
- Select Create new secret key, give it a name (for example
Workflow Functions), and copy the key - it starts withsk-. You can only see it once, so copy it now. - Make sure your OpenAI account has a billing method or credit - generation calls are billed to your account.
Connect it
- In your Shopify admin, open Workflow Functions -> Developer -> Connections.
- Paste the key into the OpenAI card and select Save key.
Your key is encrypted at rest and used only for generation - it's never shown again and never runs inside your functions. Then open a function and select Write with AI.
