Know exactly where every dollar goes. Track and attribute LLM costs to customers, users, projects, or teams with a single parameter.
Most teams have no idea which customers or features are driving their LLM costs
Your LLM bill is $50K/month but you can't tell which customer or feature is responsible.
You want usage-based pricing but have no way to track per-customer consumption.
Engineering, product, and finance teams can't allocate costs to projects or teams.
Pass a cost_tracking_id with each request. We handle the rest.
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-acme-corpBill customers based on actual LLM usage
user-12345Track per-user costs for internal allocation
project-chatbot-v2Allocate costs to specific projects
team-engineeringTrack costs by department or team
feature-summarizationUnderstand which features cost the most
acme:user-123:chatMulti-dimensional cost tracking
See cost distribution, top consumers, and trends at a glance
Top 8 tracking IDs by cost
$12.4K
This Month
Detailed breakdown by tracking ID
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
Real-world use cases from production deployments
Bill your customers based on their actual LLM consumption. Export cost data to your billing system (Stripe, Chargebee, etc.) for accurate invoicing.
Allocate AI costs to teams, departments, or cost centers. Give finance the data they need for accurate budgeting.
Understand which product features drive the most LLM spend. Make informed decisions about feature pricing and optimization.
Identify heavy users, detect usage anomalies, and proactively manage customer relationships based on consumption patterns.
Integrate cost tracking data into your billing and analytics systems
{
"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"
}Cost tracking is available on all plans. Add a single parameter and get complete visibility.