> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fastrun.si/llms.txt
> Use this file to discover all available pages before exploring further.

# Pricing and usage

> What a request costs and where to see your usage.

You pay per token. There is no charge per request, and failed requests are free.

| Model | Input | Cached input | Output |
| - | - | - | - |
| `google/gemma-4-31b-it` | \$0.50 | \$0.10 | \$0.90 |

Prices are in US dollars per million tokens.

## How tokens are counted

Every response reports its tokens in `usage`:

```json theme={null}
"usage": {
  "prompt_tokens": 1200,
  "completion_tokens": 300,
  "total_tokens": 1500,
  "prompt_tokens_details": { "cached_tokens": 1024 }
}
```

* **Input** is `prompt_tokens` minus `cached_tokens`.
* **Cached input** is `cached_tokens`: input that was served from the prompt cache. See
  [Prompt caching](https://docs.fastrun.si/guides/prompt-caching.md).
* **Output** is `completion_tokens`, including the model's thinking when [reasoning](https://docs.fastrun.si/guides/reasoning.md) is on.

The request above costs (176 × $0.50 + 1,024 × $0.10 + 300 × $0.90) ÷ 1,000,000 = $0.00046.

Streamed responses count the same way. fastrun reads the token counts from the end of the stream even when you don't
ask for them with `stream_options.include_usage`.

Only successful responses (HTTP 2xx) are counted. If you close a stream early, generation stops.

## Your usage

The [Usage](https://fastrun.si/dashboard/usage) page of the dashboard shows requests, tokens and the estimated cost,
by UTC day and by key, for the last 30 days. A request appears there as soon as its response has ended.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.