xAI (Grok)
What Plutus imports
Section titled “What Plutus imports”- Daily spend by model and request type (Grok chat, image, and tool usage)
Connecting
Section titled “Connecting”Method: Management API Key
xAI has two separate API keys: an inference key your application uses against api.x.ai, and a Management API key that can read billing but can’t spend credit. You need the second one.
- In the xAI Console, open Users and confirm your account has the “Management Keys” read permission. An admin has to grant this if you don’t already have it.
- Go to Settings → Management Keys, create a new key, and copy it. It’s only shown once.
- On the same Settings page, copy your Team ID.
- In Plutus, paste the Management API key and Team ID into the connection form and save.
Plutus posts to xAI’s Management API historical-usage endpoint once a day and records daily spend per model. xAI bills per team, so pick the Team ID for whichever team’s spend you want tracked — Plutus stores one xAI connection per account, so if you run multiple teams, only one can be connected at a time.
xAI meters, bills and invoices per team, and its billing endpoint is team-scoped, so this connection tracks exactly one team. Its Management API publishes no “list my teams” endpoint to enumerate the rest from, and Plutus stores one connection per cost source per account — so multi-team xAI orgs currently get the spend of the single team configured here, not the whole org.