25 · AI usage & cost
Assistant → Usage & cost: “Every time the assistant runs: chats, check-ins, emails it handled and the morning brief.” Data: GET /api/ai/usage. Code: worker/src/ai-usage.js. Table ai_usage (migration 0015).
What’s logged
One row per model run:
| Column | Meaning |
|---|---|
source |
chat (Chat in the app), checkin (Check-in questions), email (Email assistant), brief (Morning brief, including previews) |
ref |
the chat message / email row it belongs to; unique with source, so the backfill can be re-run safely |
model |
which model (’’ for old backfilled rows) |
actor_email |
who it was for, when known |
input_tokens |
uncached input |
cache_write_tokens, cache_read_tokens, output_tokens |
split as Anthropic bills them |
Logging never throws: if it fails, the run still completes and a line is logged.
The page
- Periods: Today, This month, Last 30 days, All time.
- Breakdowns: By feature, By who asked (“Chats, check-ins you started and emails you sent. The morning brief and scheduled check-ins are for both of you.”), By month.
- Columns: Runs, Tokens, Cost. “Nothing in this period.”
- “* Some runs used a model with no known price and aren’t included in the cost.”
How cost is worked out
US dollars at Anthropic’s list prices, per million tokens, dated PRICES_AS_OF = '2026-11':
| Model | Input | Output | Cache read |
|---|---|---|---|
| claude-haiku-5-5 (default) | $0.10 | $0.50 | $0.01 |
| claude-sonnet-5-5 | $2 | $10 | $0.10 |
| claude-opus-5-5 | $4 | $20 | $0.20 |
| claude-fable-5-2 | $8 | $40 | $0.20 |
| claude-fable-5-1 | $10 | $50 | $0.25 |
| claude-sonnet-5 | $2 | $10 | $0.20 |
| claude-opus-5 | $5 | $25 | $0.50 |
| claude-haiku-4-5 | $1 | $5 | $0.10 |
Cache writes cost 1.25× input. History from before 0015 was backfilled from the stored token counts and costed at the full input price, an upper estimate (labelled on the page). It’s an estimate: the Anthropic invoice is the final word.