Connect xAI
You need Management API key and Team ID. About two minutes.
1Get these from xAI
Management API key
Paste the management key- In the xAI Console, open Settings, then Management Keys.
- Create a management key and copy it. An ordinary API key will not work.
From the xAI Console under Settings, Management Keys. An inference key is refused.
Open the pagehttps://console.x.ai/
Team ID
00000000-0000-0000-0000-000000000000- In the xAI Console, open the settings of the team that owns the management key.
- Copy the Team ID shown on the team settings page.
The team the key belongs to. Billing is scoped per team.
Open the pagehttps://console.x.ai/team/default/settings/team
2Add it to CreditBar
- Open CreditBar from the menu bar and choose Settings, then Accounts.
- Click Add account and pick xAI.
- Paste the Management API key and the Team ID into the matching fields, and give the account a label you will recognise.
- Click Test connection, then Add. Numbers appear in the menu bar within a minute.
Keys are stored in your Mac's Keychain and only ever sent to xAI. Nothing passes through a CreditBar server.
3What it reads
- Reports
- prepaid credit balance for the team
- Calls
- https://management-api.x.ai/v1/billing/teams/{team}/prepaid/balance
- Refreshes
- At most every 5 minutes
- API docs
- xAI reference, checked 2026-09-15
Needs a management key and the team id. Inference keys cannot read billing.