xAI
The xAI connector imports team billing usage from the xAI Management API: daily spend per model, in USD, for the xAI team the management key is scoped to.
The Management API (management-api.x.ai) is separate from the inference API (api.x.ai) and requires a management key — a regular inference API key (used for chat completions) will be rejected with a 401.
Get a Management key
- Sign in to the xAI Console as a team admin.
- Open Settings → Management Keys.
- Create a management key and enable Billing read access so Cloud Ctrl can read your team's usage and billing data from the Management API.
- Copy the key — it is only shown once.
You'll also need your Team ID — find it in the console URL (console.x.ai/team/TEAM_ID/…) or under Settings → General. It's the UUID that scopes the billing endpoint to your xAI team.
Add a Credential
- Open Settings → Cloud Connections → xAI
- Click + Add Credential
- Enter a display name and paste the management key
- Click Submit
Add a Cloud Account
- From Settings → Cloud Connections → xAI, click + Add Cloud Account
- Select the credential you just added
- Enter the Team ID (UUID) from the step above
- Click Submit
Once connected, the initial import pulls up to 90 days of history (configurable on the cloud account), then imports month by month. Your data can take up to 24 hours to complete the initial import.
Attribution notes
- Team-level attribution — xAI does not provide per-user, per-API-key or per-project breakdowns today, so all spend is attributed at the team level.
- Token counts — the usage endpoint reports cost only, not token counts. Monthly token totals are available from xAI invoices, but per-request token telemetry is not available to scheduled imports.
- xAI bills in USD; Cloud Ctrl converts it to your display currency.