Know Where Your AI Spend Goes

Cost attribution for LLMs. See spend by user, feature, and model. No more surprise bills.

from costgpt import CostTracker

tracker = CostTracker(api_key="cg_live_...")
tracker.instrument_anthropic()
# Done. All calls now tracked.
Start Free
$2,847
Last 30 days
142K
API calls
89M
Tokens
-12%
vs last month
Top Model
claude-sonnet-4
$1,923 (68%)
Top User
user_8472
$412 (14%)
Top Feature
chat
$1,102 (39%)

The Problem

📈

Opaque

You get one bill. No breakdown by user, feature, or team.

âš¡

Spiky

One runaway agent can blow your budget overnight.

😱

Surprising

Finance asks "why is AI spend up 300%?" You have no answer.

Two Lines to Start

from costgpt import CostTracker

tracker = CostTracker(api_key="cg_live_...")
tracker.instrument_anthropic()

# All calls now tracked with cost attribution
response = client.messages.create(...)

Examples

Tag calls with user and feature for full attribution

Track by User

# Attribute costs to specific users
tracker.track(
    model="claude-sonnet-4-20250514",
    input_tokens=response.usage.input_tokens,
    output_tokens=response.usage.output_tokens,
    user_id="user_8472",
)

Track by Feature

# See which features cost most
tracker.track(
    model="gpt-4o",
    input_tokens=1500,
    output_tokens=800,
    feature="code-review",
)

Auto-instrument Anthropic

# One line, all calls tracked
tracker.instrument_anthropic()

# Works automatically
client = anthropic.Anthropic()
response = client.messages.create(...)

Auto-instrument OpenAI

# Same for OpenAI
tracker.instrument_openai()

# All completions tracked
client = openai.OpenAI()
response = client.chat.completions.create(...)

Pricing

Free

$0

  • 10,000 events/month
  • 7 day retention
  • Basic dashboards
Get Started

Pro

$49/mo

  • Unlimited events
  • 90 day retention
  • Alerts & budgets
Start Free Trial

Stop getting surprised by AI bills

Know exactly where your spend goes. Free tier, no credit card.

Create Account