# Usage

Canonical HTML: https://anchorshell.com/docs/usage

Review request counts, token use, and configured costs by model, provider, user, or API key.

Last updated: 2026-09-17

Usage shows how requests consume models, tokens, and configured spending over time. Compare workload patterns and providers; hosted attribution also separates users and API keys.

## Dashboard

1. Open **Usage**.
2. Choose the date range.
3. Review requests, input and output tokens, and cost.
4. Filter by provider or model.

Hosted attribution can show users and API keys. Organization-wide views require the appropriate plan and permission. An agent using its own key appears under that key.

Costs use your configured pricing. They are not a provider invoice. Missing pricing can produce a zero cost; it does not prove the provider call was free.

## API

Use an appropriately scoped [API key](https://anchorshell.com/docs/api) for these requests.

### Current usage

```bash
curl 'https://api.anchorshell.com/api/relay/stats/usage' \
  -H 'Authorization: Bearer <API_KEY>'
```

**Response — 200 OK**

Counters are returned by scope, metric, and window. Selected response fields shown.

```json
[
  {
    "scope_type": "global",
    "scope_id": "global",
    "metric": "requests",
    "period": "day",
    "used_value": 12,
    "window_start": "2026-09-17T00:00:00Z"
  }
]
```

### Spending summary

```bash
curl 'https://api.anchorshell.com/api/relay/stats/spend' \
  -H 'Authorization: Bearer <API_KEY>'
```

**Response — 200 OK**

used_value is in microdollars: 125000 = $0.125. Selected response fields shown.

```json
[
  {
    "scope_type": "global",
    "scope_id": "global",
    "metric": "spend",
    "period": "day",
    "used_value": 125000,
    "window_start": "2026-09-17T00:00:00Z"
  }
]
```

Results respect your self/organization visibility and entitlements.

## Next

[Queue](https://anchorshell.com/docs/queue).
