> AI agents: this is one page from Mammoth Analytics documentation. The index of all pages as Markdown is https://mammoth.io/docs/llms.txt. Append `.md` to any docs URL, or send `Accept: text/markdown`, to get Markdown.

# Add your own OpenAI, Claude, Gemini or Grok key

> Add your own OpenAI, Anthropic, Google or xAI key to a Mammoth workspace for Generative AI and Extract Text, pick its model and preferences, or remove it.
>
> Applies to: Roles: Workspace Owners add or remove keys; all members can see and use them. Where: Workspace Settings › API Keys › External API keys

External API keys are "Keys you add yourself, for example OpenAI, for platform features." Mammoth features such as [Generative AI on your columns](https://mammoth.io/docs/learn/clean-and-shape/ai-on-columns/) and Extract Text use them on your workspace's behalf. Without a key, Generative AI uses a key Mammoth provides. You add them in **Workspace Settings** → **API Keys** → **External API keys**.

Keys belong to the workspace: all members can see and use them, but only Workspace Owners can add or remove them. Members see "You can't add external API keys in this workspace. Contact the Workspace Owner."

## Add an external API key

1. In the **External API keys** card, click **Add external key**. The **Add External API Key** modal opens.
2. Click a provider card: **ChatGPT** (OpenAI), **Claude** (Anthropic), **Grok** (xAI) or **Gemini** (Google). Click **Next**.
3. Choose the **Model** to use with this key.
4. Optional: expand **Preferences** to set model options (see below).
5. Type a **Key Name**. The placeholder shows the model name. Each name must be unique: "This key name already exists. Please try a different one."
6. Paste the key in **Paste API key**. The "How to get your Claude key" link (named for your provider) opens the provider's key documentation.
7. Click **Add External Key**. Mammoth checks the key when you submit.

![Add External API Key dialog in Workspace Settings, with provider choices ChatGPT, Claude, Grok and Gemini](https://mammoth.io/docs/images/20260605_094308_add-external-key-modal1.webp)

Each row in the card shows the key's name, who added it and when, and the key masked to its last four characters (•••• and the last four). Because the key value is unreadable after creation, use the name to record what it's for, for example "OpenAI PDF extraction - prod". This makes rotation simpler.

| Provider | Display name | Key starts with |
| --- | --- | --- |
| OpenAI | ChatGPT | `sk-proj-...` |
| Anthropic | Claude | `sk-ant-api03-...` |
| xAI | Grok | `xai-...` |
| Google | Gemini | `AIza...` |

You can add several keys per provider, for example two Gemini keys, one for production and one for testing, and switch between them in the key selector.

## Set model preferences

Click **Preferences** to see the options for the chosen model. Not every model offers every option. They apply to all Generative AI work that uses this key.

![Add External API Key dialog for Claude, with a model dropdown, Extended thinking, Web search and Batch API toggles](https://mammoth.io/docs/images/20260605_094521_add-key-preferences1.webp)

| Preference | What it does |
| --- | --- |
| **Extended thinking** | The model reasons longer before answering. Uses more tokens. |
| **Reasoning effort** | Sets how much reasoning the model applies, on models that support it |
| **Web search** | Lets the model search the web for current information |
| **Batch API** | Sends requests through the provider's Batch API. Results may be slower. |

## Remove or replace a key

Click the key's masked value at the end of its row to open its menu, then select **Remove**, its only action. The key is deleted for good, and pipeline tasks that use it fail until another key is selected.

> Info: Keys can't be edited\
> Once a key is added, nothing about it can be changed, including the display name. To replace an expired or exposed key, or to rename one, remove it and add a new one.

## Troubleshooting AI provider keys

| Symptom | Cause | Fix |
| --- | --- | --- |
| "Your Google Gemini key has exceeded its rate limit. Please try again in a few minutes." | The selected key hit the provider's rate limit | Wait a few minutes, or pick another key from the same or another provider |
| "The Claude key is invalid." | The key failed validation | Check the key. Keys only work with their own provider, so make sure you pasted it under the right one. |
| A message says the account has no quota left | The provider account has no balance | Add funds in the provider's dashboard, or add a key from another account |

## Related

- [Use AI to classify, enrich or translate a column](https://mammoth.io/docs/learn/clean-and-shape/ai-on-columns/): pick the key in the Generative AI panel.
- [Create API keys and connect AI assistants](https://mammoth.io/docs/learn/workspace/api-keys/): the rest of the API Keys section.
- [Roles and permissions](https://mammoth.io/docs/learn/workspace/members-and-roles/): who can manage keys.
- [Limits and quotas](https://mammoth.io/docs/learn/help/limits/): every AI limit in one place.

---
Source: https://mammoth.io/docs/learn/workspace/external-ai-keys.md · Updated: 2026-11-08
