You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: anthropic_usage_and_costs/README.md
+26-11Lines changed: 26 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,37 +2,51 @@
2
2
3
3
## Overview
4
4
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:
6
6
7
7
-**Monitor LLM token consumption** (input, output, cache usage) in near real-time
8
8
-**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
9
10
-**Understand usage trends** across teams, API keys, or users to optimize model usage
10
11
-**Set up alerting and dashboards** that highlight anomalies in usage or unexpected cost spikes
11
12
12
13
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.
13
14
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?
15
16
16
17
**Minimum Agent version:** 7.69.0
17
18
18
19
## Setup
19
20
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:
21
22
22
-
### 1. Generate an Admin API Key
23
+
### 1. Choose the right API key for your needs
23
24
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:
25
26
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. |
28
31
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
30
43
31
44
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**.
34
48
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.
36
50
37
51
## Data Collected
38
52
@@ -58,3 +72,4 @@ Need help? Contact [Datadog support][3].
0 commit comments