X

Connect xAI

You need Management API key and Team ID. About two minutes.

1Get these from xAI

Management API key

Paste the management key
  1. In the xAI Console, open Settings, then Management Keys.
  2. 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 page

https://console.x.ai/

Team ID

00000000-0000-0000-0000-000000000000
  1. In the xAI Console, open the settings of the team that owns the management key.
  2. Copy the Team ID shown on the team settings page.

The team the key belongs to. Billing is scoped per team.

Open the page

https://console.x.ai/team/default/settings/team

2Add it to CreditBar

  1. Open CreditBar from the menu bar and choose Settings, then Accounts.
  2. Click Add account and pick xAI.
  3. Paste the Management API key and the Team ID into the matching fields, and give the account a label you will recognise.
  4. 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.