API Reference

Margin Data API

Margin and profitability analysis comparing AI costs against revenue.

  • GET Get margin by end userReturns margin data for each of your end users (the customers you attribute usage and revenue to), sorted by profitability with the least profitable first so unprofitable end users surface at the top.
  • GET Get margin summaryReturns total revenue, cost, and margin for the organization with warnings about unattributed data and profitability classification.
  • GET Get margin trendReturns time-series margin data (revenue - cost) with adaptive granularity: - <= 30 days: daily - 31-90 days: weekly - > 90 days: monthly Periods with no revenue and no cost activity are omitted from data_points rather than returned as zero values.

← All API groups