Skip to main content
Upcoming Webinar:

Getting Started with OpenObserve.

December 03, 2026.
11:00 AM ET.
Register

Anthropic Token Usage Dashboard (2027): Track Claude Tokens & Cost

Md Mosaraf
Md Mosaraf.
November 30, 2026.
19 min read.
Don't forget to share!
TwitterLinkedInFacebook

Ready to get started?

Try OpenObserve Cloud today for more efficient and performant observability.

Anthropic token usage dashboard showing Claude API tokens and cost by model in OpenObserve

Anthropic token usage is the count of input, output, and prompt cache tokens each Claude API request consumes, and it is what your Anthropic bill is calculated from. To track it per model, feature, and user, instrument the Anthropic SDK with OpenTelemetry, send the spans to OpenObserve, and build a Claude usage dashboard with spend alerts.

TL;DR

  • Anthropic reports four token counts per request: input_tokens, output_tokens, cache_creation_input_tokens, and cache_read_input_tokens, and each is billed at a different rate.
  • The Claude Console groups usage by workspace, API key, and model, so it cannot tell you which feature or customer drove a spike.
  • OpenTelemetry instrumentation adds that context: every Claude call becomes a span with tokens, cost, latency, and your own attributes.
  • OpenObserve turns those spans into an Anthropic usage dashboard with cost by model, cache hit rate, and per-feature spend, plus alerts when spend jumps.
  • The dashboard is only the start: OpenObserve also shows cost per Claude session and turn, scores answer quality with LLM evaluations, and answers spend questions in natural language through its AI Assistant and MCP server.

What is Anthropic token usage?

Anthropic token usage is the set of token counts the Messages API returns in the usage object of every response. Claude models read and write text as tokens, and Anthropic bills each token type at its own per-million-token (MTok) rate.

Field. What it counts. How it is billed.
input_tokens. Input tokens not read from or written to the prompt cache. Base input price.
cache_creation_input_tokens. Input tokens written to the prompt cache. 1.25x base input for a 5-minute cache, 2x for a 1-hour cache.
cache_read_input_tokens. Input tokens served from the prompt cache. A fraction of base input (0.05x on Claude Opus 5.5 and Sonnet 5.5).
output_tokens. Tokens Claude generated, including thinking. Output price.

Total input for a request is input_tokens + cache_creation_input_tokens + cache_read_input_tokens. If you only sum input_tokens, a well-cached application looks far smaller than it is. You can check the counts on any response:.

response = client.messages.create(
    model="claude-sonnet-5-5",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Summarize this incident report."}],
)
print(response.usage.input_tokens)
print(response.usage.cache_creation_input_tokens)
print(response.usage.cache_read_input_tokens)
print(response.usage.output_tokens)

How does Anthropic bill Claude API tokens?

Each model has a base input price, cache write prices, a cache read price, and an output price, all per million tokens. These are the current Claude models (Source: Anthropic pricing documentation, November 2026):.

Model. Base input. 5-min cache write. 1-hour cache write. Cache read. Output.
Claude Fable 5.2. $8 / MTok. $10 / MTok. $16 / MTok. $0.20 / MTok. $40 / MTok.
Claude Opus 5.5. $4 / MTok. $5 / MTok. $8 / MTok. $0.20 / MTok. $20 / MTok.
Claude Sonnet 5.5. $2 / MTok. $2.50 / MTok. $4 / MTok. $0.10 / MTok. $10 / MTok.
Claude Haiku 5.5 (prompts up to 100K tokens). $0.10 / MTok. $0.125 / MTok. $0.20 / MTok. $0.01 / MTok. $0.50 / MTok.

Claude Haiku 5.5 prompts over 100,000 tokens are billed at higher rates ($0.50 input and $2.50 output per MTok). The Batch API halves both input and output prices, and setting inference_geo: "us" adds a 1.1x multiplier on Claude 4.6 and later models. Output tokens cost five times more than base input on every model above, so long responses and heavy thinking move the bill more than long prompts do.

How much does Anthropic prompt caching save?

Take a support assistant on Claude Sonnet 5.5 that sends the same 50,000-token system prompt with each of 1,000 requests, close enough together that the 5-minute cache stays warm. Without caching, that prompt is 50 million base input tokens. With caching, it is one 50,000-token cache write and 999 cache reads.

That saving only appears if requests actually hit the cache. A timestamp in the system prompt or a tool list that changes order silently breaks it, which is why cache hit rate belongs on your Anthropic dashboard.

Where can you see Anthropic usage today?

