DevelopersHow to get an OpenRouter API key

How to get an OpenRouter API key

Copy page

Create an OpenRouter API key, connect it on the Developer page of Workflow Suite and write functions with AI using Claude, GPT, Gemini and other models.

Workflow Suite can write and change the code of your functions with AI. It uses your own key from an AI provider. OpenRouter gives you one key for models from many companies, including Claude, GPT, Gemini, Llama, Mistral and DeepSeek. This page shows how to create an OpenRouter API key, where to paste it in Workflow Suite and how to pick a default model.

Create the key at OpenRouter

  1. Open OpenRouter and sign in, or create an account: openrouter.ai.
  2. Add credits under Credits. Generation is billed to your OpenRouter account.
  3. Open Keys. Direct link: openrouter.ai/settings/keys.
  4. Select Create key and give it a name, for example Workflow Suite.
  5. Copy the key. It starts with sk-or-.

Paste the key into Workflow Suite

  1. In your Shopify admin, open Workflow Suite and select Developer in the app menu.
  2. Open the tab Connections. Under Write and change functions with AI there is one card per provider.
  3. In the OpenRouter card, paste the key into API key.
  4. Select Save key.

The card then shows Key connected and the model it uses.

Pick a default model

Once the key is saved, the card has a Default model list. This model is preselected when you write a function with AI. You can pick another model each time.

  • Workflow Suite starts with Claude Sonnet 5.5 through OpenRouter when your key offers it.
  • The list is OpenRouter's own list for your key, so it can show many more models.
  • To use a model by its id, choose Other model id..., enter the id in Model id and select Use model.
  • An older model you already saved keeps working as long as OpenRouter offers it, and the card names the newer model with a button to switch.

An OpenRouter model id names the company and the model, for example:

text
anthropic/claude-sonnet-5.5

An id may hold letters, digits and the characters . _ - : / @. Workflow Suite saves the id as you enter it, so copy it from the model's page on OpenRouter.

Write a function with AI

  1. Open Functions in the app menu and open a function.
  2. Select Write with AI above the code.
  3. Pick the Model, describe what should change and select Generate. With more than one provider connected, pick the Provider first.

The new code is loaded into the editor. Nothing is saved until you save, so review and test it first.

On a new, empty function, Create with AI drafts the code, sample variables and the permissions it needs from your description.