Help build the future of open source observability software Open positions

Check out the open source projects we support Downloads

The actually useful free plan

Grafana Cloud Free Tier
check

10k series Prometheus metrics

check

50GB logs, 50GB traces, 50GB profiles

check

500VUk k6 testing

check

20+ Enterprise data source plugins

check

100+ pre-built solutions

Featured webinar

Getting started with grafana LGTM stack

Getting started with managing your metrics, logs, and traces using Grafana

Learn how to unify, correlate, and visualize data with dashboards using Grafana.

How to monitor Claude usage and costs: introducing the Anthropic integration for Grafana Cloud

How to monitor Claude usage and costs: introducing the Anthropic integration for Grafana Cloud

2025-08-19 5 min

Generative AI is becoming a core part of modern applications, making it essential to monitor and manage how these services are used.

That’s why, today, we’re excited to introduce the Anthropic integration for Grafana Cloud, a new solution that lets you connect directly to the Anthropic Usage and Cost API from within Grafana Cloud.

By leveraging usage data from Anthropic — the AI company who developed the Claude large language models (LLMs) — the integration provides real-time insights into both the costs and performance of your Claude LLMs, all within Grafana Cloud. And with a pre-built dashboard and alerts, you can start visualizing and acting on your Claude data right away. 

In this post, we’ll take a closer look at the key features of the integration and walk through how to get started.

First, why monitor your Claude usage in Grafana Cloud?

As LLM usage grows across your organization, monitoring that usage becomes critical to optimize performance, minimize resource waste, and keep costs in check. Monitoring your Claude usage within Grafana Cloud offers these and other benefits, including:

  • Accurate billing insights: Retrieve actual provider-calculated costs directly from the Usage and Cost API for precise, discrepancy-free billing visibility.
  • Token usage analysis: Visualize how many input and output tokens each model processes to optimize resource allocation and manage quotas.
  • Model performance analysis: Identify which Claude models are used most often to optimize your model selection strategy.
  • Capacity planning: Discover usage trends like peak hours or request growth to aid in future planning.

How the integration works

This collector-less integration (built on the Grafana Cloud Metrics Endpoint feature) pulls usage data directly from the Usage and Cost API, converts it into Prometheus-format metrics, and stores it in Grafana Cloud. You simply enter your Anthropic Admin API key in the integration settings — no additional agents or exporters required. 

Once enabled, Grafana Cloud starts to collect metrics automatically and provides a pre-built dashboard and alerts for instant visibility (more on that below). The raw usage data is transformed into two core Prometheus metrics:

  • gen_ai_cost: reports cost per workspace
  • gen_ai_usage_tokens_total: counts tokens consumed

Each metric uses Prometheus labeling to capture context: for example, every metric series is labeled by its job name (the scrape configuration name) and gen_ai_anthropic_workspace_id (the Anthropic workspace). The tokens metric also has gen_ai_response_model (the Claude model used), gen_ai_token_type (input vs. output), and gen_ai_anthropic_service_tier (service tier). Because the Anthropic API directly provides usage data, it already outputs figures in a Prometheus-friendly way, so no external exporter or agent is needed. This makes the integration truly “collector-less”: Grafana Cloud handles the HTTP fetch and parsing behind the scenes.

Key features: dashboards and alerts

A pre-built dashboard for monitoring usage and cost

The Anthropic integration for Grafana Cloud includes a pre-built API usage dashboard that allows you to quickly and easily track token consumption and costs, model usage, and more.

Grafana Cloud dashboard displaying token consumption and model usage data with graphs and charts.
Interactive panels display:

  • Total token cost with threshold indicators
  • Tokens consumed by workspace
  • Model usage distribution
  • Performance metrics with trends over time

Grafana Cloud dashboard displaying Anthropic API usage and costs on interactive panels.
All panels feature template variables, allowing you to dynamically filter by data source, job name, workspace, and model. 

Customizable alert rules

The integration also provides three ready-to-use, customizable alerts to stay ahead of unexpected usage and cost spikes:

  • AnthropicDailyCostSpike: Triggers when the daily cost increases by more than 50% compared to the previous day.
  • AnthropicTokenRateAnomaly: Alerts when token processing rate exceeds 3x the 7-day average.
  • AnthropicHighCostThreshold: Fires when total daily cost exceeds $1000.

Setup guide

To start using the Anthropic integration for Grafana Cloud, follow these steps:

  1. Access Grafana Cloud
    • Log into your Grafana Cloud account. (If you don’t already have one, you can sign up for the Grafana Cloud free tier today.)
    • Navigate to Connections in the left-hand menu.
  2. Configure the integration
    • Locate the Anthropic integration tile, and click it to start configuration.
  3. Set up scrape job
    • Give your scrape job a descriptive name.
    • Enter your Anthropic Admin API key for authentication. Note: this is different from the standard Message API key, and you need to be an org admin to create one.
  4. Save and install
    • Save the job configuration.
    • Grafana Cloud will immediately start scraping metrics.

Click Install to automatically add pre-built dashboards and alerts.

That’s it! Grafana Cloud will begin collecting your usage metrics every minute.

Note: If metrics aren’t appearing, verify your Anthropic Admin API key has the correct permissions and that the API endpoint URL is accessible. Check that your scrape job is running successfully in the Grafana Cloud Connections interface, and ensure your Anthropic workspace IDs match the labels in your metrics.

Next steps and how to learn more 

After setup, here are a few ways you can leverage the integration beyond the pre-built dashboard and alerts for even deeper visibility into your Claude usage and costs.

Optimization strategies

Use the dashboard insights to identify optimization opportunities based on your usage patterns. For example, you could monitor token efficiency by model to determine which Claude variants work best for specific tasks. 

You can also track input vs. output token ratios to optimize your prompts for better efficiency, and leverage workspace-level visibility to implement cost allocation and budget controls across different teams or projects.

Custom monitoring

Beyond the pre-built dashboard, you can create custom panels using the core gen_ai_cost and gen_ai_usage_tokens_total metrics. Build application-specific views by filtering on your job names, create executive summary reports showing cost trends and usage growth, or set up specialized alerts for specific models or service tiers that matter most to your operations.

To learn more about the new Anthropic integration for Grafana Cloud, please check out our technical docs.