> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/technical-reference/evaluations-and-observability/token-usage-credits-and-cost-definitions.md).

# Token Usage, Credits, and Cost Definitions

Usage and cost metrics help explain resource consumption. Read each metric’s unit and scope before estimating the cost of a workflow.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSQ1Sgy933krTyK0S4JpP%2Fuploads%2FvnpTf6csXv3tGm82OpwD%2FG077.mp4?alt=media&token=7c691632-03b6-4662-8fc0-12daab62568a>" %}

## Before you begin

Access to usage reporting and the relevant provider or billing settings.

## Usage and cost metrics

| Term           | Definition                                                                                                                                                |
| -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Token          | A unit used by a model to process text or other supported input and output. Token counts do not map to a fixed number of words across content and models. |
| Credit         | A unit used in supported StackAI usage reporting. It is not necessarily equivalent to a token or currency amount.                                         |
| Model provider | The service hosting the selected model. Provider account access and billing can differ from StackAI-managed usage.                                        |
| Aggregation    | A calculation over selected records, such as a count, sum, or average. Choose one that matches the field type and reporting question.                     |
| Retry          | A repeated attempt after a failed or uncertain operation. It can repeat external changes; use it only when the result is understood.                      |

## Review usage and costs

1. Select the project, date range, and metric.

![Review the reporting period and metrics before interpreting the results.](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/GozcbJnn9Fpcep22SVSm/assets/g077-g077-01-overview.png)

Review the reporting period and metrics before interpreting the results.

2. Inspect token usage, repeated model calls, and provider actions in representative runs.
3. Compare reported StackAI usage with any separately billed provider account.

You can identify the operations that contribute to usage.

## Behavior and limitations

Tokens, credits, and currency amounts are different measures. A connected provider account can be billed separately. Zero usage in one report does not prove the entire workflow was free. Tool calls, retries, and evaluation can add work beyond the final visible answer.

## Related resources

[Inspect project analytics](https://docs.stackai.com/guides-and-quickstarts/evaluations-and-observability/inspect-project-analytics.md)

[Evaluation Datasets and Input Mapping](https://docs.stackai.com/technical-reference/evaluations-and-observability/evaluation-datasets-and-input-mapping.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stackai.com/technical-reference/evaluations-and-observability/token-usage-credits-and-cost-definitions.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
