AI Token & Usage-Based Billing
Accurate AI token metering for pay-as-you-go pricing. Track every token and report costs to your billing system.
Key Features
AI Token Metering
Track tokens from OpenAI, Anthropic, and custom providers. Per-request cost attribution.
Dollar-based Billing
Bill customers based on actual AI costs, not just request counts.
Overage Alerts
Alert customers before they exceed token budgets or dollar limits.
Billing Integration
Report AI usage to Polar for automatic invoice generation.
Benefits
Accurate Billing
Every request is tracked. No disputes over usage counts.
Predictable Revenue
Usage-based models turn heavy users into revenue.
Customer Transparency
Customers see their usage in real-time, building trust.
How It Works
Define Metering Events
Choose what counts as a billable event: requests, data transfer, compute time.
Set Base Limits
Configure included usage per plan before overages kick in.
Configure Billing Reports
Set up usage reporting to your billing system.
Monitor & Alert
Send alerts when customers approach or exceed limits.
Frequently Asked Questions
How accurate is usage tracking?
Every API call is logged with a timestamp. Usage data is available in real-time with no sampling or estimation.
Can I bill for different types of requests?
Yes. You can meter by endpoint, method, response size, or any custom attribute.
How do I prevent surprise bills for customers?
Configure usage alerts at 50%, 80%, and 100% of limits. You can also set hard limits that reject requests.