Skip to content

Commit 106b991

Browse files
committed
README changes to add analytics information
1 parent be9e138 commit 106b991

1 file changed

Lines changed: 26 additions & 11 deletions

File tree

anthropic_usage_and_costs/README.md

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,51 @@
22

33
## Overview
44

5-
Datadog's Anthropic Usage and Costs integration allows you to get visibility into your Anthropic usage and associated costs. By ingesting data from Anthropic's newly released Admin usage and cost API, this integration enables your teams to:
5+
Datadog's Anthropic Usage and Costs integration allows you to get visibility into your Anthropic usage and associated costs. By ingesting data from Anthropic's Admin and Analytics usage and cost APIs, this integration enables your teams to:
66

77
- **Monitor LLM token consumption** (input, output, cache usage) in near real-time
88
- **Track costs** by model, workspace, and service tier, supporting accurate attribution and budgeting
9+
- **Attribute usage and spend to individual users** (Enterprise plans) — break down token consumption and dollar cost by user, product (API, Claude Code, Claude.ai), context window, inference geography, and speed
910
- **Understand usage trends** across teams, API keys, or users to optimize model usage
1011
- **Set up alerting and dashboards** that highlight anomalies in usage or unexpected cost spikes
1112

1213
This integration is especially valuable for teams using Anthropic at scale who want to manage spend, understand product adoption, and ensure efficient use of AI resources-all within Datadog. With this data you will be able to introduce and validate optimization strategies to get the best out of Anthropic.
1314

14-
You can also see your Anthropic costs in Datadog [Cloud Cost Management][6], allowing you to answer key questions: Which models or workspaces are generating the most cost? Are workloads using the right service tier (Standard, Batch, or Priority)? Are teams effectively using caching or ephemeral sessions? What's the cost breakdown between Claude Opus and Claude Sonnet?
15+
You can also see your Anthropic costs in Datadog [Cloud Cost Management][6], allowing you to answer key questions: Which models or workspaces are generating the most cost? Which users or teams are driving the most spend? Are workloads using the right service tier (Standard, Batch, or Priority)? Are teams effectively using caching or ephemeral sessions? What's the cost breakdown between Claude Opus and Claude Sonnet?
1516

1617
**Minimum Agent version:** 7.69.0
1718

1819
## Setup
1920

20-
To get started with the Anthropic Admin API integration in Datadog, follow the steps below:
21+
To get started with the Anthropic integration in Datadog, follow the steps below:
2122

22-
### 1. Generate an Admin API Key
23+
### 1. Choose the right API key for your needs
2324

24-
You will need an [Admin API key][5] from Anthropic. This key allows access to usage and cost reports across your organization.
25+
This integration supports two types of Anthropic API keys. Pick the one that matches the data you want to ingest:
2526

26-
1. Navigate to your organization's settings or reach out to your Anthropic account admin to create a new Admin API key.
27-
2. Copy the API key to a secure location.
27+
| Key type | Data ingested | Best for |
28+
| --- | --- | --- |
29+
| **Admin API key** | Organization-wide usage and cost, broken down by model, workspace, API key, and service tier. | All Anthropic organizations that want org-level visibility into spend and token consumption. |
30+
| **Analytics API key** (Enterprise) | Per-user usage and cost, broken down by user, product (API, Claude Code, Claude.ai), model, context window, inference geography, and speed. | Enterprise organizations that need user-level attribution of usage and spend, including chargeback and team-level reporting. |
2831

29-
### 2. Configure the Datadog Integration
32+
You can configure either key type — or one of each on separate accounts — depending on the level of granularity your teams require. Per-user cost data from the Analytics API is available starting **January 1, 2026**.
33+
34+
### 2. Generate your Anthropic API key
35+
36+
You will need either an [Admin API key][5] or an [Analytics API key][7] from Anthropic. Both are created from your Anthropic organization settings.
37+
38+
1. Navigate to your organization's settings in the Anthropic Console, or reach out to your Anthropic account admin.
39+
2. Create a new **Admin API key** for org-wide reporting, or a new **Analytics API key** (with the `read:analytics` scope) for per-user reporting. Analytics keys are available on Enterprise plans and must be provisioned by your organization's **Primary Owner** at [claude.ai/analytics/api-keys][7].
40+
3. Copy the API key to a secure location.
41+
42+
### 3. Configure the Datadog Integration
3043

3144
1. In Datadog, go to [**Integrations > Anthropic Usage and Costs**](https://app.datadoghq.com/integrations?integrationId=anthropic-usage-and-costs).
32-
2. In the configuration panel, provide the **Admin API Key** by pasting the key you generated from Anthropic.
33-
3. Click **Save Configuration**.
45+
2. In the configuration panel, paste your **Admin API Key** or **Analytics API Key** into the API key field. Datadog automatically detects the key type and ingests the appropriate usage and cost data.
46+
3. (Optional) Enable **Cost data ingestion** to send cost data to [Cloud Cost Management][6]. This requires Cloud Cost Management to be enabled on your Datadog account.
47+
4. Click **Save Configuration**.
3448

35-
Once saved, Datadog will begin polling Anthropic usage and cost endpoints using this key and populate metrics in your environment.
49+
Once saved, Datadog will begin polling the appropriate Anthropic usage and cost endpoints and populate metrics in your environment. Usage metrics typically appear within 10 minutes, and cost data appears in Cloud Cost Management within 24 hours.
3650

3751
## Data Collected
3852

@@ -58,3 +72,4 @@ Need help? Contact [Datadog support][3].
5872
[4]: https://github.com/DataDog/integrations-core/blob/master/anthropic_usage_and_costs/metadata.csv
5973
[5]: https://docs.anthropic.com/en/api/administration-api
6074
[6]: /cost
75+
[7]: https://claude.ai/analytics/api-keys

0 commit comments

Comments
 (0)