Event costs
Cost lines record what an event cost you to produce: the model call, the GPU time, a third-party API or a person’s time. You add them to the same event that records the usage, so one send gives Paid both what you bill and what it cost you. For model calls you don’t even need the amount: send the provider, model and token counts, and Paid prices them from its model catalog.
Use cost lines to:
- See your margin per customer, product or run, next to what you bill for the same events.
- Bill your costs plus a markup with a
costPlusprice, such as inference at cost plus 20%. - Bill tokens without sending them twice, with a meter that sums a field such as
cost.inference.outputTokens.
Send the beta alongside the events beta: Paid-Beta: events=v1,event_costs=v1.
How cost lines work
cost is a list on the event, one line per cost. Each line has a type and one object of the same name with its details, so type: "inference" goes with inference: { ... }.
- You describe the cost. For a model call, the provider, the model and the token counts. For anything else, the
amountand what it was for. - Paid prices it. An
inferenceline without anamountis priced from Paid’s model catalog. Any other line uses theamountyou sent. - The event comes back priced. Each line shows its
amountand, inpricing, where that amount came from.
Record an inference cost
Litware’s support agent calls a language model for every turn of a ticket. It sends one agent.turn event per turn, with the model call as an inference cost line:
API
Dashboard
Create an event with a cost line of type inference. Leave out amount, and Paid calculates it.
The line came back with an amount of 0.927¢, priced from Paid’s catalog version 2026-10-01, and uncachedInputTokens: 3,200 input tokens minus 2,400 cache reads = 800.
Cost types
The details object is required for inference and optional for every other type. duration and size are quantities with an explicit unit, such as { "value": "212", "unit": "second" }.
Amounts
A cost amount is { amount, currency }, where amount is a decimal string in the currency’s minor units, with up to 15 decimal places. In usd, "41" is 41¢ and "0.42" is 0.42¢. Per-call costs are often a fraction of a cent, which is why amounts aren’t whole numbers.
pricing.source says where each line’s amount came from:
If you already know what a model call cost, for example from your provider’s invoice data, send amount on the inference line, and Paid uses it as given.
Inference fields
The inference fields follow the OpenTelemetry GenAI conventions, in camelCase, so you can copy them from your traces:
As in OpenTelemetry, inputTokens is the total and includes cached tokens. Paid prices each part at its own rate, and adds a read-only uncachedInputTokens: inputTokens minus cacheReadInputTokens minus cacheCreationInputTokens. A meter that bills input tokens should sum uncachedInputTokens, so cached tokens aren’t counted twice.
When you send responseModel, Paid prices on it, because a router may serve a different model from the one requested. Token counts are non-negative integers.
Record other costs
Adatum analyses video on GPUs, and a person reviews some results. It states both costs on the same event:
The event cost Adatum 38.5¢ of GPU time plus 120¢ of review: 158.5¢, or $1.585. Both lines come back with pricing.source: "provided".
A model provider that sells tokens records them differently: tokens are its usage, so they go in payload, and its own cost of serving them is a compute line. inference lines are for companies that buy model calls.
How it bills
Litware bills Northwind for inference at cost plus 20%, with a costPlus price on an event meter that reads agent.turn, with multiply: "1.2" and costTypes: ["inference"]. In November:
Paid calculates the charge exactly and rounds once, to whole cents, on the invoice line. Each cost type a costPlus price bills gets its own invoice line.
Unknown models and errors
If Paid’s catalog doesn’t know the provider or model, the line is stored without an amount (amount: null) and flagged with unknown_provider or unknown_model. When Paid’s catalog prices the model later, the line is priced at the rate in effect at its timestamp.
A line fails, and in a batch only its item fails, when:
Cost lines can’t be changed after the event is accepted.