Cloud Ctrl
Overview
Getting Setup
Using
Recommendations
Overview
Getting Setup
Using
Recommendations
  • Quick Start
  • Getting Started
  • Concepts and Terminology
    • Overview
    • Tag Hierarchy
    • Shared Data
    • Custom Data
    • Actions
    • System Tags
    • Forecast Methodology
  • Getting data into Cloud Ctrl

    • Overview
    • Microsoft Azure
      • Azure Overview
      • Azure App Registration
      • Cost Management Exports Overview
      • Standard Export Setup (EA, MCA, PAYG)
      • CSP Export Setup (CME recommended, CDR fallback)
      • Enhanced Azure Access
      • Troubleshooting
    • Amazon Web Services
    • Google Cloud
    • Oracle Cloud
    • Alibaba Cloud
    • Cloudflare
    • AI Connectors
      • AI Connectors Overview
      • OpenAI
      • Anthropic
      • GitHub Copilot
      • Cursor
      • xAI
      • OpenRouter
    • Tag Mapping
    • Custom Usage
    • Settings
  • Using Cloud Ctrl
    • Costs and Usage
    • Emissions and Energy
    • Tracking
    • Budgets
    • Reporting
    • Dimensions
    • Governance & Compliance
      • Overview
      • Watchdog
      • Essential Eight
      • Essential Eight: Azure Setup
    • Customer Management
  • Recommendations
    • Azure
    • Amazon
  • Kubernetes Cost Insights
  • Platform Integration and Security

    • API Overview
    • MCP Server (AI Integration)
    • Platform Security & Data Protection
    • Access Management

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

  1. Sign in to the xAI Console as a team admin.
  2. Open Settings → Management Keys.
  3. 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.
  4. 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

  1. Open Settings → Cloud Connections → xAI
  2. Click + Add Credential
  3. Enter a display name and paste the management key
  4. Click Submit

Add a Cloud Account

  1. From Settings → Cloud Connections → xAI, click + Add Cloud Account
  2. Select the credential you just added
  3. Enter the Team ID (UUID) from the step above
  4. 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.
Prev
Cursor
Next
OpenRouter