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

# Connect providers

> Connect, rotate, and disconnect Anthropic and OpenAI admin keys so the AI Spend Agent can audit your usage.

The AI Spend Agent pulls usage and billing data directly from your AI provider using an **admin API key**. You manage connections from inside the agent: connect a provider, rotate its key when it changes, or disconnect it when you no longer want the agent to audit that account.

<Note>
  Admin keys are stored encrypted and are only used to read usage, cost, and billing data from the provider. Dash.fi never uses them to make model calls on your behalf.
</Note>

## Prerequisites

* The AI Spend Agent must be enabled on your Dash.fi account. See [Overview](/integrations/ai-tokens).
* You need an **admin key** (not a regular API key) from each provider you want to connect. Only an account owner or admin on the provider side can generate one.

## Open the Configure modal

1. Sign in to [app.dash.fi](https://app.dash.fi).
2. Open **AI Spend Agent** from the agents list on your dashboard.
3. Click **Configure** in the top bar of the agent.

The Configure modal walks you through the connection in two steps: get the admin key from the provider console, then paste it into Dash.fi. Once you've connected at least one provider, opening Configure again lands you directly on the manage step for that provider.

## Connect Anthropic

<Steps>
  <Step title="Create an admin key in Anthropic">
    Sign in to the [Anthropic Console](https://console.anthropic.com/) and go to **Settings > Admin Keys**. Create a new admin key and copy it — it's shown only once.
  </Step>

  <Step title="Paste the key into Dash.fi">
    In the Configure modal, choose **Anthropic**, paste the admin key, and click **Connect**.
  </Step>

  <Step title="Wait for the first sync">
    The agent immediately fetches your recent usage. Overview, Usage, and the findings views populate as data lands — the first pass typically completes within a few minutes.
  </Step>
</Steps>

## Connect OpenAI

<Steps>
  <Step title="Create an admin key in OpenAI">
    Sign in to the [OpenAI Platform](https://platform.openai.com/) and go to **Settings > Admin Keys** (organization-level). Create a new admin key and copy it — it's shown only once.
  </Step>

  <Step title="Paste the key into Dash.fi">
    In the Configure modal, choose **OpenAI**, paste the admin key, and click **Connect**.
  </Step>

  <Step title="Wait for the first sync">
    The agent begins syncing usage as soon as the key is accepted.
  </Step>
</Steps>

<Tip>
  You can connect Anthropic and OpenAI at the same time. Findings and spend from both providers appear together across every view.
</Tip>

## Sync now

Usage refreshes automatically on the agent's own schedule. To pull the latest data on demand — for example, after a large spike or before opening a claim — click **Sync now** next to the connected provider in the Configure modal. The sync runs in the background; usage-based views refetch once it finishes.

## Refresh insights

**Sync now** brings in fresh usage data, but a separate audit pass produces findings and claims. Use **Refresh insights** (in the agent's top bar) to re-run the audit against the current usage and produce updated findings. The button shows an **Auditing…** state while the job runs, and refreshes the Action Plan and Recovery views the moment it finishes.

## Rotate a key

Rotate a key when the provider-side key is regenerated, revoked, or scheduled to expire. Rotating replaces the stored key without losing any historical data.

<Steps>
  <Step title="Create a new admin key">
    In the provider console, create a fresh admin key.
  </Step>

  <Step title="Open Configure in Dash.fi">
    Open the AI Spend Agent, click **Configure**, and select the connected provider.
  </Step>

  <Step title="Rotate">
    Click **Rotate**, paste the new admin key, and confirm.
  </Step>
</Steps>

## Disconnect a provider

Disconnecting stops the agent from pulling new usage from that provider. Historical usage and findings already synced remain visible in the dashboard.

<Steps>
  <Step title="Open Configure">
    Open the AI Spend Agent and click **Configure**.
  </Step>

  <Step title="Disconnect">
    Select the connected provider and click **Disconnect**. Confirm when prompted.
  </Step>
</Steps>

If you disconnect every provider, the agent falls back to its onboarding screen the next time you open it. Reconnecting later resumes syncs from the moment you connect — there's no back-fill for the disconnected window unless the provider itself retains that history.

## Troubleshooting

<AccordionGroup>
  <Accordion title="'A live connection already exists' when connecting">
    You already have an active key for that provider on your account. Use **Rotate** instead of **Connect** to replace it.
  </Accordion>

  <Accordion title="Usage or findings look empty after connecting">
    The initial sync can take a few minutes. If views are still empty after 10 minutes, click **Sync now**, then **Refresh insights**. If usage populates but findings don't, the agent may not have detected any issues in that window.
  </Accordion>

  <Accordion title="Connection status shows an error">
    A temporary read failure will show as an error banner rather than dropping you back to onboarding — your connection is still saved. Retry from the banner, or contact [support@dash.fi](mailto:support@dash.fi) if it persists.
  </Accordion>
</AccordionGroup>
