> ## Documentation Index
> Fetch the complete documentation index at: https://docs.withgauge.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Bring Your Own Key (BYOK)

> Connect your own AI provider API key so Gauge runs that engine's nightly tracking through your account.

## Bring Your Own Key (BYOK)

Bring Your Own Key lets you connect your own AI provider API key so Gauge runs that engine's tracking through your account instead of its own. When you connect a key, Gauge uses it for the nightly prompt sampling that measures how you show up in that engine, and the provider bills you directly for those runs.

The main reason to use BYOK is to add an engine to your tracking. Connecting a key turns on Claude or Grok tracking for your prompts without Gauge having to run them on its shared key. Only the nightly prompt-sampling path uses your key. Everything else Gauge does with these providers (chat, agents, content, and insights) keeps running on Gauge's own key.

<Note>
  BYOK is enabled per organization. If you don't see the Anthropic or Grok card under Settings, reach out to us at [support@withgauge.com](mailto:support@withgauge.com) to have it turned on.
</Note>

## Supported Providers

BYOK is available for two providers today:

* **Anthropic (Claude)** — adds Claude to your tracked [AI engines](/navigating/ai-engines).
* **Grok (xAI)** — adds Grok to your tracked [AI engines](/navigating/ai-engines).

Each provider has its own card under **Settings → Integrations**, and each is connected independently.

<Warning>
  A connected key incurs charges on your provider account. Gauge runs your prompts through the engine every night and the provider bills you directly. Anthropic runs typically cost about **\$2.50–\$3 per prompt per month**; xAI runs typically cost about **\$1–\$2 per prompt per month**. Each card shows an estimate based on how many prompts you have tracked.
</Warning>

## Connecting a Key

### Anthropic (Claude)

<Steps>
  <Step title="Generate a key">
    In the [Anthropic Console](https://console.anthropic.com/settings/keys), create an API key. The key needs Messages API access.
  </Step>

  <Step title="Paste it into Gauge">
    Go to **Settings → Integrations** and open the Anthropic card. Paste the key into the **Anthropic API Key** field. Anthropic keys start with `sk-ant-api03-`.
  </Step>

  <Step title="Test and save">
    Click **Test & Save**. Gauge validates the key against Anthropic before storing it. If it works, the card shows a green **Connected** badge, the last four characters of the key, who connected it, and when it was last verified.
  </Step>
</Steps>

### Grok (xAI)

<Steps>
  <Step title="Generate a key">
    In the [xAI Console](https://console.x.ai), open **API Keys** and click **Create API key**.
  </Step>

  <Step title="Paste it into Gauge">
    Go to **Settings → Integrations** and open the Grok card. Paste the key into the **xAI API Key** field. xAI keys start with `xai-`.
  </Step>

  <Step title="Test and save">
    Click **Test & Save**. Gauge validates the key against xAI before storing it. If it works, the card shows a green **Connected** badge, the last four characters of the key, who connected it, and when it was last verified.
  </Step>
</Steps>

<Tip>
  If a saved key later stops working, the card shows a **Connection unhealthy** badge with the provider's error. Use **Re-test key** to re-validate the stored key after fixing the issue on the provider side.
</Tip>

## What Changes When Connected

Once a key is validated and saved, Gauge turns on tracking for that engine and starts running your prompts through it every night using your key. The results appear alongside your other [AI engines](/navigating/ai-engines), and the provider bills you directly for each run.

To stop, click **Disconnect** on the card. Gauge removes your stored key and turns off that engine's nightly tracking — sampling stops rather than continuing on a Gauge key. If you'd rather keep Claude or Grok tracking without using your own key, reach out at [support@withgauge.com](mailto:support@withgauge.com).