Anthropic gives you three places to look, each with a different level of detail:.

  1. The Claude Console Usage and Cost pages show organization usage and spend, filterable by workspace, API key, and model.
  2. The Usage and Cost Admin API (/v1/organizations/usage_report/messages and /v1/organizations/cost_report) returns the same data in 1m, 1h, or 1d buckets with an Admin API key. Anthropic says data typically appears within 5 minutes and supports polling about once a minute (Source: Anthropic Usage and Cost API documentation, November 2026).
  3. The usage object on each response, which your own code has to log somewhere.

The first two answer "how much did the organization spend on which model". They can't tell you which feature, tenant, prompt version, or user drove the spend, because that context lives in your application, not in Anthropic's billing system.

Why build your own Claude usage dashboard?

A Claude usage dashboard built on your own telemetry answers the questions finance and engineering actually ask:.

  • Which feature is expensive? Spend grouped by an app.feature attribute instead of by API key.
  • Which customer is expensive? Spend per tenant, for pricing and fair-use decisions.
  • Is caching working? Cache hit rate per service, so a broken cache prefix shows up the same day.
  • Did the last release change cost? Tokens per request before and after a deploy, next to latency and errors.
  • Is something running away? An alert when hourly spend crosses a threshold, not a surprise at month end.

For a broader look at LLM spend across providers, see the LLM cost monitoring guide.

How to build an Anthropic token usage dashboard in OpenObserve

OpenObserve is an open-source (AGPL-3.0) observability platform that stores logs, metrics, and traces, and it reads OpenTelemetry GenAI spans natively. When a span carries a Claude model name and token counts, OpenObserve computes its cost at ingestion and shows it in AI Insights and in any dashboard you build.

Prerequisites for tracking Anthropic token usage

  • Python 3.8 or later and an Anthropic API key.
  • An OpenObserve organization on OpenObserve Cloud or a self-hosted deployment.
  • Your OpenObserve organization ID and a Base64-encoded email:password auth token.

Step 1: Install the Anthropic SDK OpenTelemetry instrumentation

pip install openobserve-telemetry-sdk opentelemetry-instrumentation-anthropic python-dotenv

Create a .env file with your endpoint and credentials:.

OPENOBSERVE_URL=https://<O2_ENDPOINT>/
OPENOBSERVE_ORG=<O2_ORG>
OPENOBSERVE_AUTH_TOKEN="Basic <BASE64_AUTH>"
ANTHROPIC_API_KEY=<ANTHROPIC_API_KEY>

Step 2: Instrument the Anthropic client to capture token usage

Call AnthropicInstrumentor().instrument() before you create any Anthropic client, as the Anthropic Python integration docs describe. Every messages.create and messages.stream call then produces a span.

from opentelemetry.instrumentation.anthropic import AnthropicInstrumentor
from openobserve import openobserve_init

AnthropicInstrumentor().instrument()
openobserve_init()

from anthropic import Anthropic

client = Anthropic()

For Node.js services, the Anthropic JavaScript integration does the same with the TypeScript SDK.

Step 3: Tag Claude API calls with feature and customer attributes

Token counts alone don't explain cost. Wrap each Claude call in a parent span that carries the business context you want to group by:.

from opentelemetry import trace

tracer = trace.get_tracer("support-assistant")

def summarize_ticket(ticket_text: str, tenant_id: str) -> str:
    with tracer.start_as_current_span(
        "summarize_ticket",
        attributes={"app.feature": "ticket_summary", "app.tenant_id": tenant_id},
    ):
        response = client.messages.create(
            model="claude-sonnet-5-5",
            max_tokens=1024,
            system=[{"type": "text", "text": SUPPORT_PLAYBOOK, "cache_control": {"type": "ephemeral"}}],
            messages=[{"role": "user", "content": ticket_text}],
        )
        return response.content[0].text

The cache_control block caches the long playbook prompt, so you can watch cache_read_input_tokens climb once traffic arrives. OpenObserve stores dotted attribute names with underscores, so app.feature becomes the app_feature field.

Step 4: Verify Claude token usage spans in Traces

Open Traces, pick your traces stream, and click a Claude span. The span shows the model, gen_ai_usage_input_tokens, gen_ai_usage_output_tokens, the two cache token fields, latency, and the computed cost.

OpenObserve LLM trace for a support agent with an llm.anthropic Sonnet span showing 6,204 tokens, the input and output messages, the span cost, and a faithfulness score, next to a slow Postgres lock wait span in the same trace

Because the Claude span sits inside the full request trace, you can see when a slow or expensive request was really caused by something else, such as the database wait in the trace above.

