Anthropic Usage and Costs

Supported OS Linux Windows Mac OS

Intégration1.0.0
Cette page n'est pas encore disponible en français, sa traduction est en cours.
Si vous avez des questions ou des retours sur notre projet de traduction actuel, n'hésitez pas à nous contacter.

Overview

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:

  • Monitor LLM token consumption (input, output, cache usage) in near real-time
  • Track costs by model, workspace, and service tier, supporting accurate attribution and budgeting
  • Understand usage trends across teams, API keys, or users to optimize model usage
  • Set up alerting and dashboards that highlight anomalies in usage or unexpected cost spikes

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.

You can also see your Anthropic costs in Datadog Cloud Cost Management, 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?

Setup

To get started with the Anthropic Admin API integration in Datadog, follow the steps below:

1. Generate an Admin API Key

You will need an Admin API key from Anthropic. This key allows access to usage and cost reports across your organization.

  1. Navigate to your organization’s settings or reach out to your Anthropic account admin to create a new Admin API key.
  2. Copy the API key to a secure location.

2. Configure the Datadog Integration

  1. In Datadog, go to Integrations > Anthropic.
  2. In the configuration panel, provide the Admin API Key by pasting the key you generated from Anthropic.
  3. Click Save Configuration.

Once saved, Datadog will begin polling Anthropic usage and cost endpoints using this key and populate metrics in your environment.

Data Collected

Metrics

anthropic.cache_creation.ephemeral_1h_input_tokens
(gauge)
Input tokens used during ephemeral 1 hour cache creation.
Shown as token
anthropic.cache_creation.ephemeral_5m_input_tokens
(gauge)
Input tokens used during ephemeral 5 minute cache creation.
Shown as token
anthropic.cache_read_input_tokens
(gauge)
Input tokens retrieved from anthropic cache reads.
Shown as token
anthropic.input_tokens
(gauge)
Number of input tokens used in a request to Anthropic.
Shown as token
anthropic.output_tokens
(gauge)
Number of output tokens generated in a response from Anthropic.
Shown as token
anthropic.server_tool_use.web_search_requests
(count)
Number of web search requests triggered by server tool use in Anthropic.
Shown as request

Service Checks

Anthropic Usage and Costs does not include any service checks.

Events

Anthropic Usage and Costs does not include any events.

Troubleshooting

Need help? Contact Datadog support.