---
title: How to get an Anthropic (Claude) API key - Workflow Suite
description: >-
  Create an Anthropic API key, connect it on the Developer page of Workflow
  Suite and pick a default Claude model to write and change functions with AI.
source_url:
  html: >-
    https://docs.workflow-suite.app/get-anthropic-api-key
  md: >-
    https://docs.workflow-suite.app/get-anthropic-api-key.md
---

# How to get an Anthropic (Claude) API key

Workflow Suite can write and change the code of your functions with AI. It uses your own key from an AI provider. This page shows how to create an Anthropic API key for the Claude models, where to paste it in Workflow Suite and how to pick a default model.

## Create the key at Anthropic

1. Open Anthropic's console for developers and sign in, or create an account: <a href="https://platform.claude.com" target="_blank" rel="noopener">platform.claude.com</a>.
2. Open **Settings**, then **API keys**. Direct link: <a href="https://platform.claude.com/settings/keys" target="_blank" rel="noopener">platform.claude.com/settings/keys</a>.
3. Select **Create Key** and give it a name, for example `Workflow Suite`.
4. Copy the key. It starts with `sk-ant-`.
5. Make sure your Anthropic account has credit or a billing method. Generation is billed to that account.

> [!WARNING]
> **Copy the key right away**
> Anthropic shows the full key only once, when you create it. Treat it like a password: paste it into Workflow Suite and do not share it. We never need your key to help you, so leave it out of support requests.

## 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 **Anthropic (Claude)** card, paste the key into **API key**.
4. Select **Save key**.

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

> [!NOTE]
> **What happens when you save**
> - The key is checked with Anthropic first. If Anthropic rejects it or cannot be reached, the key is not saved and a message tells you why.
> - An accepted key is stored encrypted and is never shown again. To use another key, paste it into the same field and select **Replace key**.
> - The key is used only when you generate. Your request and the function's code are then sent to Anthropic under your account.
> - Your functions cannot read this key, and it never reaches the sandbox they run in. For keys your own code needs, see [Secrets](https://docs.workflow-suite.app/secrets.md).
> - **Disconnect** deletes the saved key. Writing functions with Anthropic then stops working until you connect a key again.

## 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** when your key offers it.
- The list is Anthropic's own list for your key, with models such as **Claude Opus 5.5**, **Claude Fable 5.2** and **Claude Haiku 5.5**. It can show more models than these.
- An older model you already saved keeps working as long as Anthropic offers it, and the card names the newer model with a button to switch.

## 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.

> [!NOTE]
> **Billed to your Anthropic account**
> Generation is billed to your own Anthropic account, not to your Workflow Suite plan. For models with a known price, the model list shows an estimated cost per generation. What you pay is set by Anthropic.

## Related

- [Run code and functions](https://docs.workflow-suite.app/run-code.md) - what functions are and how a workflow runs them.
- [Secrets](https://docs.workflow-suite.app/secrets.md) - keys and passwords for your own steps and code.
- [Build workflows with an AI assistant over MCP](https://docs.workflow-suite.app/build-workflows-with-ai-over-mcp.md) - a different feature: an AI assistant that builds whole workflows over MCP.