Field in OpenObserve. Meaning.
gen_ai_response_model. Claude model that served the request.
gen_ai_usage_input_tokens. Uncached input tokens.
gen_ai_usage_output_tokens. Output tokens.
gen_ai_usage_cache_creation_input_tokens. Tokens written to the prompt cache.
gen_ai_usage_cache_read_input_tokens. Tokens read from the prompt cache.
gen_ai_usage_cost. Cost of the call in USD, computed by Model Pricing.
duration. Request latency in microseconds.

Cost comes from Model Pricing, which matches the model name against a built-in catalog. If you have negotiated rates, add a custom pricing definition for (?i)^claude and it takes priority over the catalog.

Step 5: View Claude API cost and tokens in AI Insights

Go to AI > Monitor > Insights and choose your traces stream. With no extra setup you get Total Cost, Total Tokens, P95 Latency, and Error Rate tiles, plus cost and token trends by model, as the LLM monitoring docs describe.

OpenObserve AI Insights showing total cost, total tokens, and cost and token trends by model, including Claude Sonnet, Haiku, and Opus models

Step 6: Import the AI LLM Apps dashboard for Claude usage

For a dashboard you can extend, import the AI LLM Apps dashboard from the OpenObserve dashboards repository. Download AI LLM Apps.dashboard.json, open Dashboards, click Import, and upload the file. If your traces stream isn't named default, change the stream name in each panel query.

The dashboard has an Overview tab (calls, cost, tokens, error rate, p95 latency, cost by model over time) and a Models, services, tools tab (model leaderboard, cost per model and per service, tool calls, and recent failed spans). Its Model variable lets you select only Claude models.

Which panels belong on an Anthropic usage dashboard?

The imported dashboard covers every provider. Add these Claude-specific panels with Add Panel and a custom SQL query; each one filters on gen_ai_response_model LIKE 'claude%'.

Claude spend by feature panel

A horizontal bar chart that ranks features by cost:.

SELECT app_feature AS feature,
       SUM(gen_ai_usage_cost) AS cost_usd
FROM "default"
WHERE gen_ai_response_model LIKE 'claude%'
GROUP BY feature
ORDER BY cost_usd DESC

Prompt cache hit rate panel

A line chart of the share of all input tokens that came from the cache:.

SELECT histogram(_timestamp) AS ts,
       100.0 * SUM(gen_ai_usage_cache_read_input_tokens)
         / NULLIF(SUM(gen_ai_usage_input_tokens
                    + gen_ai_usage_cache_read_input_tokens
                    + gen_ai_usage_cache_creation_input_tokens), 0) AS cache_hit_pct
FROM "default"
WHERE gen_ai_response_model LIKE 'claude%'
GROUP BY ts
ORDER BY ts

Top tenants by Claude spend panel

A table of the customers who drive the most Claude usage:.

SELECT app_tenant_id AS tenant,
       COUNT(*) AS calls,
       SUM(gen_ai_usage_input_tokens + gen_ai_usage_cache_read_input_tokens
           + gen_ai_usage_cache_creation_input_tokens) AS input_tokens,
       SUM(gen_ai_usage_output_tokens) AS output_tokens,
       SUM(gen_ai_usage_cost) AS cost_usd
FROM "default"
WHERE gen_ai_response_model LIKE 'claude%'
GROUP BY tenant
ORDER BY cost_usd DESC
LIMIT 20

Output tokens per request by model panel

A line chart that catches a prompt change that makes Claude more verbose:.

SELECT histogram(_timestamp) AS ts,
       gen_ai_response_model AS model,
       AVG(gen_ai_usage_output_tokens) AS avg_output_tokens
FROM "default"
WHERE gen_ai_response_model LIKE 'claude%'
GROUP BY ts, model
ORDER BY ts

Add Feature and Tenant filters to the Claude dashboard

OpenObserve dashboards support variables, so you can add a Feature or Tenant dropdown that filters every panel at once.

Each panel can also have a drilldown: click a costly feature or tenant and jump to a filtered dashboard, a URL, or the matching logs and traces.

OpenObserve dashboard panel editor with the Create Drilldown dialog, linking a panel to another dashboard, a URL, or logs, and passing the current variables

How do you alert on Anthropic spend spikes?

Create a scheduled alert on your traces stream in SQL mode that runs every 15 minutes over the last hour:.

SELECT SUM(gen_ai_usage_cost) AS hourly_cost
FROM "default"
WHERE gen_ai_response_model LIKE 'claude%'

OpenObserve alert builder with Scheduled, Realtime, Anomalies, and Composite alert types, aggregation conditions, a preview chart showing whether the alert would trigger, and a plain-language summary of the rule

