Management API Reference

The management API allows you to perform some operations on your team programmatically. You need a management key in order to use this API. The base URL for all endpoints is https://management-api.x.ai.


Billing Management

Get billing information

/v1/billing/teams/{team_id}/billing-info


Set billing information

/v1/billing/teams/{team_id}/billing-info


List Invoices

/v1/billing/teams/{team_id}/invoices


List payment methods

/v1/billing/teams/{team_id}/payment-method


Set default payment method

/v1/billing/teams/{team_id}/payment-method/default


Preview postpaid invoice of the month

/v1/billing/teams/{team_id}/postpaid/invoice/preview


Get monthly postpaid spending limits

/v1/billing/teams/{team_id}/postpaid/spending-limits


Set monthly postpaid spending limits

/v1/billing/teams/{team_id}/postpaid/spending-limits


List prepaid credit balance and balance changes

/v1/billing/teams/{team_id}/prepaid/balance


Top up prepaid credit

/v1/billing/teams/{team_id}/prepaid/top-up


Get historical usage of the API

/v1/billing/teams/{team_id}/usage