API Reference
Attribution Data API
Dimensional cost analysis grouped by model, provider, feature, agent, or workflow.
GETList unique agent IDs: Returns distinct agent_id values from usage event metadata for the given date range, sorted alphabetically.GETGet cost breakdown by agent: Returns cost aggregation grouped by agent_id from usage event metadata.GETGet cost breakdown by dimension: Returns cost aggregation grouped by any metadata dimension key.GETGet cost per declared outcome: Returns the true cost per unit of value: for every outcome your spans declare (see the tracing guide), completed, failed, and unresolved units side by side.GETGet cost breakdown by workflow: Returns cost aggregation grouped by workflow_id from usage event metadata.GETList distinct dimension keys: Returns distinct metadata dimension keys from usage events within a date range, sorted alphabetically.GETList unique dimension values: Returns distinct values of a metadata dimension key in the date range, sorted alphabetically.GETCompare session types: Returns a per-session-type cost comparison with a cost efficiency ratio.GETGet session cost breakdown: Returns per-session cost totals, ordered by total cost descending.GETGet session detail: Returns a per-feature cost breakdown for one session.GETGet session call tree: Reconstructs one session's span call tree: one node per span with its own cost, its subtree cost (the span plus every descendant), and its nested children, so you can see which branch of a multi-agent run spent the money.GETGet attribution time-series: Returns time-bucketed multi-series cost data grouped by any metadata dimension key.GETList unique workflow IDs: Returns distinct workflow_id values from usage event metadata for the given date range, sorted alphabetically.