# --llm-usage

Source: https://zshot-cli.com/reference/flags/diagnostics/llm-usage/
Markdown: https://zshot-cli.com/reference/flags/diagnostics/llm-usage/index.md
Section: [Reference](https://zshot-cli.com/reference/) › [Flags](https://zshot-cli.com/reference/flags/) › [Diagnostics](https://zshot-cli.com/reference/flags/diagnostics/)
CLI: `--llm-usage` · REST: CLI only
Value: `PATH`

Writes the tokens each model spent to a JSON file: one entry per URL, with a row for each navigator and the formatter.

## Fields

```json
[{"url": "https://zshot-cli.com", "usage": [{
  "name": "anthropic", "role": "navigator", "provider": "anthropic",
  "model": "claude-opus-5-5", "calls": 6, "input_tokens": 41900,
  "output_tokens": 1870, "cache_read_tokens": 12300, "cache_write_tokens": 2100,
  "images": 6
}]}]
```

A row is named by the navigator's `name=`, so each [`--navigator-type`](/reference/flags/navigator/navigator-type) and the `writer=true` one count apart. `input_tokens` includes the cached input; `cache_read_tokens` and `cache_write_tokens` are the cached part. `images` counts the screenshots sent, earlier frames of the page included. `cost_usd` is the dollars the provider reported the calls cost, present only where it reports one, as OpenRouter does.

## Server

A render that called a model answers with the same rows in an `X-Zshot-LLM-Usage` header, an RFC 8941 list:

```
X-Zshot-LLM-Usage: "scout";role=navigator;provider="typesafe";model="jev-latest";calls=31;input=58210;output=402;cache-read=0;cache-write=0;images=0
```

A reported cost is the `cost-usd` parameter, a string of dollars such as `cost-usd="0.000067"`.

## Example

**CLI**

```sh
zshot -f page.png \
  --navigate "Open the first chapter" \
  --navigator-type "anthropic://YOUR_API_KEY@" \
  --llm-usage usage.json \
  https://zshot-cli.com/example_assets/winnie-the-pooh/
```

## Related

Flags:

- [`--llm-debug`](https://zshot-cli.com/reference/flags/diagnostics/llm-debug/)
- [`--navigator-type`](https://zshot-cli.com/reference/flags/navigator/navigator-type/)
- [`--llm-format-model`](https://zshot-cli.com/reference/flags/document/llm-format-model/)
- [`--navigate`](https://zshot-cli.com/reference/flags/navigator/navigate/)

Topics:

- [RFC 8941](https://www.rfc-editor.org/rfc/rfc8941)

## Navigation

- [Examples](https://zshot-cli.com/examples/)
- [Download](https://zshot-cli.com/download/)
- [Purchase](https://zshot-cli.com/purchase/)
- [Reference](https://zshot-cli.com/reference/)
  - [Formats](https://zshot-cli.com/reference/formats/)
  - [Flags](https://zshot-cli.com/reference/flags/)
    - [Common](https://zshot-cli.com/reference/flags/common/)
    - [Agents](https://zshot-cli.com/reference/flags/agents/)
    - [Archive](https://zshot-cli.com/reference/flags/archive/)
    - [Browser](https://zshot-cli.com/reference/flags/browser/)
    - [Diagnostics](https://zshot-cli.com/reference/flags/diagnostics/)
      - [--axtree](https://zshot-cli.com/reference/flags/diagnostics/axtree/)
      - [--axtree-only-visible](https://zshot-cli.com/reference/flags/diagnostics/axtree-only-visible/)
      - [--llm-debug](https://zshot-cli.com/reference/flags/diagnostics/llm-debug/)
      - **--llm-usage**
      - [--network-log](https://zshot-cli.com/reference/flags/diagnostics/network-log/)
      - [--pprof-captures-navigation](https://zshot-cli.com/reference/flags/diagnostics/pprof-captures-navigation/)
      - [--pprof-cpu](https://zshot-cli.com/reference/flags/diagnostics/pprof-cpu/)
      - [--pprof-cpu-interval-us](https://zshot-cli.com/reference/flags/diagnostics/pprof-cpu-interval-us/)
      - [--pprof-memory](https://zshot-cli.com/reference/flags/diagnostics/pprof-memory/)
      - [--pprof-memory-interval-bytes](https://zshot-cli.com/reference/flags/diagnostics/pprof-memory-interval-bytes/)
      - [--pprof-no-gzip](https://zshot-cli.com/reference/flags/diagnostics/pprof-no-gzip/)
      - [--trace](https://zshot-cli.com/reference/flags/diagnostics/trace/)
      - [--trace-captures-navigation](https://zshot-cli.com/reference/flags/diagnostics/trace-captures-navigation/)
      - [--trace-no-gzip](https://zshot-cli.com/reference/flags/diagnostics/trace-no-gzip/)
      - [--trace-no-screenshots](https://zshot-cli.com/reference/flags/diagnostics/trace-no-screenshots/)
    - [Document](https://zshot-cli.com/reference/flags/document/)
    - [Image](https://zshot-cli.com/reference/flags/image/)
    - [Navigator](https://zshot-cli.com/reference/flags/navigator/)
    - [Security](https://zshot-cli.com/reference/flags/security/)
    - [Server](https://zshot-cli.com/reference/flags/server/)
    - [Video](https://zshot-cli.com/reference/flags/video/)
  - [Agents](https://zshot-cli.com/reference/agents/)
  - [Configuration](https://zshot-cli.com/reference/configuration/)
  - [Crawling](https://zshot-cli.com/reference/crawling/)
  - [Docker](https://zshot-cli.com/reference/docker/)
  - [Exit Codes](https://zshot-cli.com/reference/exit_codes/)
  - [Linux](https://zshot-cli.com/reference/linux/)
  - [LLM Connections](https://zshot-cli.com/reference/llm_connections/)
  - [LLM Formatting](https://zshot-cli.com/reference/llm_formatting/)
  - [Local Inputs](https://zshot-cli.com/reference/inputs/)
  - [Navigator](https://zshot-cli.com/reference/navigator/)
  - [Security](https://zshot-cli.com/reference/security/)
  - [Server](https://zshot-cli.com/reference/server/)
  - [Shell completions](https://zshot-cli.com/reference/shell_completions/)
  - [Storage](https://zshot-cli.com/reference/storage/)
  - [Timeouts](https://zshot-cli.com/reference/timeouts/)
  - [Web Bot Auth](https://zshot-cli.com/reference/web_bot_auth/)
- [Support](https://zshot-cli.com/support/)
- [Changelog](https://zshot-cli.com/changelog/)

Site index: https://zshot-cli.com/llms.txt

