HiveOps

Margin engine for AI products

See the margin on the AI you sell.

Every model call your agents make is billed by the provider. Your revenue is in Chargebee. HiveOps joins the two, so every customer, plan and subscription shows its margin.

Request early accessGet started

one call, sized by tokenspriced, sized by dollarscustomer costs more than it pays

  1. 01 Usage
  2. 02 Rated
  3. 03 Attributed
  4. 04 Explained

one call, sized by tokenspriced, sized by dollarscustomer costs more than it pays

01 · Usage

Every call leaves a record.

Your agents emit one AUDR record per model call: the model, its input, cache-read, cache-write, output and reasoning tokens, and the customer's Chargebee subscription id. Records carry tokens, not prices, and never prompts or completions.

Each dot is one record, sized by its tokens.

02 · Rated

Every call priced at the provider's real rate.

HiveOps keeps a catalogue of provider rates, refreshed daily, and applies your negotiated discount. Input, cache-read, cache-write, output and reasoning tokens are each priced at their own rate, so a call that is mostly cache reads costs what it should.

13,701 tokens, almost all cache reads$0.004
14,221 tokens$0.06

Two calls of similar size, from production data. Past the gate, each dot is sized by its cost.

03 · Attributed

Every dollar on the customer it served.

Each record carries the customer's Chargebee subscription id. HiveOps joins inference cost to the revenue Chargebee already holds, so margin is measured for every customer, subscription and plan rather than averaged across the business.

In October, $182,400 of revenue carried $70,410 of inference cost: a 61.4% gross margin. Seven of 120 customers cost more than they pay. Rivetly pays $4,800 and cost $6,940 to serve.

Each bar is a customer's cost; the tick is plan revenue from Chargebee. Select Rivetly to open it.

04 · Explained

Every number opens to the call that produced it.

  1. Customer. Rivetly, at a −44.6% margin.
  2. Agent. The Code Review agent is 75% of Rivetly's cost. Its cost per session rose ×3.4 after it moved from Sonnet to Opus on Oct 14.
  3. Session. One review session made 38 calls.
  4. Call. Call 12: 1,204 input tokens at $15.00, 12,388 cache-read tokens at $1.50 and 612 output tokens at $75.00 per million, for $0.0825.
Emits AUDR today
  • LiteLLM
  • NVIDIA NeMo Relay
  • Merge Gateway
  • OpenRouter
  • Vercel AI SDK
  • Mastra
  • Python and TypeScript SDKs

For every team

One table, a different question for each team.

FinanceAre we making money on AI this month, and which way is it heading?
ProductWhich plans and customers cost more to serve than they pay?
EngineeringWhich agents and models drive spend? What is the cache hit rate?
Customer successIs this account profitable, and what changed before renewal?

Why HiveOps

Built for businesses that sell AI and bill through Chargebee.

No cost arithmetic in your codeRecords carry tokens, not prices. HiveOps applies the rates, so a provider price change needs no deploy.
Billing stays where it isHiveOps reads revenue from your Chargebee site and writes nothing back. There is nothing to migrate.
An open recordAUDR is Apache 2.0, with Python and TypeScript SDKs. The same records can also drive Chargebee metered billing.
Every token type countedCache reads, cache writes and reasoning tokens are priced separately rather than folded into input and output.

Get started

Three steps from agent to margin.

  1. Emit AUDR records. Use an adapter, or the Python or TypeScript SDK in your own agent code. Set subscription_id to the customer's Chargebee subscription.
  2. Deliver them to Chargebee. The Chargebee sink sends each record to your site as a usage event. It is an early release, and your Technical Success Manager configures it with you.
  3. Open HiveOps. Sign in with your Chargebee account to see margin by customer, plan and subscription.
TypeScript npm install @openaudr/audr @openaudr/audr-sink-chargebee
# pip install audr audr-sink-chargebee
import asyncio

import audr
from audr_sink_chargebee import ChargebeeSink

record = audr.AUDR(
    timing=audr.Timing(),
    resource=audr.Resource(
        provider="anthropic",
        type="model",
        name="claude-opus-4-1",
        operation="generation",
        modality="text",
    ),
    run=audr.Run(run_id="01K4N8B0M2C5F7H9J1L3N6P8QR", span_id="call-12"),
    attribution=audr.Attribution(
        environment="production",
        account_id="acct_rivetly",
        subscription_id="sub_rivetly_pro",
    ),
    usage=audr.Usage(
        llm=audr.LlmUsage(
            input_tokens=1204,
            cache_read_tokens=12388,
            output_tokens=612,
        )
    ),
)


async def main() -> None:
    sink = ChargebeeSink()  # reads CHARGEBEE_SITE and CHARGEBEE_API_KEY
    emitter = audr.Emitter(component="harness", name="agent", version="1.0")
    async with audr.Client(sink, emitter=emitter) as client:
        result = client.record(record)
        assert result.queued, result.issues


asyncio.run(main())

Open standard

One open record per call.

AUDR (Agent Usage Detail Record) is an open standard drafted and stewarded by Chargebee, published under Apache 2.0. A record describes usage, never content.

Included

Model and provider. Input, cache-read, cache-write, output and reasoning tokens. The customer's subscription id. Agent, session and feature. Environment, duration, outcome and up to 20 labels of your choosing.

Never

Prompts, completions and API keys. Labels must not contain personal data, and user ids are pseudonymous.

openaudr.dev

{
  "spec_version": "1.1.0",
  "record_id": "01a1907b-92d0-7cf4-ac45-09a66d7c8523",
  "emitter": {
    "component": "harness",
    "name": "agent",
    "version": "1.0"
  },
  "timing": {
    "event_time": "2026-10-31T09:14:07.000Z"
  },
  "resource": {
    "provider": "anthropic",
    "type": "model",
    "name": "claude-opus-4-1",
    "operation": "generation",
    "modality": "text"
  },
  "run": {
    "run_id": "01K4N8B0M2C5F7H9J1L3N6P8QR",
    "span_id": "call-12"
  },
  "attribution": {
    "environment": "production",
    "account_id": "acct_rivetly",
    "subscription_id": "sub_rivetly_pro"
  },
  "usage": {
    "llm": {
      "input_tokens": 1204,
      "cache_read_tokens": 12388,
      "output_tokens": 612
    }
  }
}

Early access

Bring one agent and one Chargebee site.

Setup sessionYour Technical Success Manager configures the Chargebee sink with you.
Your first monthA walkthrough of your first month of data: margin by customer, plan and agent.
ScopeCost means LLM inference cost. Rates cover OpenAI, Anthropic, OpenRouter and Vercel AI Gateway; enter a rate for any other model.

If your product has no AI in it, you don't need us. If your agents cost you money every time a customer uses them, HiveOps was built for you.

Request early access