Get costs
group_by is present on each row (customer above); it’s omitted entirely when group_by is unset.
Input params: passed in the request body.
"YYYY-MM-DD"
required
Start of the period, inclusive.
"YYYY-MM-DD"
End of the period, inclusive. Defaults to today.
"day" | "week" | "month" | "quarter" | "year" | "all"
default:"\"day\""
One row per period;
"all" collapses the whole date range into a single row (per group_by, if set)."customer" | "feature" | "model" | "provider"
Split each period into one row per dimension value. Omit for one row per period.
list[string]
Restrict to these customers. Omit for every customer. See Get customers.
list[string]
Restrict to these feature tags. Omit for every feature. See Get features.
list[string]
Restrict to these models. Omit for every model. See Get models.
list[string]
Restrict to these providers. Omit for every provider. See Get providers.
{tag_key: list[string] | string}
Restrict to customers carrying these tags (AND across
tag_key, OR within a tag_key’s values).{tag_key: list[string] | string}
Restrict to runs carrying these tags (AND across
tag_key, OR within a tag_key’s values).boolean
default:"false"
Apply free AI credits discounts to
cost. Never applied to avg_feature_run_cost/max_feature_run_cost, which always report gross cost.integer
default:"100"
Max number of rows to fetch. Max
1000.string
The route is paginated: pass the previous page’s
next_cursor to fetch the next page. PS: has_more from the output says whether another page exists.