---
title: "Get Token Report"
method: GET
path: "/admin/tokens"
tags: ["admin-tokens"]
---

# Get Token Report

`GET /admin/tokens`

## Request

- Base URL: `https://app.zeno-works.ch` (the document declares no server; this is the origin it was published from)
- URL: `https://app.zeno-works.ch/admin/tokens`
- Auth: none declared

Where the LLM spend goes, and whether the stack is healthy (admin).

Tokens per day stacked by surface and service, the heaviest tenants, the model mix, the
cached-token share, and the share of calls whose `outcome` is not `ok`.

**`non_ok_share` is the health signal**, not the token total: `outcome='unknown'` names
a degraded remote leg — a call that never came back spent almost nothing and broke
something, so it is invisible in spend and visible here.

**Windowed, never all-time**, and `window_start` is in the response so the totals are
never read as more than they are: `llm_usage_event` has no prune job, so an all-time
aggregate is a full scan of a table that only grows. Capped at 90 days for the same
reason.

Charged tokens exclude cached ones and rows carrying an `uncharged_reason` — the
semantics `repos/llm_usage` already settled, so this page's totals agree with the
billing the same platform does. Cached tokens are reported as their own number rather
than netted out: they are the discount worth growing.

## Query parameters

- `days` integer

## Headers

- `authorization` string, nullable

## Cookies

- `access_token` string, nullable

## Response `200`

Successful Response

- TokenReportOut
  - `window_start` string, date-time, required
  - `as_of` string, date-time, required
  - `charged_tokens` integer, required
  - `cached_tokens` integer, required
  - `cached_share` number, required
  - `calls` integer, required
  - `non_ok_calls` integer, required
  - `non_ok_share` number, required
  - `by_day` DayPointOut[], required
    - `day` string, date-time, required
    - `surface` string, required
    - `service` string, required
    - `tokens` integer, required
  - `top_companies` CompanySpendOut[], required
    - `company_id` string, required
    - `company_name` string, required
    - `tokens` integer, required
  - `by_model` ModelSpendOut[], required
    - `provider` string, required
    - `model` string, required
    - `tokens` integer, required
    - `calls` integer, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/zeno-works/apis/zeno-api.md) · [All operations](https://skmtc.dev/zeno-works/apis/zeno-api/llms.txt) · [OpenAPI document](https://skmtc.dev/zeno-works/apis/zeno-api/revisions/1eb93dde146c?raw)
