# Usage

> Track token consumption per provider, per model and per feature, and compare it with the previous period.

Source: https://www.opendb.tools/en/docs/usage

**Settings → Usage** shows what the models have consumed.

## What is measured

Every call to a model is recorded, whichever assistant made it. For each call, OpenDB keeps:

- the provider and the model;
- the feature involved;
- input and output tokens;
- tokens read from and written to the provider's cache;
- reasoning tokens;
- the duration of the call, and whether it failed.

The content of messages is not recorded here.

## Choose the period

Seven days, thirty days, ninety days, one year, or the whole history.

## Read the screen

### The tiles

Four figures, each **compared with the previous period**:

- the total number of tokens;
- the number of calls;
- the share of tokens read from the cache;
- the average response time.

### The token breakdown

A bar shows the share of each kind of token: input, output, cache, reasoning.

### Per provider and per model

One card per provider details the consumption of each of its models.

### Per feature

| Feature | Where the consumption comes from |
|---|---|
| Conversation | The agent of the chat and the terminal |
| Table chat | The quick chat of the Tables tab |
| Filter | The plain-language filter |
| Analysis | The Analyze button |
| Indexes | The index advisor |
| Table design | The assistant of the table designer |
| Query writing | Write with AI, in the SQL editor |
| Review | Fix, Explain, Optimize |
| Title | The title generated for each conversation |

### The curve over time

Consumption per day or per month, broken down by provider. The curve downloads as a PNG image.

## Reduce consumption

- **Lower the limit of rows read per query** in **Settings → AI agent**. Fewer rows sent to the model means fewer tokens.
- **Ask for a display rather than a read.** "Show me the orders" produces an [artifact](/en/docs/artifacts), whose rows do not go through the model.
- **Keep the standard effort** for simple requests.
- **Use the lightest assistant**: the plain-language filter costs less than a conversation.
- **Choose a smaller model**, or a [local model](/en/docs/ollama).

## The provider's cache

The agent's instructions and the description of its tools are identical from one message to the next. Providers that allow it keep them in a cache: the following turns of a conversation cost less and answer faster.

The "share read from the cache" tile measures this effect. A high share is good news.

## Limits

- OpenDB counts **tokens**, not amounts: prices depend on your contract with the provider.
- API keys are shared by the instance. There is no per-user quota.
- Calls made by an external agent through the [MCP server](/en/docs/mcp-server) are not counted: they are billed to that agent.
