Skip to main content

Connect Anthropic

oncost tracks your Anthropic API usage at the model and token level. Setup takes about 2 minutes.

Prerequisites

  • An Anthropic account with API access
  • An API key with usage read permissions

Setup

  1. Go to Settings > Connections > New Connection > Anthropic
  2. Paste your Anthropic API key
  3. Click Test Connection to verify access
  4. Click Save
oncost collects usage data within minutes.

What oncost collects

  • Daily cost by model (Claude Opus, Sonnet, Haiku, etc.)
  • Token counts (input and output) per model
  • Cost-per-token trends over time

Tips

  • Separate API keys per environment (dev, staging, prod) to get per-environment cost breakdown
  • Separate keys per team to enable tag-based cost attribution
  • oncost shows cost-per-token trends in the AI Cost view under Spend