Skip to main content
Watch: I Built an AI App Without Leaving Databricks

xAI SDKs - 2 languages recorded

xAI SDKs by language

xAI ships an official SDK for Python. For TypeScript, its docs point to the OpenAI SDK.

The docs now brand the platform 'SpaceXSI' ('Official SpaceXSI (xAI) developer documentation'); the API host is still api.x.ai and there is no dedicated SDK page - the quickstart's 'Install an SDK' step is the list.

Verified against each provider's own SDK docs and package registry pages. Status labels are the provider's own; no version numbers are recorded.

xAI's SDK docs: docs.x.ai/developers/quickstart. Compare every provider in the SDK grid.

Official
the provider's own SDK.
Beta
the provider's own SDK, which it labels beta (Fireworks AI says alpha).
OpenAI SDK
the provider's docs point to the OpenAI SDK for this language.
Community
a library the provider's docs link but do not ship. Not official.
None
the provider's SDK docs list no SDK for this language.
-
Not recorded: no entry in the data for this language.

TypeScript and JavaScript

Points to the OpenAI SDK

Not a xAI SDK. For TypeScript, xAI's docs point you to the OpenAI SDK. Base URL and limits.

Package
openai
Install
Install
npm install openai
Repo
github.com/openai/openai-node
Docs
docs.x.ai/developers/quickstart
Notes
xAI ships no JavaScript SDK of its own. The quickstart offers two JS paths: the OpenAI SDK (baseURL https://api.x.ai/v1) and Vercel's AI SDK provider @ai-sdk/xai (npm install ai @ai-sdk/xai zod; repo github.com/vercel/ai, maintained by Vercel, not xAI).

From the docs

Step 3: Install an SDK. Pick your language and install the SDK: npm install ai @ai-sdk/xai zod ... npm install openai
docs.x.ai/developers/quickstart
TypeScript SDKs from every provider

Not recorded

The data has no entry for xAI in these languages. xAI's SDK docs are linked for a direct check.

More on xAI

Newsletter

Know when a provider ships a new SDK

One email per week. New models, new SDKs and the API changes that break your client, and what they mean for your stack.