View Cost and Token UsageBeta
To keep track of your LLM spend and find out which models and services drive it, use the Cost Management page. It shows how much your LLM calls cost and how many tokens they use.
About This Task
The costs on this page are estimates. We calculate them from the token usage recorded in your traces and the price of each model. You can also get the same data through the API, with the cost endpoints for totals, cost over time, breakdown, and cost flow. The breakdown endpoint returns one page of groups at a time. Use sort_by, sort_order, limit, and page_number to sort the groups and page through them, and check has_more to see whether more pages follow. Users with the Costs permission must pass a workspace_id. Only organization Admins can leave it out to get organization-wide data. To check credits and storage units instead, see Understand Your Pipeline Usage.
Organization Admins can see the cost data of the whole organization and of any workspace. Other users can open the page if their role has the Costs permission. They see the data of the workspace they're in and can't switch to another one. For details, see User Roles and Permissions.
Open the Cost Management Page
- In Haystack Enterprise Platform, go to the Cost Management page.
- Check the period in the Total spend label. The page opens on This month.
The page refreshes every minute while it's open. To refresh it right away, click the Auto-refresh indicator.
Narrow Down the Data
To see the cost of one workspace, service, pipeline, or API key, or of a different period, use the bar at the top of the page. It stays in view as you scroll.
| Control | What it does |
|---|---|
| Scope | Shows what the page covers: the organization, then a workspace, then a service or pipeline. Organization Admins start at the organization. Choose Select workspace to narrow to one workspace, then Select service or pipeline to narrow further. To go back up, choose Show the whole workspace or Show the whole organization. Other users see their workspace and can't change it. |
| Date range | Sets the period. Choose This month, Last month, Last 7 days, Last 30 days, or Last 90 days, or pick your own dates. |
| All API keys | Shows only the calls made with the API key you pick. |
| Filtered by | Lists the filters you applied, for example a provider. Remove one, or click Clear filters to remove all. |
Read the Summary
To check your spend and usage at a glance, read the summary at the top of the page. It shows the numbers for the scope and period you chose.
| Metric | What it shows |
|---|---|
| Total spend | The estimated cost of all LLM calls in the period, next to the change compared with the previous period. It reads No prior period to compare yet when there's nothing to compare with. |
| Requests | The number of LLM calls in the period. |
| Tokens | The number of tokens those calls used. |
| Avg / request | The average cost of one call. |
| Avg / day | The average spend per day in the period. |
| Projected this month | The month-to-date spend plus the average daily spend of the last seven days, applied to the remaining days of the month. Use it to see where the month is heading. |
A dash instead of a value means there's nothing priced yet.
Find What Drives the Spend
Scroll down to see where the spend comes from. Each section follows the scope, period, and filters you chose.
- Daily spend: A bar for every day in the period, with the peak day and its cost. Use it to spot spikes.
- By provider: The spend of every provider, such as OpenAI or Anthropic. Click a provider to filter the whole page by it.
- Top models: The five most expensive models, so you can see which ones cost the most. For the full list, group the Spend breakdown table by Model.
- Cost flow: A flow chart that follows the spend from the organization through workspaces and services to models. Use it to see which workspaces and services send the most spend to which models. When you narrow to one workspace, it starts at the workspaces column. Hover over a flow to see its cost. The Services column covers both services and pipelines.
- Spend breakdown: A table that splits the spend by the Group by option you choose. Use it to compare the cost, requests, and tokens of each workspace, service, pipeline, model, or provider.
Use the Spend Breakdown Table
- Under Group by, choose how to split the spend. The options depend on your scope:
- Whole organization: Workspace, Service, Pipeline, Model, and Provider.
- One workspace: Service, Pipeline, Model, and Provider.
- One service or pipeline: Model and Provider.
- Read the columns. The first column is named after your Group by choice. The others are Share of spend, Requests, Tokens, Avg / req, and Cost. The Total row sums up everything in the table.
- To narrow the whole page, click a row. A workspace, service, or pipeline row sets the scope to it. A provider row filters the page by that provider. Model rows can't be selected.
Some calls don't belong to the group you chose. For example, a call made through a service has no pipeline. The table shows them in a separate row, such as No pipeline or No service, so the rows add up to the Total row.
Check for Calls That Aren't Counted
If some calls can't be included in the total, a warning appears above the charts. It tells you how many calls and tokens are missing and what share of the total they make up. Until these calls are priced, your actual spend is higher than the page shows. Click Show details to see why:
- Calls with no price: We can't match their model to a price. The warning lists these models under Unmatched models. Organization Admins can click a model name to set its price.
- Calls still being priced: This usually clears within seconds, and the page updates by itself.
Related Information
Was this page helpful?