Dashboard & Feeds

Dashboard & Feeds

LLM Token Usage Dashboard

Track your Anthropic Claude API token usage and costs with a real-time dashboard

Guide

LLM Token Usage Dashboard

Create a dashboard to monitor your LLM API token consumption and costs in real-time.

Supported Providers

ProviderAPIKey RequiredFeatures

OpenAIUsage APIAdmin KeyToken usage by model/project/key, Costs endpoint
AnthropicAdmin APIOrganization Admin KeyCost reports, token usage by workspace

Where to get Admin Keys:

Prerequisites

  1. Activate OptiDev Cloud - Click the "OptiDev Cloud" button in your project

  2. Add your Anthropic Admin Key - Go to OptiDev Cloud > Secrets and add:
    - Key: ANTHROPIC_ADMIN_KEY
    - Value: Your organization admin API key

Note: This prompt focuses on Anthropic, but you can easily adapt it for OpenAI. Simply replace ANTHROPIC_ADMIN_KEY with OPENAI_ADMIN_KEY and reference the OpenAI Usage API docs in your prompt instead.

Final Prompt

### Purpose I need to build a dashboard to track my Anthropic Claude API token usage and costs, displaying on a TV in our office for the engineering team. ### Requirements Build a modern dashboard showing Anthropic API usage metrics. **API Documentation** Use the Anthropic Admin API to fetch usage and cost data: - Cost Report: https://docs.anthropic.com/en/api/admin-api/usage-cost/get-cost-report - Usage endpoint returns: input_tokens, output_tokens, cache_creation_input_tokens, cache_read_input_tokens - Cost endpoint returns: cost breakdown by model and workspace **Dashboard Metrics** - Total tokens used (input vs output breakdown) - Costs by model (Claude Sonnet, Opus, Haiku) - Costs by workspace - Daily usage trend chart - Cache hit rate (cache_read vs cache_creation tokens) **Layout** - Dark theme for TV display - Cards for key metrics at top - Charts for trends below - Auto-refresh every 5 minutes - Show last updated timestamp **Backend Setup** I've activated OptiDev Cloud and added `ANTHROPIC_ADMIN_KEY` in the project secrets. Use it to call the Anthropic Admin API.

Back to Prompt Library