🚀 Use for Free · No credit card required · Start optimizing your LLM costs now
NEW FEATURE

Cost Tracking &
Attribution

Know exactly where every dollar goes. Track and attribute LLM costs to customers, users, projects, or teams with a single parameter.

The SaaS Billing Problem

Most teams have no idea which customers or features are driving their LLM costs

Unknown Cost Distribution

Your LLM bill is $50K/month but you can't tell which customer or feature is responsible.

Can't Bill Customers Accurately

You want usage-based pricing but have no way to track per-customer consumption.

No Internal Cost Visibility

Engineering, product, and finance teams can't allocate costs to projects or teams.

One Parameter. Complete Visibility.

Pass a cost_tracking_id with each request. We handle the rest.

your-saas-app.py
from openai import OpenAI

# Initialize with Costbase
client = OpenAI(
    api_key="gw_your_costbase_key",
    base_url="https://api.costbase.ai/v1"
)

# Track costs by customer, user, project, or any identifier
response = client.chat.completions.create(
    model="auto",
    messages=[{role: "user", content: "Hello!"}],
    extra_body={
        "cost_tracking_id": "customer-acme-corp"  # That's it!
    }
)
Customer ID
customer-acme-corp

Bill customers based on actual LLM usage

User ID
user-12345

Track per-user costs for internal allocation

Project ID
project-chatbot-v2

Allocate costs to specific projects

Team
team-engineering

Track costs by department or team

Feature
feature-summarization

Understand which features cost the most

Combined
acme:user-123:chat

Multi-dimensional cost tracking

Powerful Analytics Dashboard

See cost distribution, top consumers, and trends at a glance

Cost Distribution

Top 8 tracking IDs by cost

$12.4K

This Month

acme-corp (30%)
globex (20%)
initech (16%)
umbrella (14%)

Cost Attribution Table

Detailed breakdown by tracking ID

acme-corp
15.2K req2.1M$3,720
globex-inc
8.4K req1.2M$2,480
initech
6.1K req890K$1,984
umbrella
5.8K req720K$1,736
Export to CSV, JSON, or integrate via API

Metrics That Matter

Everything you need for billing, budgeting, and cost optimization

Unlimited

Unique Tracking IDs

Track as many entities as you need

Real-time

Total Cost by ID

Always up-to-date cost attribution

Per ID

Request Count

Know exactly how many calls per entity

Calculated

Avg Cost/Request

Optimize high-cost consumers

Built for SaaS Teams

Real-world use cases from production deployments

Usage-Based Billing

Bill your customers based on their actual LLM consumption. Export cost data to your billing system (Stripe, Chargebee, etc.) for accurate invoicing.

  • Per-customer cost tracking
  • API access for billing integration
  • Historical usage reports

Internal Cost Allocation

Allocate AI costs to teams, departments, or cost centers. Give finance the data they need for accurate budgeting.

  • Team-based attribution
  • Project cost tracking
  • Monthly allocation reports

Feature Cost Analysis

Understand which product features drive the most LLM spend. Make informed decisions about feature pricing and optimization.

  • Feature-level tracking
  • Cost per feature breakdown
  • Optimization insights

Customer Success

Identify heavy users, detect usage anomalies, and proactively manage customer relationships based on consumption patterns.

  • Usage anomaly detection
  • Customer health metrics
  • Proactive alerts

API Access for Automation

Integrate cost tracking data into your billing and analytics systems

GET /v1/cost-tracking200 OK
{
  "entries": [
    {
      "cost_tracking_id": "acme-corp",
      "total_requests": 15200,
      "total_cost": 3720.45,
      "total_tokens": 2100000,
      "avg_latency_ms": 342
    },
    {
      "cost_tracking_id": "globex-inc",
      "total_requests": 8400,
      "total_cost": 2480.12,
      "total_tokens": 1200000,
      "avg_latency_ms": 287
    }
  ],
  "count": 10,
  "total_cost": 12450.67,
  "total_requests": 52000,
  "range": "month"
}

Start Tracking Costs Today

Cost tracking is available on all plans. Add a single parameter and get complete visibility.

Frequently Asked Questions