Run costs for one workspace
Recorded run cost and token use for one workspace in a time window of at most 93 days. Returns totals, groups, groups_truncated, rounds and conversations. group_by picks how groups splits the runs. automation gives one group per scheduled task, ordered by cost, and groups runs that no task started by trigger. trigger, model, actor and day group by that value, and model uses the model recorded on each run. rounds splits the first round of every run from its later rounds, each with uncached input, cache read, cache write and output tokens. conversations lists the most expensive conversations, each with its run count, cost, most expensive run and first user message cut to 240 characters. Costs are micro US dollars: 1,000,000 is 1 USD. Auxiliary model calls count in totals but not in rounds. rounds.complete is false when any included run used more rounds than its stored history holds. Reading first user messages is recorded against your staff account.
Request
- Base URL: https://api.patricia.app (the document declares no server; this is the origin it was published from)
- URL: https://api.patricia.app/v1/admin/tenants/{tenant_id}/run-costs
- Auth: HTTP bearer
Path parameters
The workspace id.
Query parameters
Start of the window, an ISO 8601 date-time.
End of the window, an ISO 8601 date-time. Defaults to now. At most 93 days after created_after.
How to split runs into groups: automation, trigger, model, actor or day. Defaults to automation.
How many groups to return, 1 to 50. Defaults to 10.
How many conversations to return, 1 to 25. Defaults to 10.
Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.