> For the complete documentation index, see [llms.txt](https://herd-security.gitbook.io/herd-security-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://herd-security.gitbook.io/herd-security-docs/setup-and-integrations/settings/llm-providers.md). Agents can also search and read this documentation through its [MCP server](https://herd-security.gitbook.io/herd-security-docs/~gitbook/mcp).

# LLM Providers

Bring your own Anthropic (Claude) API key so Herd's AI features run on your organization's own account and negotiated rates.

## Overview

Herd's AI features run on a Herd-managed platform key by default. If you'd rather use your own account, to apply your organization's negotiated rates or keep AI usage on your own billing, you can bring your own **Anthropic (Claude)** API key.

To set this up, go to **Settings → Integrations** and open the **LLM API Keys** card (in the **Dev & Compliance** section).

{% hint style="info" %}
This is optional for most of Herd. With no key configured, Herd uses its platform key, and the tile shows **Not configured — using Herd platform key**. The exception is [AI Insights](https://herd-security.gitbook.io/herd-security-docs/ai/ai-coach.md): it runs only on your own key, and does no scoring, coaching or policy judging until you add one here.
{% endhint %}

{% hint style="info" %}
Looking to change **which model** powers Herd's text generation? That's the [AI model setting](https://herd-security.gitbook.io/herd-security-docs/setup-and-integrations/settings/general-and-approvals.md#ai-model) on **Settings → General**, and HerdAI's per-chat model selector. This page is only about running Anthropic usage on your own account.
{% endhint %}

***

## Adding a key

1. In the **LLM Provider Keys** tile, click **Add key**.
2. Paste your **Anthropic API key** (it starts with `sk-ant-…`).
3. Optionally add a **Label** (for example, *Production account*), up to 128 characters, to help you recognize the key later.
4. Click **Save key**.

{% hint style="info" %}
Keys are encrypted at rest and validated against Anthropic before being saved, so an invalid key is rejected when you enter it.
{% endhint %}

***

## Managing a configured key

Once a key is saved, the tile shows:

* **Key ending in …**, the last four characters of the key (Anthropic never lets the full key be retrieved again).
* The optional **label**, if you set one.
* **Last validated** and **Last used** timestamps.

You have three actions:

* **Validate** re-checks the key against Anthropic. Herd confirms the key is still valid (or surfaces the error if it isn't).
* **Replace** swaps in a new key.
* **Remove** deletes the key. Herd then falls back to the platform key for AI features. You'll be asked to confirm, since removal changes which account your AI usage runs on.

***

## Your own key and the AI Insights budget

[AI Insights](https://herd-security.gitbook.io/herd-security-docs/ai/ai-coach.md) meters what its AI judge and review calls cost each calendar month against a monthly budget, and once that budget is reached those calls are skipped for the rest of the month. The cap protects Herd's platform key. When your organization has an active Anthropic key configured here and is still on the default budget, the cap is not enforced for AI Insights' own calls (scoring, coaching and the policy judge), which always run on your Anthropic key. The training AI reviewer is exempt too, as long as text generation goes through Anthropic (the default [AI Model](https://herd-security.gitbook.io/herd-security-docs/setup-and-integrations/settings/general-and-approvals.md#ai-model)). Where the cap isn't enforced, the **AI spend this month** card on AI Insights → Setup still shows the figure, but as a spend readout rather than a limit. Setting a budget of your own turns enforcement back on. See [Setting Up AI Insights](https://herd-security.gitbook.io/herd-security-docs/ai/ai-coach/setup.md#ai-spend-and-budget).
