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

# Usage Accounting

> How ARouter tracks and reports token usage, cost, and timing for every request.

Every API response from ARouter includes detailed usage information. This lets you track costs and token consumption in real time without making additional API calls.

## Usage in Responses

The `usage` object is returned in every non-streaming response (and in the final chunk of streaming responses):

```json theme={null}
{
  "id": "gen-abc123",
  "model": "openai/gpt-5.4",
  "usage": {
    "prompt_tokens": 120,
    "completion_tokens": 85,
    "total_tokens": 205,
    "prompt_tokens_details": {
      "cached_tokens": 60,
      "audio_tokens": 0
    },
    "completion_tokens_details": {
      "reasoning_tokens": 30,
      "audio_tokens": 0,
      "accepted_prediction_tokens": 0,
      "rejected_prediction_tokens": 0
    }
  }
}
```

## Token Fields

| Field                                                  | Description                                          |
| ------------------------------------------------------ | ---------------------------------------------------- |
| `prompt_tokens`                                        | Total input tokens (includes cached tokens)          |
| `completion_tokens`                                    | Total output tokens (includes reasoning tokens)      |
| `total_tokens`                                         | Sum of prompt + completion tokens                    |
| `prompt_tokens_details.cached_tokens`                  | Tokens served from the provider's prompt cache       |
| `completion_tokens_details.reasoning_tokens`           | Tokens used for internal reasoning (thinking models) |
| `completion_tokens_details.accepted_prediction_tokens` | Speculative decoding tokens accepted                 |
| `completion_tokens_details.rejected_prediction_tokens` | Speculative decoding tokens rejected                 |

## Cost Tracking

ARouter bills based on the actual token counts reported by the upstream provider. Pricing is passed through at cost — no inference markup. To calculate exact cost:

```
cost = (prompt_tokens × input_price_per_token) + (completion_tokens × output_price_per_token)
```

Cached tokens are typically billed at a reduced rate (often 50% of the standard input price). See [Prompt Caching](/en/guides/features/prompt-caching) for details.

## Streaming Usage

In streaming mode, the final SSE chunk includes the full usage object with empty `choices`:

```json theme={null}
{
  "id": "gen-abc123",
  "choices": [],
  "usage": {
    "prompt_tokens": 120,
    "completion_tokens": 85,
    "total_tokens": 205
  }
}
```

Enable streaming usage by passing `stream_options: { include_usage: true }` in your request.

## Dashboard Reporting

All usage data is visible in the [Activity](https://arouter.ai/activity) page with filtering by:

* Time period (1 hour → 1 year)
* Grouping (Model, API Key, Creator)

Export as CSV or PDF for accounting and budget planning. See [Activity Export](/en/guides/administration/activity-export).

## API Access

Retrieve transaction history and balance programmatically:

```bash theme={null}
# Get current balance
curl https://api.arouter.ai/v1/billing/balance \
  -H "Authorization: Bearer $AROUTER_API_KEY"

# List recent transactions
curl https://api.arouter.ai/v1/billing/transactions \
  -H "Authorization: Bearer $AROUTER_API_KEY"
```
