get_cost_over_time
Tracks daily LLM costs in USD for a workspace or pipeline to identify cost spikes and compare periods; filter results by service, provider, or API key.
Instructions
Reads the LLM cost of the workspace, or of one pipeline, per UTC day.
Use this to see how spending developed, find the day a cost spike started, or compare periods.
Costs are in USD. There is one point per day with usage; days without usage are left out, so a missing
day means zero cost. A cost_total of null means that day had usage but none of it was priced.
Without dates the range is the last 30 days. start_date is inclusive and end_date exclusive.
The daily figures leave out unpriced LLM calls; use get_cost_totals to check whether the cost is
complete.
Without workspace the figures cover the whole organization, as the Cost Management page does for an
organization admin; this needs the organization admin role. Use workspace for one workspace. In that
organization view pipeline_name and Service names can't be used (they belong to a workspace); pass
Service ids instead.
Narrow the figures with services, providers and api_keys. They combine: usage must match every
kind you set, and any one value within a list.
: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 services: Restrict to these Services (deployment in the API; a published Service endpoint, not a
deployed pipeline, which is a pipeline). Each value is a Service name or its id, the key from
get_cost_breakdown with group_by='deployment'. Looking a Service up by name needs Services read as
well as Costs read; an id needs only Costs read.
:param providers: Restrict to these providers. Use the provider ids from get_cost_breakdown with
group_by='provider', such as bedrock_converse or openai, not their display names.
:param api_keys: Restrict to these API keys. Use the key ids from get_cost_breakdown with
group_by='api_key', never a key's secret token.
:returns: The daily cost, 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 |
|---|---|---|---|
| api_keys | No | ||
| end_date | No | ||
| services | No | ||
| providers | No | ||
| start_date | No | ||
| pipeline_name | No |