get_cost_breakdown
Reads the LLM cost of the workspace, or of one pipeline, grouped by model, pipeline, deployment or API key.
Instructions
Reads the LLM cost of the workspace, or of one pipeline, grouped by model, pipeline, deployment or API key.
Use this to find what drove the cost: which models, pipelines, deployments or API keys spent the most.
Costs are in USD. Results are sorted by cost, highest first, unless you set sort_by and sort_order.
Each entry has a key (a model or provider name, or a UUID for the other dimensions) and a readable
label. A deleted pipeline still shows up with group_by='pipeline', labelled with its UUID.
total is the number of groups across all pages; when has_more is true, read the next
page_number. total_requests counts queries, not individual LLM calls. A cost_total of null
means the group had usage but none of it was priced. Without dates the range is the last 30 days.
:param group_by: The dimension to group by: model, workspace, pipeline, deployment, api_key or provider.
:param pipeline_name: Restrict to this pipeline. Omit for the whole workspace. Needs Pipelines read as well as
Costs read.
:param start_date: Inclusive start as an ISO timestamp. Defaults to 30 days before end_date.
:param end_date: Exclusive end as an ISO timestamp. Defaults to no upper bound.
:param sort_by: Sort by label, cost_total, total_tokens or total_requests. Defaults to cost_total.
:param sort_order: ASC or DESC. Defaults to DESC.
:param limit: Groups per page, from 1 to 100.
:param page_number: The page to read, starting at 1.
:returns: One page of the breakdown, or an error message.
The output is automatically stored and can be referenced in other functions.
Returns a formatted preview with an object ID (e.g., @obj_123).
Use the object store tools in combination with the object ID to view nested properties of the object.
Use the returned object ID to pass this result to other functions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| sort_by | No | ||
| end_date | No | ||
| group_by | Yes | ||
| sort_order | No | ||
| start_date | No | ||
| page_number | No | ||
| pipeline_name | No |