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

# Claude

Discover users, track token usage, and monitor Claude and Claude Code activity across your organization via the Anthropic Admin API

Claude is Anthropic's AI assistant, used by organizations for coding, writing, analysis, and automation. Claude Code is Anthropic's agentic coding tool for software engineers. Connecting Claude to Harmony via the Anthropic Admin API gives IT teams visibility into AI tool adoption and spend - tracking who is using Claude and Claude Code and how much token capacity they're consuming.

#### What the Claude integration enables

| Capability             | Description                                                                                                              |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| User Discovery         | Surface all Claude users in Harmony's software inventory, including every organization member and accepted invited users |
| Token Usage Tracking   | Monitor per-user token consumption across Claude and Claude Code                                                         |
| Cost Visibility        | See estimated USD spend broken down by user and by individual API key                                                    |
| Usage Activity         | Track daily per-user usage to identify seats with no recent activity                                                     |
| Multi-Instance Support | Connect multiple Anthropic organizations if needed                                                                       |

#### Prerequisites

* **Console connection**: An **admin** of the Anthropic organization, to create an Admin API key (starting with `sk-ant-admin01-`)
* **Claude Enterprise connection**: The Claude Enterprise organization's **primary owner**, to enable API access and create an Analytics API key (starting with `sk-ant-api01-`)
* **Harmony Account**: Active Harmony workspace

{% hint style="warning" %}
Harmony supports two Anthropic key types, and the key you paste must match the **Key Type** you select:

* **Console (Admin API)** - an Admin API key starting with `sk-ant-admin01-`
* **Enterprise Analytics** - an Analytics API key starting with `sk-ant-api01-`, created in claude.ai and carrying the `read:analytics` scope

The two key types are not interchangeable: an Admin API key cannot call the Claude Enterprise Analytics API, and an Analytics API key cannot call the Admin API.
{% endhint %}

#### Connect Claude to Harmony

**Step 1: Generate an API Key**

**Option A - Claude Console (Admin API key)**

1. Go to [Claude Console](https://platform.claude.com) and sign in as an organization **admin**
2. Navigate to **Settings** > **Admin keys**
3. Click **Create key**, enter a name (e.g. `Harmony Integration`), and choose a key expiration
4. Click **Create**
5. Copy the key - it starts with `sk-ant-admin01-` and is shown only once

Console Admin keys have no selectable scopes; every key carries full access to the endpoints that accept Admin API keys.

**Option B - Claude Enterprise (Analytics API key)**

1. Go to [claude.ai](https://claude.ai) and sign in as the organization's **primary owner**
2. Navigate to **Organization settings** > **API** and enable public API access
3. In the **Keys** section, click **+ Create key**, name it, and select the `read:analytics` scope
4. Copy the key - it starts with `sk-ant-api01-` and is shown only once

**Step 2: Navigate to Integrations**

1. Log in to your Harmony dashboard
2. Go to **Settings** > **Integrations**
3. Find **Claude** under **SaaS Applications** and click **Connect**

**Step 3: Enter Credentials**

1. Select the **Key Type** - **Console (Admin API)** or **Enterprise Analytics**
2. Paste your **API key**
3. Click **Connect**

Harmony validates the key format against the selected key type when you click **Connect**. If the key does not match - for example, a standard API key entered as a Console key - the connection is rejected with an error instead of being saved, preventing silent misconfigurations that could cause the integration to fail after setup.

{% hint style="info" %}
For organizations with multiple Anthropic accounts, you can add multiple instances by repeating this process for each account.
{% endhint %}

#### How Claude instances appear in Harmony

If you have both a Console connection and a Claude Enterprise Analytics connection, Harmony distinguishes between them clearly in your inventory:

* Your Console connection is labeled **Claude**
* Your Claude Enterprise Analytics connection is labeled **Claude.ai Enterprise**

Both instances are grouped together under a single Claude application card. No configuration changes are needed - existing connections update automatically.

#### What Harmony Syncs

**From Anthropic:**

* Users - name, email, and organization role from a Console connection; email only from an Enterprise Analytics connection
* Per-user token consumption (Claude and Claude Code)
* Per-API-key usage and estimated USD cost
* Daily per-user usage activity - Harmony does not sync sign-in or login events
* The Anthropic organization each user belongs to, and the workspace name recorded on each API key

**User visibility**

Harmony pulls in your complete Anthropic user base from two sources:

* **Organization members** - sourced from Anthropic's users endpoint, which returns every member of the organization along with their role
* **Accepted invited users** - sourced from Anthropic's invites endpoint

Pending invites are excluded, as are invited users without an email address. Together, these two sources reflect your full Claude user base in Harmony.

**API key usage and cost breakdown**

Claude API usage and estimated USD cost are tracked per individual API key, giving you granular visibility into how each key consumes your Anthropic budget. Each key is reported with its name and owner (email and display name). Costs are derived from Anthropic's rate table across model, service tier, context window, inference geography, and token type, reconciling to your organization's total spend.

Previously, cost data was only available at the organization level - now you can see exactly which keys are driving usage.

**Estimated cost on instance users table**

The **Estimated Cost** column on the instance users table shows each user's total estimated USD spend, sortable ascending or descending. Hovering over a cost cell shows a tooltip that breaks down spend by Claude model, rounded to two decimal places.

#### Use Cases

<details>

<summary>AI Spend Management</summary>

Track token usage and estimated USD cost per user, per API key, and per team to allocate Claude costs accurately and forecast spend

</details>

<details>

<summary>Claude Code Adoption</summary>

Measure Claude Code usage across engineering teams to understand developer AI tool adoption

</details>

<details>

<summary>License Reclamation</summary>

Identify inactive Claude users and reclaim seats to optimize subscription costs

</details>

<details>

<summary>Offboarding</summary>

Confirm Claude access has been revoked when employees leave, as part of Harmony offboarding workflows

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.harmony.io/integrations/ai/claude.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
