Business IEA Says Data Center Power Demand Could Double to 1,000 TWh by 2030, With AI Supplying Three Quarters of the Growth Chatbots ChatGPT Now Transcribes as You Talk: OpenAI Removes the 10-Minute Cap and Streams Words Live on Every Plan Business Ex-Alibaba Executive's Everful Raises $48.5 Million to Put AI Agents in Charge of Sourcing From 30,000 Factories AI Agents Google Built a Mirror Dimension of the Internet to Train Its Chrome AI Agents Without Breaking the Real Web Productivity Canva Finally Adds an Off Switch for Its Generative AI Features, and a Filter to Hide AI-Made Templates Business Anthropic Begins Trading Today: 980 Million Shares at $83, a $1.5 Trillion Valuation and the Largest IPO on Record News Google Books Blue Origin New Glenn to Launch TPU-Carrying AI Satellites in Early 2029 Security Hackers Used the AI Penetration Tool ARTEX to Disrupt European Commission Systems for Over Ten Days Business IEA Says Data Center Power Demand Could Double to 1,000 TWh by 2030, With AI Supplying Three Quarters of the Growth Chatbots ChatGPT Now Transcribes as You Talk: OpenAI Removes the 10-Minute Cap and Streams Words Live on Every Plan Business Ex-Alibaba Executive's Everful Raises $48.5 Million to Put AI Agents in Charge of Sourcing From 30,000 Factories AI Agents Google Built a Mirror Dimension of the Internet to Train Its Chrome AI Agents Without Breaking the Real Web Productivity Canva Finally Adds an Off Switch for Its Generative AI Features, and a Filter to Hide AI-Made Templates Business Anthropic Begins Trading Today: 980 Million Shares at $83, a $1.5 Trillion Valuation and the Largest IPO on Record News Google Books Blue Origin New Glenn to Launch TPU-Carrying AI Satellites in Early 2029 Security Hackers Used the AI Penetration Tool ARTEX to Disrupt European Commission Systems for Over Ten Days

xAI Ships an Official TypeScript SDK for Grok: One Apache-2.0 Package Covers Text, Voice, Image, Video and Hosted Tools

xAI Ships an Official TypeScript SDK for Grok: One Apache-2.0 Package Covers Text, Voice, Image, Video and Hosted Tools

xAI released an experimental official TypeScript SDK for Grok on October 2 as @xai-official/sdk on npm, Apache-2.0 licensed with zero runtime dependencies. The typed ESM client spans text, voice, image and video APIs plus hosted web search, X search, code execution and remote MCP, though the company warns interfaces may still change before version 1.0.

xAI has published an official TypeScript SDK for Grok. The package, @xai-official/sdk, hit npm at version 0.1.0 on October 2, 2026, with source under the xai-org organization on GitHub (xai-sdk-ts) and an Apache 2.0 license. Eric Zakariasson, an AI engineer at SpaceXAI who previously worked on Cursor, announced the release the same day.

The SDK is a typed ESM client built on xAI's REST API, covering the full product surface in one install: chat-style responses with streaming and multi-turn conversation, image input, structured JSON Schema output, function tools and shell tools; image generation and editing through models such as grok-imagine-image-2.0; asynchronous video jobs through grok-imagine-video-1.5 with generate, edit and extend operations; plus file upload and batch processing.

Hosted tools are a notable part of the package. The client exposes real-time X search, web search, code execution and remote MCP support, all executed server-side, while custom functions and shell commands run locally. The README draws an explicit distinction between the two: built-in tools run on xAI's infrastructure, developer tools run wherever the application does, and the SDK simply routes each call to the right place.

Engineering constraints are deliberately conservative. The package has zero runtime dependencies, requires Node.js 22.13 or later, is ESM-only, and blocks browser and Worker use by default so that XAI_API_KEY never lands in client-side code. A quickstart is short enough to read at a glance: install, export the key, instantiate the client, call responses.create with a model — grok-4.7 is the default in examples — and print the text.

Iteration has been fast enough to matter. Version 0.2.0 shipped the same day and renamed the client class from xAI to SpaceXAI, a breaking change flagged in the changelog; 0.2.1 followed hours later, adding toJson(schema), streaming partial JSON and a retryBeforeOutput option. At the time of writing the repository sat near 27 stars with roughly 312 weekly npm downloads, and the README keeps an experimental badge, advising developers to pin exact versions and read the changelog before every upgrade until a stable 1.0 lands.

The SDK is a developer-experience play rather than a new capability. The same REST surface was previously reachable only by hand-rolled requests or through the community-typed Vercel @ai-sdk/xai package, which remains a separate project. xAI's mature Python SDK uses gRPC; this new TypeScript path is the first official REST-first option for Node applications, sitting alongside Grok Bot, the Grok Build coding agent and the Grok 4.7 API that prices at $2 per million input tokens and $6 per million output tokens.

The significance is less about features than about where xAI is spending effort. Official SDKs with typed clients, streaming event helpers and schema-validated structured output are table stakes for winning framework and platform integrations — exactly the layer where OpenAI and Anthropic have accumulated years of developer goodwill. If xAI wants Grok to appear by default inside agent frameworks and enterprise tooling, a stable, dependency-free official client is the entry ticket. The warning that interfaces may change before 1.0 is honest, but it also sets the deadline by which the company will need to stop moving them.

Comments (0)

Log in to join the discussion

Log In

No comments yet