How to get a Google Gemini API key
To use Write with AI with Google Gemini, connect your own Gemini API key. It takes a minute.
Create the key
- Open Google AI Studio and sign in with your Google account: aistudio.google.com.
- Open Get API key - direct link: aistudio.google.com/apikey.
- Select Create API key, choose or create a Google Cloud project, and copy the key - it starts with
AIza. - For more than the free tier's limits, turn on billing for that project in Google AI Studio - generation is billed to your Google account.
Connect it
- In your Shopify admin, open Workflow Functions -> Developer -> Connections.
- Paste the key into the Google Gemini card and select Save key. The key is checked with Google before it is saved.
- Pick a default model. The list is Google's own list for your key.
Your key is encrypted and used only for generation - it is never shown again and never runs inside your functions. Then open a function and select Write with AI.

Generation is billed to your own Google account, not your Workflow Functions plan. See Generate functions with AI.

