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

Subscription plan (optional)

After connecting, you can configure your Anthropic subscription plan so oncost tracks subscription costs alongside API usage. Go to Settings > Connections, click your Anthropic connection, and fill in the Subscription Plan section. Available plans:
PlanMonthly costSeat-based
Free$0No
Pro$20/monthNo
Team$25/seat/monthYes
EnterpriseCustomYes
For Team and Enterprise plans, enter the number of seats. For Enterprise, enter your custom monthly cost. When configured, oncost generates a subscription cost row each month and shows the full picture — subscription cost plus API usage — on the Anthropic provider detail page. This step is optional. If you skip it, oncost still tracks all API usage costs.

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