Set the condition to hourly_cost > 50 (or whatever an abnormal hour looks like for you) and send it to a Slack, email, or webhook destination. The Settings section sets the look-back window, a cooldown period so one bad hour doesn't page you repeatedly, the destination, and whether the alert also opens an incident.

OpenObserve alert settings showing the look-back window, cooldown period, a Slack alert destination, the Creates Incident toggle, and a preview that confirms the alert would trigger

A second alert on cache hit rate dropping below, say, 50% catches a broken cache prefix before it shows up as cost. If you don't know what a normal hour costs yet, the Anomalies alert type learns the usual pattern and fires when spend breaks from it; see our AI anomaly detection guide. For how a token spike looks when you trace it back to the session that caused it, read tracing a runaway LLM token spike.

Anthropic usage dashboard vs the Claude Console usage page

Question. Claude Console / Usage API. OpenObserve dashboard on instrumented spans.
Spend by model and workspace. Yes. Yes.
Spend by feature, tenant, or user. No. Yes, from your span attributes.
Prompt cache hit rate. Token totals by type. Hit rate per service and feature, over time.
Latency and errors next to cost. No. Yes, on the same span.
Link a costly call to its trace. No. Yes, click through to the full trace.
Data freshness. Typically within 5 minutes. As each request completes.
Alerts on spend. Not published. Scheduled and real-time alerts.
Reconciles with your invoice. Yes, it is the billing source. Close, based on Model Pricing rates.

Use the Console as the billing source of truth and the OpenObserve dashboard for the operational questions. The two together let finance reconcile and engineering act.

How can you reduce Anthropic token costs?

Once the dashboard shows where tokens go, these are the levers with the biggest effect:.

  1. Cache long, stable prompt prefixes. Put system prompts, tool definitions, and reference documents before a cache_control breakpoint, and keep anything that changes per request after it.
  2. Use the Batch API for work that can wait. Batch requests cost half the standard input and output price.
  3. Match the model to the task. Claude Haiku 5.5 costs $0.10 per million input tokens against $4 for Claude Opus 5.5, so routing classification or extraction to Haiku cuts that traffic's cost sharply.
  4. Cap output. Output costs five times base input, so set max_tokens to what the feature needs and lower effort where quality holds.
  5. Watch tokens per request after every release. A prompt edit that doubles average output tokens doubles that feature's cost; the output-tokens panel catches it.

Can you track Claude Code usage in the same dashboard?

Yes. Claude Code can export OpenTelemetry telemetry, and OpenObserve's Claude Code tracing integration captures tokens and cost per session. Send it to the same organization and filter the panels above on the Claude Code service to see coding-agent spend next to your application spend. The guide to monitoring Claude Code usage walks through the setup, and Claude Agent SDK observability covers agents you build yourself.

If you also call OpenAI, the OpenAI API cost monitoring guide uses the same span fields, so one dashboard can compare providers side by side.

What other OpenObserve features help you control Claude costs?

A dashboard tells you how much Claude costs. These OpenObserve features tell you why, whether the spend was worth it, and what to do next, all on the same Claude spans.

See Claude cost, tokens, and cache impact per session

AI > Sessions groups every Claude call in a conversation or agent run. The session view shows turns, errors, duration, total cost, tokens, and how much prompt caching saved, plus a cost ribbon per turn and Cost Hotspots and Tool Hotspots lists, so you can see which turn or tool call burned the budget.

OpenObserve AI session view showing a 3-turn session with total cost, tokens with 96% cached, cache impact savings, a per-turn cost ribbon, cost hotspots by turn, and tool hotspots

Evaluate Claude answer quality next to its cost

Cheaper isn't better if the answers get worse. OpenObserve's LLM evaluations score Claude spans, traces, and sessions with scorers such as answer relevance, hallucination, toxicity, and instruction following, and the Quality page tracks each score's health over time along with the cost of running the evaluations themselves. Check quality whenever you move traffic to a smaller model or trim a prompt. Our guide to LLM evals vs observability explains how the two fit together.

OpenObserve AI Observability Quality page listing score configs such as answer relevance, hallucination, bias, toxicity, and instruction following with health status, quality score, volume trend, and evaluation cost

Test a cheaper Claude model with experiments before you switch

Before moving traffic from Claude Opus 5.5 to Sonnet 5.5 or Haiku 5.5, run an experiment: replay a dataset of real prompts against the new model or prompt, score each answer, and compare latency, cost, and quality side by side. Rows where repeated trials disagree are flagged as high-dispersion cases, so you can review the answers most likely to change.

