# Connect Anthropic

Costfluent reads your Claude API spend from Anthropic's cost report, through the Admin API, with an
Admin API key you create for it. One connection is one Anthropic organization, and the cost of
every workspace in it.

## How Costfluent connects

Anthropic has no read-only key and no token exchange, so Costfluent stores the Admin API key
encrypted and uses it for two calls only: which organization the key belongs to, and the daily cost
report. The organization becomes the connection's identity, and the key is only ever used for that
organization.

:::caution
An Admin API key cannot be scoped down: besides reading cost, it can manage the organization's
members, workspaces and keys. Create one for Costfluent alone, so you can revoke it without
touching anything else.
:::

## Prerequisites

1. The Owner or Integration owner organization role in Costfluent.
2. An Anthropic organization. Individual accounts have no Admin API.
3. An Admin API key, which only an organization admin can create, in the Claude Console under
   **Settings**, then **Admin keys**. It starts with `sk-ant-admin01-`.

## Connect

<Stepper>

1. Open **Settings**, then **Integrations**, select **Anthropic**, and open the **Connect** tab.
2. Select "Add Admin key" and paste the key into **Admin API key**.
3. Select "Test connection" to see each check, or "Connect" to save.

</Stepper>

Costfluent reads the key's organization and one day of the cost report before storing anything, so
a connection that saves can read your cost. A key of an organization that is already connected is
refused. If the cost report does not answer during that check, the connection is saved anyway and
checked again automatically.

## Data and freshness

Connecting imports as far back as your plan's cost history allows, and at most six months
([Manage connections](/connect/manage-connections#how-it-behaves)), as long as Anthropic reports
cost that far back. Cost arrives by UTC day, in US dollars, as Anthropic reports it.

:::note
Priority Tier usage is not in Anthropic's cost report, so it is not in Costfluent either.
:::

## Reporting dimensions

- **Account** is the workspace. Cost outside any workspace appears under `default`.
- **Service** is the model, such as `claude-sonnet-4-5-20250929`. Cost that belongs to no model,
  such as web search, appears under `Anthropic`.
- **SKU** is Anthropic's line item, such as `Claude Sonnet 4.5 Usage - Input Tokens`. The same line
  item at another service tier, context window or inference geography is a separate charge.
- The billing account is the organization ID, and the billing period is the calendar month.

## Update or disconnect

### After connecting

The **Manage** tab lists the connection by its **Organization ID**. Open the gear icon beside it to
see whether the cost report is still readable, which workspaces the connection feeds, and which
months have been imported. **Run checks** runs the checks again on request.

### Rotating or removing access

To rotate the key, create a new Admin API key in the same organization, select **Update
credentials** on the connection page, and paste it; then revoke the old key in the Claude Console.
A key of another organization is refused, because the connection's history belongs to its
organization: connect that organization as a new connection instead.

To retire the connection, remove it in Costfluent and revoke its key in the Claude Console. Removing
it erases the cost it imported
([Remove a connection](/connect/manage-connections#remove-a-connection)).

## Troubleshooting

- **Anthropic refused this key.** The key is not an Admin API key, or it was revoked. Create an
  Admin API key under the organization's settings; an ordinary API key starts with `sk-ant-api`
  instead and cannot read cost.
- **Anthropic refused the cost report for this key.** The key belongs to an organization whose cost
  it cannot read. Use an Admin API key of the organization whose spend you want to see.
- **This key belongs to another organization.** Shown when updating credentials. Connect that
  organization as a new connection.
