Quickstart
1. Sign up
Section titled “1. Sign up”Go to codecosts.com and click Get Started Free. Sign in with email, Google, or GitHub — no credit card required.
2. Create a proxy endpoint
Section titled “2. Create a proxy endpoint”In the dashboard, go to Settings and create a proxy endpoint. Give it a name like “my-project” or “production”.
You’ll get a URL like https://codecosts.com/proxy/my-project.
3. Point your Claude client at it
Section titled “3. Point your Claude client at it”Set the ANTHROPIC_BASE_URL environment variable to your proxy endpoint URL. Any Claude client that respects this variable will route through Codecosts automatically.
export ANTHROPIC_BASE_URL=https://codecosts.com/proxy/my-projectclaude "What is 2 + 2?"export ANTHROPIC_BASE_URL=https://codecosts.com/proxy/my-projectpython my_script.pyNo code changes needed — the Anthropic Python SDK reads ANTHROPIC_BASE_URL automatically.
curl https://codecosts.com/proxy/my-project/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ -H "content-type: application/json" \ -d '{"model":"claude-haiku-4-5-20251001","max_tokens":100,"messages":[{"role":"user","content":"Hello"}]}'That’s it. Your existing API key and auth flow work unchanged — Codecosts forwards everything to Anthropic transparently.
4. View your traces
Section titled “4. View your traces”Every API call appears in the Traces tab within seconds. Click any trace to see the full detail:
- Token breakdown — input, output, cache creation, cache read, and calculated cost
- Full request — model, system prompt, tools, messages
- Full response — parsed assistant output, or raw SSE for streaming calls
What’s next?
Section titled “What’s next?”- Traces Guide — filtering, searching, and understanding your usage
- API Reference — explore the usage and management endpoints
- SDK Guide — query usage data programmatically
- CLI — check usage from the terminal