Query attributed spend
get_spendQuery local receipt ledger to get AI usage cost aggregated by any dimension (provider, model, route, customer) within an optional time range. Returns USD totals per group and flags unresolvable pricing count.
Instructions
Query Inferrail's local receipt ledger, aggregated by a dimension (provider, model, route, or any business attribute name such as 'customer' or 'agent'), optionally restricted to a time window. Returns known cost in USD (as a decimal string, never a float) per group, plus a count of requests whose pricing was unresolvable -- those are never silently folded into the cost total as zero. Reads a local file only; makes no network call and cannot incur provider cost.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| by | No | customer | |
| since | No | ||
| until | No | ||
| receipts_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||