Business Sony Innovation Fund Backs Primitive Labs, a Startup That Builds Simulated Crowds to Stress-Test Products Before Launch Apple Intelligence Apple Removed the Apple Intelligence Off Switch in macOS 27 — So a Developer Built a CLI That Deletes It Anyway Security OpenAI Turns On Invisible Text Watermarks for ChatGPT in the EU — and Publishes Exactly How Weak They Are News A Mystery 'Space Bunny Alpha' Model Just Topped OpenRouter's Leaderboard With 38.7 Trillion Tokens a Week News AMD Goes All-In on the 192GB "Agentic PC" Two Days Before the Nvidia RTX Spark Event: 300-Billion-Parameter Models, No Cloud Required ChatGPT OpenAI Will Put Sponsored Images Inside ChatGPT Image Generation — Testing in the US This Month for Its 1.2 Billion Weekly Users Opinion Hinton, Bengio and 20 Other Top Researchers Warn a Year of AI Progress Could Soon Take Five Weeks Business Schneider Electric to Buy PTC for $22.6 Billion in Its Largest-Ever Deal — and Its Stock Dropped 9% on the Price Tag Business Sony Innovation Fund Backs Primitive Labs, a Startup That Builds Simulated Crowds to Stress-Test Products Before Launch Apple Intelligence Apple Removed the Apple Intelligence Off Switch in macOS 27 — So a Developer Built a CLI That Deletes It Anyway Security OpenAI Turns On Invisible Text Watermarks for ChatGPT in the EU — and Publishes Exactly How Weak They Are News A Mystery 'Space Bunny Alpha' Model Just Topped OpenRouter's Leaderboard With 38.7 Trillion Tokens a Week News AMD Goes All-In on the 192GB "Agentic PC" Two Days Before the Nvidia RTX Spark Event: 300-Billion-Parameter Models, No Cloud Required ChatGPT OpenAI Will Put Sponsored Images Inside ChatGPT Image Generation — Testing in the US This Month for Its 1.2 Billion Weekly Users Opinion Hinton, Bengio and 20 Other Top Researchers Warn a Year of AI Progress Could Soon Take Five Weeks Business Schneider Electric to Buy PTC for $22.6 Billion in Its Largest-Ever Deal — and Its Stock Dropped 9% on the Price Tag

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