Skip to content
Telemetry
Interactive SaaS SQL lab

AI economics · Intermediate

Calculate LLM cost per accepted output

Which plans consume the most model spend, and how much does each accepted output cost?

Join normalized provider usage to account context, then compare raw request cost with a reviewed product outcome.

Reviewed by the Telemetry product team on . We checked the read-only SQL, table joins, sample results and chart, and what the results mean. Who reviews this page

Runs against one versioned 15-table dataset

Edit and execute the query locally in your browser, then download the same synthetic schema and rows for DuckDB.

AI economicsIntermediate

Calculate LLM cost per accepted output

Which plans consume the most model spend, and how much does each accepted output cost?

Join normalized provider usage to account context, then compare raw request cost with a reviewed product outcome.

The dataset and query remain in this browser.

Expected result

Estimated LLM cost by plan

planrequestsautomatic_retriesestimated_cost_usdaccepted_outputscost_per_accepted_output_usd
growth610.12950.0258
business200.02110.021
starter200.0110—
free100.00410.004

How to read the query

  • The input events use the same usage fields for every provider, so the query can compare them.
  • Acceptance is a product outcome, not a property of the provider response itself.
  • NULLIF leaves cost per accepted output undefined when a segment has no accepted outputs.

How to interpret the results

  1. 1Keep current model pricing in versioned configuration and retain the pricing version on each event.
  2. 2Separate automatic retries from deliberate user regenerations.
  3. 3Use invoices to confirm charges. The event field contains an estimate.

Related lessons

Keep the result

Run this query on your own events

Create a free workspace only when you are ready to save the query, connect real events, and monitor the result. No credit card is required.

Save with my events