Most ways to track LLM token usage need instrumentation: an SDK wrapper, a logging middleware, or a proxy in front of the model. For Google's Vertex AI and Gemini API, you don't need any of that — the token usage is already itemised in your Google Cloud billing export. StackSpend reads it straight from there.
This matters because instrumentation is exactly the thing platform teams can't always add: you can't wrap a model call that runs in someone else's service, and you don't want a proxy in the hot path. Reading the bill is agentless by construction.
Where the tokens actually are
Google's standard BigQuery billing export itemises Vertex AI and Gemini spend down to the SKU — and for generative models, those SKUs are token-denominated. A single day's export contains lines like "Generate content input token count Gemini 2.5 Flash" and "Generate content output token count Gemini 2.5 Pro", each carrying the token quantity and the cost. The model, the direction (input vs output vs cached), and the token count are all right there in the description.
The catch is that Google's SKU descriptions are free-form prose and change constantly as new models ship, and some token SKUs are billed under a requests unit rather than tokens. A naive parser misses them, which is why raw GCP cost tools show you a dollar figure but no tokens.
How StackSpend reads it
StackSpend connects to the same billing export you'd use for cost — no extra permission, no second integration — and does three things the raw export doesn't:
- Recognises token-denominated SKUs even when Google labels them with a
requestsunit, so the token quantities aren't silently dropped. - Extracts the model, direction, and modality from the SKU description — resolving "Gemini 2.5 Flash Text Input" to the model
gemini-2.5-flash, theinputdirection, and the token count. - Classifies novel SKUs with an LLM when a brand-new wording appears that no rule matches, so a newly released model shows up correctly without waiting for a code change.
The result lands in the AI Explorer alongside every other provider: Vertex and Gemini usage by model, in tokens, with the input/output/cache split — from the bill you already export.
What you can and can't get this way
Reading the bill gives you model- and project-level token usage for Vertex and Gemini, because the export carries the model SKU and the GCP project. What it can't give you is per-user attribution — Google's billing export has no user dimension, so user-level Vertex usage needs a proxy or request logging you'd add yourself. StackSpend is explicit about that rather than showing an empty user column (see our approach to honest coverage).
Related
- AI Explorer — Vertex and Gemini tokens by model, next to every other provider
- GCP Cost Monitoring — the full Google Cloud cost picture
- Model Recommendations — cheaper models at your real token mix
- Why Your Claude API Bill Is So High — the same token-mechanics thinking for Anthropic