Per LLM call
Each model call is streamed with usage enabled. When the stream ends, OpenRouter sendsprompt_tokens and completion_tokens.
- Prompt tokens — system prompt, history, images, and tool results sent into that call
- Completion tokens — text and tool-call JSON the model wrote
Per run
A run can make several LLM calls (first reply, then after tools). Galaxy adds those usages together and stores them on the run and the assistant message. The footer showsprompt + completion as N tokens.
Not in the token count
- Magica tools — those use application credits
- Failed OpenRouter retries — only the attempt that returns counts
- A guessed local tokenizer — if OpenRouter omits usage, that call is
0