> For the complete documentation index, see [llms.txt](https://sandgarden.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sandgarden.gitbook.io/docs/administration/ai-provider-keys.md).

# AI Provider Keys

This page covers AI provider key management for organizations on the Bring Your Own Key and Open Source Software plans. The app page title is **AI Provider Keys**. Doc Holiday supports [multiple providers](/docs/administration/supported-providers.md), validates keys before saving them, and lets organizations keep more than one stored key on hand for rotation and failover. Doc Holiday manages inference on the Enterprise plan; see [Billing and plans](/docs/administration/billing-and-plans.md).

![The AI Provider Keys page with two keys: one Active and Healthy, one Unhealthy](/files/87QdXWVpfbiS8EQ3Vl12)

If no keys exist, the page shows **No AI Provider Keys yet**.

### Add a key

1. The **Add AI Provider Key** dialog opens.
2. The dialog collects **Name**, **Provider**, and **API Key**.
3. **Add Key** saves the key, while **Cancel** closes the dialog without saving. Doc Holiday verifies the key before it saves it, and it rejects keys that cannot be validated.

### Manage active and failover keys

The active key card shows the **Active** badge. Every key card menu includes **Test** and **Delete**. Inactive key card menus also include **Set Active**.

1. The first saved key becomes active automatically.
2. The **Set Active** action moves the active badge to that key, and Doc Holiday demotes the previous active key to failover.
3. If the active key cannot be used, Doc Holiday switches to another stored key when one is available. If every available key fails, the work errors.

Doc Holiday only ever uses keys that the organization has added; there is no fallback to any other key.

### Rotate a key

1. The page adds the new key.
2. The **Set Active** action makes it active.
3. The page deletes the old key.

Key changes apply immediately, even to work already in flight.

### Test and delete a key

1. The overflow menu on any key card includes **Test** when validation is needed.
2. The result shows **Key is valid** when the key works and **Key test failed** when it does not.
3. The overflow menu also includes **Delete** for removing a key.
4. The confirmation dialog asks **Delete AI provider key?** and includes **Cancel**. Doc Holiday deletes the stored key and scrubs the secret.

### Next

* Start setup in [Add your AI provider key](/docs/getting-started/add-your-ai-provider-key.md).
