> ## Documentation Index
> Fetch the complete documentation index at: https://weights.fyi/run/llms.txt

# GET /v1/usage.csv

```text
GET https://weights.fyi/run/v1/usage.csv
Authorization: Bearer <token>                    scope: read
```

**Available since:** 2026-10-08, with the exports, built on the evening the service went live.

**Answer time:** streamed: the first rows arrive at once and the file is written as it is read, however long your account's history is.

Downloads every credit and every charge of your account, oldest first, as one CSV file. It is the record to give your bookkeeping, or to reconcile against your own: each row is one line of your account's ledger, with its amount exact to the micro-dollar, what it was in words, and for a charge, the jobs it covers.

Where [GET /v1/usage](/run/docs/reference/usage.md) shows your recent jobs with their cost, this file shows the ledger itself: one charge row per batch of pages answered, per chat call and per stretch of training, written as the work lands, its `what` naming the unit, the model and the units, its last column the job. A job's own cost is the sum of its charge rows. Rows written before prices per unit are charges by run of the model. The file has no row limit and is not cut into pages: the service writes it as it reads your ledger, 1,000 rows at a time, so the download costs the same however long your history is. It is sent with chunked transfer encoding and a `Content-Disposition` that names it `usage.csv`, so a browser saves it as a file. If the download is interrupted, the file ends without the closing chunk, and your client reports an incomplete answer rather than a short file that looks whole; download it again.

## Request

| Name | Where | Required | Meaning |
|---|---|---|---|
| `Authorization` | header | yes | `Bearer` and a token that holds the `read` scope. |

The call takes no parameters.

## Return value

The columns, in order:

| Column | Meaning |
|---|---|
| `id` | The ledger row's number. Rows are written in this order and never change. |
| `time` | When the row was written, UTC. |
| `kind` | `topup` (credit you paid for), `grant` (credit we granted), `refund`, `charge` (a charge for work) or `option` (the fee of an option such as Tracing and tracking). |
| `what` | The same in words: "Credit added", "Credit granted", "Refund", for a charge the unit and its count ("Pages answered, laya-page-role: 64"; "Chat call, ..."; "Training tokens, ..."), or the option's name. |
| `amount_usd` | The amount in dollars with six decimals; credit is positive and charges are negative. |
| `amount_usd_micros` | The same amount as a whole number of micro-dollars. |
| `jobs` | For a charge or an option fee, the jobs it covers, separated by spaces; empty for credit. |

**200 OK** with a CSV file, `text/csv; charset=utf-8`: a header line with the seven column names above, then one line per ledger row, oldest first. Lines end in CRLF, as CSV files do. The answer carries `Content-Disposition: attachment; filename="usage.csv"` and `Transfer-Encoding: chunked`.

## Errors

| Status | Code | When it happens | What to do |
|---|---|---|---|
| `401` | `unauthorized`, `invalid_token`, `token_revoked`, `token_expired` | No token, or one that does not work (any more). | Use a valid token. |
| `403` | `scope_required`, `account_suspended` | The token lacks `read`, or the account is suspended. | Use a token with `read`. |

A failure once the file has started cannot be a JSON error any more; it shows as an answer that ends early, as described above.

## Examples

```sh
curl -s -o usage.csv https://weights.fyi/run/v1/usage.csv -H "Authorization: Bearer $WEIGHTS_API_KEY"
```

The file of an account that was granted $25 and has not been charged yet:

```text
id,time,kind,what,amount_usd,amount_usd_micros,jobs
1,2026-10-09T08:28:09.774Z,grant,Credit granted,25.000000,25000000,
```

## History

- 2026-10-08: added with the exports and the Tracing and tracking option.
- 2026-10-10: a charge row per batch of pages, chat call or stretch of training, as the work lands.

## See also

- [GET /v1/usage](/run/docs/reference/usage.md) for the balance and the cost of each job.
- [Prices and billing](/run/docs/prices.md) for how a run's charge is shared between jobs, and [Tracing and exports](/run/docs/tracing.md) for the other downloads.
