> For the complete documentation index, see [llms.txt](https://docs.zaia.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zaia.app/inbox/chat-history/estimated-llm-costs.md).

# Estimated LLM Costs

## Estimated LLM Costs

The **Inspection Panel** estimates LLM usage and costs for executions that use a custom provider.

Open an Agent message in **Chat History**, then select an execution to view its details.

### What the inspection shows

The cost section includes:

* Total input tokens.
* Total output tokens.
* Estimated total cost in USD.
* A per-iteration breakdown of model, provider, tokens, and estimated cost.

Expand an iteration to review each LLM use recorded for that event. An event can include multiple LLM calls.

{% hint style="info" %}
Costs are estimates. Actual provider charges can vary by model, provider, and pricing changes.
{% endhint %}

### What is included

The estimate covers LLM calls across the complete execution tree. This includes:

* The selected execution and its child executions.
* Retry attempts before and after the selected execution.
* Agent iterations, workflow LLM nodes, JSON conversions, and supporting tools.

This gives a consolidated view of primary, supporting, and retried LLM calls.

### When costs are available

Cost estimates appear only for executions using a configured custom provider. Zaia internal provider usage is not included.

Each recorded LLM call includes its model, provider, input tokens, and output tokens. Zaia calculates the estimate using the configured per-million-token price for that model.

### Understanding N/A

The inspection shows `N/A` when it cannot produce a reliable estimate. This happens when:

* The model has no configured price.
* Input or output token data is unavailable for any recorded use.
* A custom-provider event has no recorded LLM usage.

In the last case, the complete aggregate shows `N/A`. Input and output token totals are also unavailable. This prevents incomplete tracking from producing a misleading total.

### Related configuration

Add your API token in [Providers](/settings/providers.md) before selecting a custom provider for an Agent.