OpenObserve AI experiment run on a dataset showing P50 latency, total cost, high-dispersion cases, progress, and scoring, with per-input trial results and a policy compliance scorer

Review Claude responses in an annotation queue

Automated scores don't catch everything. Annotation queues let your team review Claude traces one by one, see the input, output, and system scores, add their own score and comment, and send good examples to a dataset for future experiments.

OpenObserve annotation queue showing a Claude trace with its input and output, an automatic answer relevance score, and a reviewer scoring panel with comments and a Distill To Dataset option

Ask about Claude spend in natural language

You don't have to write SQL to answer "which feature spent the most on Claude yesterday?". The OpenObserve AI Assistant writes SQL and PromQL, builds dashboards, and creates alerts from a plain-language request. The OpenObserve MCP server (setup guide for Claude Code) brings the same data into Claude Code and other MCP clients, so you can query your Claude usage from your editor.

OpenObserve AI Assistant building a dashboard from a plain-language prompt: it checks the stream schema, plans the panels, and validates each query before creating the dashboard

Claude Code querying OpenObserve through the MCP server from a natural-language request, listing streams and inspecting a stream schema to answer the question

Trace a Claude cost spike to the user who caused it

Claude spans live next to your logs, metrics, traces, and real user monitoring, so a spike on the dashboard is one click from the trace, and from the trace to the frontend session that triggered it. Session replay shows exactly what the user clicked before the expensive request.

OpenObserve Real User Monitoring session replay with a breadcrumb timeline of user actions and page views, and tabs for tags and traces

See tracing a runaway LLM token spike from session to trace to RUM for a worked example, and monitoring AI agents in production for agent-specific signals.

Investigate Claude incidents with the SRE Agent

When a spend or error alert opens an incident, OpenObserve groups the related alerts and correlates logs, metrics, and traces from the same service and cluster. The SRE Agent then runs AI root cause analysis across them, so you start from a likely cause instead of a blank query editor.

OpenObserve incident view with automated correlation, showing logs correlated by Kubernetes namespace and cluster alongside tabs for incident analysis, alert graph, metrics, and traces

Redact or enrich Claude telemetry with pipelines

Claude spans can carry prompts and responses that include personal data. OpenObserve pipelines run VRL functions on telemetry as it arrives, so you can mask sensitive fields, drop prompt text you don't need, or add fields such as team or environment before anything is stored. Our guide to redacting PII from LLM telemetry shows the patterns.

OpenObserve pipeline editor attaching a VRL function to a stream, with the function definition and options to run it before or after flattening

What else is included in the OpenObserve platform?

The same platform that holds your Claude spans covers the rest of your stack:.

  • Telemetry: logs, metrics, traces with a service graph and service catalog, and continuous profiling.
  • Frontend: RUM, session replay, and error tracking.
  • Synthetic monitoring: browser tests and HTTP, TCP, TLS, and SSH checks.
  • AI: LLM observability and evaluations, the SRE Agent with AI root cause analysis, the AI Assistant, an MCP server, anomaly detection, log patterns, and insights.
  • Alerting and reliability: scheduled, real-time, composite, and anomaly alerts; incident management; SLOs with burn-rate alerts.
  • Dashboards and reports, including scheduled PDF, PNG, or CSV reports.
  • Data processing: pipelines, VRL functions, enrichment tables, and downsampling.
  • Storage and cost: object storage, bring your own bucket, extended retention, and ingest-based pricing with no per-host or per-user fees.
  • Security and governance: SSO, RBAC, multi-tenancy, sensitive data redaction, audit trail, cipher keys, and federated search.
  • Compliance: SOC 2 Type II, ISO 27001, and GDPR via the EU region.

Get started with OpenObserve

Sign up for OpenObserve Cloud with a 14-day free trial, or run OpenObserve self-hosted as a single binary. Instrument one Claude-powered service, import the AI LLM Apps dashboard, and add the cache hit rate panel; by the end of the day you will know which feature your Anthropic bill comes from.

Frequently Asked Questions

About the Author

Md Mosaraf

Md Mosaraf

I'm a Solution Architect and Observability Engineer with over 10 years of experience helping organizations build resilient, transparent systems. As a Certified Splunk Consultant, I've spent my career turning data into actionable insights that drive real business outcomes. I'm passionate about open source observability tools and believe that robust monitoring is the foundation of modern infrastructure. I share practical strategies, lessons learned, and hands-on guidance from the trenches of enterprise observability

Follow OpenObserve on Google

Add OpenObserve as a preferred source to see more of our articles in Google Search and Top Stories.

Latest From Our Blogs

View all posts