Meta AI enhances machine learning, NLP, and computer vision capabilities.
TokenTab
About TokenTab
TokenTab acts as a proxy for LLM API requests, routing traffic through its endpoints to track token usage per customer and feature. It supports OpenAI, Anthropic, and Gemini models via standardized endpoints that mirror provider APIs. Users configure their application to send requests to TokenTab instead of directly to the LLM provider, adding headers to identify the customer and feature. The service aggregates token counts nightly and pushes them to Stripe Billing Meters for invoicing, using idempotent event identifiers to prevent double-counting. Reports can be generated by customer, feature, or model to analyze cost drivers. The system operates on Cloudflare’s global edge network and handles non-streaming requests only. Integration requires minimal changes to existing code, primarily updating the base URL and adding two custom headers.
Key features
- Per-customer token attribution
- Feature-level cost tracking
- Stripe Billing Meters integration
- Multi-provider support (OpenAI, Anthropic, Gemini)
- Global edge network deployment
- Daily token aggregation and reporting
- Idempotent event identifiers to prevent double-counting
- Free tier available
Use cases
- Tracking OpenAI costs per customer without modifying prompts
- Billing customers for LLM usage via Stripe
- Analyzing LLM spend by feature and model to optimize costs
Pros
- Tracks LLM usage per customer and feature
- Integrates with Stripe Billing Meters for automated invoicing
- Supports multiple LLM providers via unified endpoints
- Operates globally on Cloudflare’s edge network
- Offers a free tier with 10,000 requests per month
Cons
- Limited to non-streaming requests in current version
- Requires header configuration for each request
- No support for streaming responses
- Free tier has usage limits
Frequently asked questions about TokenTab
What is TokenTab and what does it do?
TokenTab is a proxy service that routes LLM API requests through its endpoints to track token usage per customer and feature. It supports OpenAI, Anthropic, and Gemini models via standardized endpoints, aggregates token counts nightly, and pushes them to Stripe Billing Meters for invoicing.
Who should use TokenTab?
TokenTab is designed for businesses or developers who need to attribute LLM usage costs to specific customers or features, particularly those using Stripe for billing. It is useful for companies offering AI-powered services or applications that require granular cost tracking.
How do I integrate TokenTab into my application?
Integration requires changing the base URL of your LLM requests to TokenTab's endpoints and adding two custom headers: one for the customer identifier and another for the feature name. The process is designed to be completed in an afternoon with minimal code changes.
Does TokenTab support streaming requests?
No, TokenTab currently handles non-streaming requests only in its v1 version. Streaming requests are not supported.
How does TokenTab push data to Stripe?
TokenTab aggregates token counts nightly and pushes the totals to Stripe Billing Meters using idempotent event identifiers to prevent double-counting. The data is sent at 02:00 UTC each day.
What reports can I generate with TokenTab?
TokenTab allows you to generate reports grouped by customer, feature, or model. These reports help analyze cost drivers and identify which customers or features are driving LLM usage expenses.