API Reference
Margin Data API
Margin and profitability analysis comparing AI costs against revenue.
GETGet margin by end user — Returns 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.GETGet margin summary — Returns total revenue, cost, and margin for the organization with warnings about unattributed data and profitability classification.GETGet margin trend — Returns 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.