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
- Go to Settings > Connections > New Connection > Anthropic
- Paste your Anthropic API key
- Click Test Connection to verify access
- Click Save
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:
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