Valistry

xAI usage

Dollars per day and model for one team, from the Management API's usage query. No request, no prompt, no key list.

Access

Kind
A read-only key you paste
What to give
Management key and team id
Why that one
An xAI management key, which is separate from an API key. Valistry asks the team's usage endpoint for dollars per day and model, and calls nothing else.

What it attributes on its own

From the source
day · model · endpoint kind (chat, image) · what xAI charged
Needs a rule or a trace
tokens — the reference names no token field, so none is asked for · API key — spend is per team · workflow · agent · outcome

The addresses it calls

  • https://management-api.x.ai/v1/billing/teams/

Only these. A call anywhere else is refused before it leaves, and every call is logged.

Connecting it

  1. Create a management key. Console → the team's settings → Management API keys → Create. Open ↗
  2. Copy the team id. Team settings show it. Open ↗
  3. Paste both and click Test and connect. Valistry reads the last seven days, reports what it found, then fills thirty.

xAI traffic through OpenRouter, a gateway or OpenTelemetry carries tokens; this source carries the bill. Where both are connected, connect this one and disconnect the other for xAI traffic, or the same call counts twice.