Metrics
This page defines every number on the Dashboard and on an application's Overview, so you know what each one counts and how Optiak calculates it. The metric names match the labels in the console.
How metrics are calculated
These rules apply to every metric on the Dashboard and on an application's Overview.
| Rule | What it means |
|---|---|
| Period | You select Today, 7d, 30d or Custom. Days start at midnight in the Europe/Madrid time zone. |
| Comparison | The console compares each figure with the same figure for the period of the same length immediately before. Change % is the change divided by the earlier value. If the earlier value is 0, the console shows no Change %. |
| Request | One API request from an application to the Gateway. Failed and blocked requests count. |
| Provider call | One attempt to send a request to a provider. A retry or a fallback adds a call. A request that a guardrail blocks has no call. |
| Empty values | When a rate, an average or a percentile has no data, the console shows no value. It does not show 0. |
Charts and tables
Each section shows one metric at a time. You can show it as a chart or as a table.
- Grouping. You can split a metric by Application, Project, Provider, Model, Tool or Reason. Total shows the metric with no split. Each metric offers only the groupings that apply to it.
- Bucket. The bucket is the time step of the chart: hour, day, week or month. The console picks the smallest step that gives 62 points or fewer. Weeks start on Monday. The first and the last bucket can be partial.
When the rows and the total differ
It affects Inference requests, Successful requests, Errored requests and Failed requests. Average cost per request and Success rate divide by these counts, so their Provider and Model rows are affected too. With every other grouping, the rows of a count, a token sum or Spend add up to the total.
Two causes change the sum of the rows:
- Fallback or retry. One request reaches more than one provider or model, and counts once under each. The rows add up to more than the total.
- Blocked before any provider call. The request counts in the total and in no row. The rows add up to less than the total.
Both causes can occur in the same period and cancel out. The rows then match the total, but they still count some requests twice and leave others out.
- Request A OpenAI1 provider call
- Request B OpenAIfallback Anthropic2 provider calls
- Request C Guardrail blocks it0 provider calls
Fallback
Request B counts under OpenAI and under Anthropic.
Block
Request A counts under OpenAI. Request C counts in no row.
Both
Requests A, B and C in one period.
Usage
| Metric | Definition | How it's calculated | Unit | Where it appears |
|---|---|---|---|---|
| Inference requests | Inference requests from applications to the Gateway. Failed and blocked requests count. | Count of requests. See when the rows and the total differ. | Count | Dashboard: summary card and chart. Projects list, for the last 30 days. |
| Input tokens | Prompt tokens sent to providers. | Sum of input tokens of every provider call, retries included. The sum includes tokens that the provider reads from or writes to its prompt cache. | Tokens | Dashboard: summary card and chart |
| Output tokens | Tokens that providers generated. | Sum of output tokens of every provider call. The sum includes reasoning tokens. | Tokens | Dashboard: summary card and chart |
| Total tokens | All tokens of every provider call. | Input tokens + output tokens. | Tokens | Dashboard: chart |
| Reasoning tokens | Output tokens that a model used to think before it answered. | Sum of reasoning tokens that providers report. Some providers report 0. | Tokens | Dashboard: chart |
| Cache hit rate | Share of input tokens that providers read from their prompt cache. | Cached input tokens ÷ input tokens. | % | Dashboard: summary card and chart |
Cost
| Metric | Definition | How it's calculated | Unit | Where it appears |
|---|---|---|---|---|
| Spend | What the provider calls cost at list price. | Sum of the price of every priced provider call, retries included. An unpriced call adds 0. | USD | Dashboard: summary card and chart |
| Average spend per day | Spend spread evenly over the period. | Spend ÷ days in the period. A day with no spend still counts. | USD | Dashboard: summary card |
| Average cost per request | What one request costs on average. | Spend ÷ requests. Requests that cost nothing count. By provider or model, see when the rows and the total differ. | USD | Dashboard: summary card and chart |
| Blended price per million tokens | The average price of one million tokens across all models. | Spend × 1,000,000 ÷ tokens of priced calls. The divisor leaves out unpriced calls. | USD | Dashboard: summary card and chart |
Where prices come from
Optiak prices each provider call when the request runs. It uses the price of the model that served the call:
- Built-in models use the provider's list price. The price includes the cache read and cache write rates, the long-context rates, and the priority and flex tiers where the provider has them.
- Custom provider models use the prices that an Organization Admin sets under Pricing (optional): input and output, plus cache read and cache write if set. A cache price left blank uses the input price. A price of 0 makes cached tokens free. See Custom providers.
How a change splits into volume, mix and rate
In the Table view, each row shows its part of the group's change over the previous period, and splits that change into key drivers:
| Column | Meaning |
|---|---|
| Share of change | How much of the group's whole change this row caused, in percentage points. The rows add up to the group's Change %, except when the rows and the total differ. |
| Volume | The group's total tokens changed. This row kept its share. |
| Mix | Rows gained or lost share. The group's total stayed the same. |
| Rate | The row's own price for each token changed. |
| Entered | The row was at 0 in the earlier period. This column holds its whole change. |
| Left | The row is at 0 in the later period. This column holds its whole change. |
Volume-Mix-Rate is a standard decomposition used in financial and operational analytics to decompose variance in costs into distinct drivers: overall quantity changes (Volume), changes in product or customer composition (Mix), and changes in unit costs (Rate). Here these concepts are specialized to the cost of requests to model providers.
Worked example: why Spend changedA change of +$700, split by provider, with every number shown.OpenClose
Spend grouped by Provider. M means million tokens. Amounts are rounded to whole dollars.
| Provider | Tokens | Price per 1M tokens | Spend | Volume | Mix | Rate | Entered | Left |
|---|---|---|---|---|---|---|---|---|
| OpenAI | 50M → 60M | $12 → $12 | $600 → $720 | +$358 | −$238 | $0 | ||
| Anthropic | 50M → 110M | $7 → $8 | $350 → $880 | +$301 | +$149 | +$80 | ||
| Mistral | 0 → 20M | $5 | $0 → $100 | +$100 | ||||
| Cohere | 10M → 0 | $5 | $50 → $0 | −$50 | ||||
| Total | 110M → 190M | $1,000 → $1,700 | +$659 | −$89 | +$80 | +$100 | −$50 |
- Volume +$659. OpenAI and Anthropic used 100M tokens before and 170M after. That growth, at each provider's share and price, adds $659.
- Mix −$89. OpenAI's share of tokens fell from 50% to 35%, and Anthropic's grew from 50% to 65%. Anthropic is cheaper, so the move lowers Spend. OpenAI loses $238, and Anthropic gains $149.
- Rate +$80. Anthropic's price went from $7 to $8 per 1M tokens, on 80M tokens on average. OpenAI's price did not change, so its Rate is $0.
- Entered +$100. Mistral had no spend before, so all of its $100 is Entered.
- Left −$50. Cohere has no spend now, so all of its $50 is Left.
Volume, Mix, Rate, Entered and Left add up to the row's Share of change.
Average cost per request and Blended price per million tokens are rates, so they have no Volume column. Their change splits into these parts:
- Rate: the row's own rate changed. Its weight stayed the same.
- Mix: weight moved from some rows to other rows. The rates stayed the same.
- Entered and Left: the row had no weight in one of the two periods. Optiak calculates this part from the difference between the row's rate and the group's average rate.
The weight of a row is the divisor of its rate. It is requests for Average cost per request, and priced tokens for Blended price per million tokens.
Worked example: why Average cost per request changedA change of +$0.06, split by provider. A new provider can lower a rate.OpenClose
Average cost per request grouped by Provider. The weight of each row is its share of requests. The group's average cost per request over the two periods is $1.00.
| Provider | Requests | Cost per request | Share of requests | Rate | Mix | Entered | Left |
|---|---|---|---|---|---|---|---|
| OpenAI | 50 → 80 | $1.20 → $1.20 | 50% → 40% | $0.00 | −$0.02 | ||
| Anthropic | 40 → 100 | $0.80 → $1.00 | 40% → 50% | +$0.09 | −$0.01 | ||
| Mistral | 0 → 20 | $0.50 | 0% → 10% | −$0.05 | |||
| Cohere | 10 → 0 | $0.50 | 10% → 0% | +$0.05 | |||
| Total | 100 → 200 | $0.97 → $1.03 | +$0.09 | −$0.03 | −$0.05 | +$0.05 |
- Rate +$0.09. Anthropic's cost per request went from $0.80 to $1.00. Its average share is 45%, so the average rises by $0.09. OpenAI's cost did not change, so its Rate is $0.00.
- Mix −$0.03. OpenAI costs more than the $1.00 average, and its share fell from 50% to 40%: −$0.02. Anthropic's mean cost, $0.90, is below the average, and its share grew: −$0.01.
- Entered −$0.05. Mistral costs $0.50, half the average, and now has 10% of requests. A cheap new row pulls the average down.
- Left +$0.05. Cohere cost $0.50 and had 10% of requests. A cheap row that leaves pushes the average up.
The other metrics show only Share of change. Percentiles show no split.
Reliability
When you group by Provider or Model, the counts below are provider calls, not requests. See when the rows and the total differ.
| Metric | Definition | How it's calculated | Unit | Where it appears |
|---|---|---|---|---|
| Successful requests | Requests that succeeded. | Count of successful requests. By provider or model: successful calls. | Count | Dashboard: summary card and chart |
| Errored requests | Requests that ended in an error. Blocked requests are not errors. | Count of errored requests. By provider or model: errored calls. | Count | Dashboard: chart |
| Failed requests | Requests that did not succeed. | Errored requests + blocked requests. By provider or model: errored calls. | Count | Dashboard: summary card and chart |
| Success rate | Share of requests that succeeded, without the requests that a guardrail blocked. A block shows that the policy works. It is not a failure. | Successful requests ÷ (successful requests + errored requests). Blocked requests are not in the divisor. By provider or model: over calls. | % | Dashboard: summary card and chart |
| End-to-end latency p50 | The median time from request to response. Half of the requests are faster. | 50th percentile of request duration. The percentile leaves out requests with no measured time. | ms | Dashboard: chart |
| End-to-end latency p95 | The time that 95% of requests stay under. | 95th percentile of request duration. The percentile leaves out requests with no measured time. | ms | Dashboard: summary card and chart |
| Provider latency p50 | The median time a request spent in provider calls. | 50th percentile of the provider time per request, retries added. The percentile leaves out requests with no provider call. | ms | Dashboard: chart |
| Provider latency p95 | The provider time that 95% of requests stay under. | 95th percentile of the provider time per request, retries added. The percentile leaves out requests with no provider call. | ms | Dashboard: chart |
| Top failure reasons | The most frequent reasons why requests failed. | Count of requests with a failure reason, grouped by reason. Blocked requests count. | Count | Dashboard: list |
Governance & Security
These metrics come from Guardrails. One request can run several checks.
| Metric | Definition | How it's calculated | Unit | Where it appears |
|---|---|---|---|---|
| Total evaluations | Guardrail checks that ran. | Count of checks. | Count | Dashboard: summary card and chart |
| Blocked requests | Requests that a guardrail stopped. | Count of blocked requests. A request that several checks block counts once. | Count | Dashboard: chart |
| Blocked rate | Blocked requests for each guardrail check that ran. | Blocked requests ÷ checks that ran. The divisor is checks, not requests. | % | Dashboard: summary card and chart |
| Guardrail added latency | The average time of one guardrail check. | Total check time ÷ checks. A check with no measured time counts as 0 ms. | ms | Dashboard: summary card and chart |
| Audit detection rate | Share of checks that found a problem. | Checks that detected, blocked, redacted or replaced ÷ checks that did not end in an error. | % | Dashboard: summary card and chart |
| Violations by application | Checks that found a problem, for each application. | Count of checks that detected, blocked, redacted or replaced, grouped by application. | Count | Dashboard: table |
Data Integrations
These metrics come from the retrieval engine in Data Integrations. One retrieval is one search. One request can run several retrievals.
| Metric | Definition | How it's calculated | Unit | Where it appears |
|---|---|---|---|---|
| Average chunks per request | Documents that retrieval added to one request, on average. | Documents retrieved ÷ requests that used retrieval. | Count | Dashboard: summary card and chart |
| Retrieval failures | Requests where retrieval failed. | Count of requests with a failed retrieval. A request counts once. No value if no retrieval ran. | Count | Dashboard: summary card and chart |
| Tokens contributed by retrieved chunks | Tokens of the documents that retrieval added to prompts. | Sum of document tokens. No value if no retrieval ran. | Tokens | Dashboard: summary card and chart |
| Retrieval added latency | The average time of one retrieval. | Total retrieval time ÷ retrievals. A retrieval with no measured time counts as 0 ms. | ms | Dashboard: summary card and chart |
Tools
These metrics come from tool calls through the MCP Gateway. See Tools. A tool call is an MCP tools/call request. A tool list request is an MCP tools/list request.
| Metric | Definition | How it's calculated | Unit | Where it appears |
|---|---|---|---|---|
| MCP tool calls | Requests to run a tool. | Count of tools/call requests. The count includes calls that ended in an error before the tool ran. | Count | Dashboard: summary card and chart |
| MCP tool list requests | Requests that ask a server for its tools. They run no tool. | Count of tools/list requests. | Count | Dashboard: chart |
| Successful MCP tool calls | Tool calls that completed without an error. | Count of successful tool calls. | Count | Dashboard: chart |
| Failed MCP tool calls | Tool calls that ended in an error. | Count of failed tool calls. The count includes calls to an unknown tool and calls that went past the time limit. | Count | Dashboard: summary card and chart |
| MCP tool call success rate | Share of tool calls that succeeded. | Successful MCP tool calls ÷ MCP tool calls. The divisor leaves out tool list requests. | % | Dashboard: summary card and chart |
| MCP tool latency p50 | The median time a tool ran. | 50th percentile of tool run time per call. The percentile leaves out calls where no tool ran. | ms | Dashboard: chart |
| MCP tool latency p95 | The tool run time that 95% of calls stay under. | 95th percentile of tool run time per call. The percentile leaves out calls where no tool ran. | ms | Dashboard: summary card and chart |
| Top MCP failure categories | The most frequent causes of failed MCP tool calls. | Count of failed MCP tool calls, grouped by the tool's failure category. A call with no category counts under its request failure reason. | Count | Dashboard: list |
Application overview
An application's Overview shows the Dashboard sections for that application. The Overview uses the metric definitions on this page, with the data of that application only. Where a table says Dashboard, the Overview shows the same card or chart. The Overview has no Application or Project grouping.
Related
- Application: the Overview and Requests tabs of one application.
- Budgets: spend limits for projects and applications.