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 . Read-only SQL, connected-table grain, deterministic result, visualization, and interpretation boundaries. Review standards and ownership

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.

Published 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

  • Provider-specific usage is normalized before the query, preserving a stable analysis contract.
  • 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.

Decisions the SQL cannot make

  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 as billing truth; the event field is an analytical estimate.

Continue from this lesson