Quickstart
Introduction
Track every Claude API call your team makes. Set one environment variable and all requests are logged with token counts, calculated costs, and full request/response bodies — grouped by proxy endpoint for per-project attribution.
Features
Section titled “Features”- One env var setup — set
ANTHROPIC_BASE_URLand all Claude clients start tracking automatically - Trace inspector — view every API call with full request/response bodies, token breakdown, and cost
- Real-time cost dashboard — daily spend chart, per-model breakdown, and summary cards
- Streaming support — SSE responses are parsed and reconstructed into readable output
- Per-endpoint attribution — create separate proxy endpoints per project or environment
How it works
Section titled “How it works”Claude Client → Codecosts (/v1/messages) → Anthropic API ↓ Usage Logs (PostgreSQL) ↓ Dashboard (React)Codecosts sits between your Claude client and the Anthropic API. It forwards every request unchanged, parses the response for token counts, calculates cost, stores the full bodies, and returns the response to your client. Your client doesn’t know the difference.
Next steps
Section titled “Next steps”Authentication
API Reference
SDK