TokenOps by Lovie is an AI unit economics platform specifically designed for AI-native companies. It serves as a financial layer that enables businesses to accurately track and attribute their large language model (LLM) costs to individual customers, transforming aggregated vendor invoices into clear, per-customer profitability insights. The platform is built for companies that rely on multiple LLM providers like Anthropic, OpenAI, and Google AI, and who struggle to answer fundamental business questions about which accounts are actually profitable. Its core value lies in replacing manual, error-prone spreadsheet analysis with an automated system that provides real-time visibility into unit economics, allowing teams to see per-customer gross margin and make data-driven financial decisions without monthly research projects.
AI companies face a concrete and critical problem: they cannot determine per-customer profitability from their LLM vendor invoices. Vendors such as Anthropic and OpenAI provide aggregated workspace-level bills that lose the essential join between specific costs and the customers who incurred them. This creates an 'invoice mystery' where companies pay a handful of vendors, receive one consolidated invoice per vendor, and have no shared schema to attribute costs. Consequently, answering the vital question 'Is this customer profitable?' becomes a manual, time-consuming research project every month, often involving multiple data sources and SQL joins. This obscurity is compounded by 'rate drift,' where the effective cost per token diverges from the listed price due to caching, batch processing, and volume discounts, a gap only discovered during reconciliation. The urgency is real, as leadership frequently demands per-customer gross margin reports on tight deadlines, leaving engineering and finance teams scrambling with spreadsheets and promises to 'firm it up next month.'
The platform's first major feature group is its lightweight SDK wrappers for seamless integration. With a single line of code, developers can wrap their existing LLM clients for providers like Anthropic, OpenAI, Amazon Bedrock, Google AI, Vercel AI, and Azure OpenAI. This wrapper approach is non-intrusive; it does not proxy traffic, meaning all LLM calls go directly to the vendor, ensuring no latency impact or security concerns. The SDK captures essential metadata from each request, including the model used, input and output tokens, vendor-reported usage, latency, and a critical `customerId` parameter that serves as the join key for attribution. By simply passing a `customerId` on each API call, companies automatically attribute every token of spend. This foundational capture step transforms raw, anonymous usage into structured, customer-attributable events, creating the granular data layer necessary for all subsequent financial analysis.
admin
A second, pivotal feature group is the automated invoice reconciliation engine. This system addresses the 'rate drift' problem by performing a line-by-line diff between the captured usage events and the actual monthly vendor invoices. When an invoice arrives (either forwarded as a PDF/CSV or pulled via a vendor's billing API), TokenOps matches each line item against the captured events. This process surfaces the true effective rate per token, which often differs from the list rate due to unadvertised discounts or usage tiers. The reconciliation flags any discrepancies, missing line items, or quietly applied volume discounts, providing a clear audit trail. The output is a reconciled view of cost per vendor, period, and—most importantly—per customer. This turns the opaque vendor bill into a transparent breakdown, enabling finance teams to see exactly how much each customer cost and to calculate accurate gross margin, moving beyond estimates to ground-truth financial data.
TokenOps offers a powerful third capability through its comprehensive Model Context Protocol (MCP) integration. The platform provides a catalog of 30 MCP tools, grouped into five families for customers, events, vendors, finance, and system operations. These tools allow users to connect TokenOps to AI agent environments like Claude Desktop, Cursor, or Codex and ask complex finance questions in plain English. For example, an agent can use tools like `tokenops.cost_by_customer` or `tokenops.gross_margin` to retrieve answers dynamically. Beyond individual tools, TokenOps includes four pre-built composite workflow tools that automate complex, multi-step financial analyses. These workflows stitch together a dozen MCP reads into a single, deterministic tool, enabling agents to execute sophisticated queries such as building a per-customer P&L, reconciling a specific vendor invoice, detecting cost anomalies, or forecasting the impact of a price change, all through a simple API call.
The overall workflow of TokenOps is designed for simplicity and speed, promising setup in around five minutes. It begins with installing the SDK (`@tokenops/sdk` for TypeScript or the Python package) into the service that manages LLM clients. Next, developers wrap their existing LLM client instances with a one-line function call for each vendor, such as `wrapAnthropic()`. The only required addition is passing a `customerId` parameter on each LLM API call, which serves as the attribution key. Once integrated, the system automatically captures every event, prices it, and makes the data available within seconds via a dashboard, a dedicated API endpoint (`/api/cost`), or through the MCP layer for agent queries. The final, automated step occurs monthly when vendor invoices arrive; the reconciliation engine matches them against the captured events, closing the loop and providing finalized, accurate cost accounting without manual intervention.
Concrete use cases demonstrate the platform's immediate value. A common scenario is the monthly board deck preparation, where a CEO requests gross margin by customer for the last 90 days on a tight deadline. With TokenOps, a finance team can instantly run the `tokenops.workflows.build_pnl` workflow to generate a per-customer profit and loss statement, joining captured LLM costs with the company's revenue data. Another critical scenario is anomaly detection: using the `tokenops.workflows.anomaly` tool, engineering teams can monitor per-customer spend and receive alerts when a customer's daily cost deviates more than two standard deviations from its baseline, potentially catching a runaway inference loop before the monthly invoice arrives. A third scenario is pricing strategy; a product team can use the `tokenops.workflows.price_change` workflow to simulate a new per-seat or usage-based price against historical data, identifying which customers might churn at negative margins and forecasting the overall revenue impact, enabling confident, data-backed pricing decisions.
TokenOps explicitly targets AI-native companies and startups that build products on top of multiple LLM APIs and need to understand their unit economics. Key user segments include engineering leaders responsible for infrastructure cost, finance teams tasked with profitability reporting, and product managers making pricing decisions. The platform supports TypeScript and Python SDKs, is compatible with edge runtimes, and integrates via MCP with agent environments like Claude Desktop and Cursor. Pricing begins with a free 30-day trial on real telemetry, requiring no credit card, and scales to custom plans based on event volume, supported vendors, and required controls like multi-entity support, SSO, and audit logs. In summary, TokenOps provides the missing financial layer for the AI stack, transforming opaque LLM spend into clear, actionable per-customer profitability insights, thereby enabling sustainable and profitable growth for companies building with AI.
TokenOps is built for AI-native companies and startups that productize multiple LLM APIs. Primary users include engineering leaders and infrastructure teams managing LLM costs, finance and operations teams responsible for unit economics and profitability reporting, and product managers or founders making data-driven pricing and customer success decisions. The platform specifically serves businesses that use vendors like Anthropic, OpenAI, Bedrock, and Google AI and need to move beyond aggregated invoices to understand per-customer margins.