Xsai is live · free · last verified 30 Nov 2026 · viability monitor
Xsai
xsAI is an extra-small OpenAI-compatible AI SDK for JavaScript and TypeScript — 13.4 KB gzipped with every package included.
If your bundle budget is real and you're already calling an OpenAI Responses, Chat Completions or Anthropic Messages endpoint, xsAI hands you a familiar SDK-shaped API at 13.4 KB gzipped — with per-package sizes republished on every docs build instead of buried in a claim. Protocol-first adapters mean swapping endpoints rewrites a few lines, not your streaming loop. Pass if you need native SDKs across a spread of providers, or want the tutorial shelf a bigger SDK accumulates.
Verdict generatedVerified 2d ago · liveness 64/100 · cite: rightaichoice.com/tools/xsai
- Browser extensions, edge workers and npx CLIs where dependency weight is a shipping constraint
- TypeScript teams already on OpenAI Responses, Chat Completions or Anthropic Messages endpoints
- Developers who want a Vercel-AI-SDK-shaped API at 13.4 KB gzipped
- Polyglot runtimes — one codebase for Node.js, Deno, Bun, Workers and browsers
- Teams on providers with no OpenAI-compatible or Anthropic Messages endpoint and no compatibility layer
- Projects that need a vendor-provided support contract or SLA
- Developers who want native SDK coverage for every major provider out of the box
We scan public community discussion about Xsai and hand you an honest verdict, or say plainly when we cannot tie the posts to this tool.
- Honest verdict, not marketing
- Real pros & cons from real users
- Attributed quotes with receipts
Free scans included · no card needed
Skip xsAI if your target provider speaks neither OpenAI Responses, Chat Completions nor Anthropic Messages, or if you want official per-vendor SDKs and a vendor support contract.
xsAI is an open-source library distributed through your package manager, so the cost to you is engineering time rather than a subscription — you install only the packages you import, from 0.3 KB (@xsai/model) to 3.2 KB (@xsai/text-messages). Compare it against heavier SDKs by bundle budget: you're trading a bigger dependency tree and vendor-provided support for 13.0 KB total.
In short
Xsai — xsAI is an extra-small OpenAI-compatible AI SDK for JavaScript and TypeScript — 13.4 KB gzipped with every package included. Best for Browser extensions, edge workers and npx CLIs where dependency weight is a shipping constraint, TypeScript teams already on OpenAI Responses, Chat Completions or Anthropic Messages endpoints, Developers who want a Vercel-AI-SDK-shaped API at 13.4 KB gzipped. Free to use.
What is Xsai?
Xsai — xsAI is an extra-small OpenAI-compatible AI SDK for JavaScript and TypeScript — 13.4 KB gzipped with every package included. Best for Browser extensions, edge workers and npx CLIs where dependency weight is a shipping constraint, TypeScript teams already on OpenAI Responses, Chat Completions or Anthropic Messages endpoints, Developers who want a Vercel-AI-SDK-shaped API at 13.4 KB gzipped. Free to use.
xsAI is an open-source JavaScript and TypeScript SDK for calling language, audio, image and embedding models without dragging a heavy dependency tree into your bundle. Its pitch is blunt: "AI SDK, extra small. One shape for every model. Web standards, nothing else." The full set of packages weighs 13.4 KB gzipped, and you install only what you import. The API is organized around protocols, not vendors. A model belongs to a protocol. `responses()` talks to `/responses`, `chat()` to `/chat/completions`, and `messages()` to Anthropic's `/messages`. Each returns the same LanguageModel shape, so your `streamText` loop and every stream event after it stay identical when you repoint the code at a different endpoint. Packages are split by job with no side effects, so bundlers drop the rest: @xsai/text-responses 2.9 KB, @xsai/text-messages 3.3 KB, @xsai/text-chat 2.6 KB, @xsai/audio 1.8 KB, @xsai/decide 1.5 KB, @xsai/image 0.8 KB, @xsai/embed 0.4 KB. Sizes are minified and gzipped from source on every docs build rather than quoted once and forgotten. Tool inputs, results and events are typed from your Zod schema, and the docs render real compiler output for the `tool()` helper. Everything runs on `fetch`, `ReadableStream` and `AbortSignal`, with no Node.js module imports, so one codebase targets Node.js, Deno, Bun, Workers and browsers — and you can swap `fetch` for a proxy, test double or your own retries. The tradeoff is scope: OpenAI Responses, Chat Completions and Anthropic Messages only, no per-vendor native SDKs. It fits browser extensions, npx CLIs and edge workers where bundle weight is a shipping constraint. Lighter than the Vercel AI SDK route, and narrower too.
Key features
- Protocol adapters: responses() for /responses, chat() for /chat/completions, messages() for Anthropic /messages
- Unified LanguageModel shape so swapping endpoints leaves streamText and stream events unchanged
- 13.4 KB gzipped with every package included, per-package sizes published each docs build
- Modular no-side-effect packages — install @xsai/text-responses (2.9 KB) or @xsai/embed (0.4 KB) alone
- Streaming text via ReadableStream with roughly 19 typed stream events
- Tool calling typed end to end from a Zod input schema via the tool() helper
- Generate structured output through @xsai/decide
- Audio generation and speech handling through @xsai/audio
- Image generation through @xsai/image
- Embeddings generation with @xsai/embed
- Runs on fetch, ReadableStream and AbortSignal with no Node.js module imports
- Replaceable fetch for proxies, test doubles and custom retries
- Targets Node.js, Deno, Bun, Workers and browsers from the same code
- Model listing and metadata helpers via @xsai/model
- Extension packages from Moeru AI: xsai-transformers for local models, xsai-use for React hooks, xsmcp for MCP
Behind the verdict
The bundle-size pitch is easy to make and hard to prove. xsAI proves it the boring way: every package number on the docs page is minified and gzipped from source at build time, so the 2.9 KB for @xsai/text-responses is measured, not marketing. If you have ever shipped a browser extension or an edge worker and watched a runtime SDK eat a third of your payload, that distinction matters more than the headline figure. We'd reach for this when the endpoint already exists and the only question is how little code sits between your app and it. The protocol split — responses(), chat(), messages() — is the design decision that earns its keep. Your streamText loop and the roughly 19 typed stream events behind it don't change when you move between an OpenAI-style endpoint and Anthropic Messages. Swapping providers becomes an import change plus a config object, which is exactly how much ceremony it deserves. The modular packaging is the second reason. @xsai/embed at 0.4 KB versus pulling a full text SDK for a single embeddings call is not a close call. Add @xsai/audio, @xsai/image or @xsai/decide only when the feature ships, and the no-side-effect structure keeps tree-shaking honest. Where it bites: scope. Three protocols is the entire surface. If your stack depends on a provider with no OpenAI-compatible or Anthropic Messages endpoint and no compatibility layer in front of it, xsAI has nothing to say to you. Teams that want a vendor-provided support contract should also look elsewhere — this is a small open-source project, and you're trading a support desk for a small dependency. Compared with the Vercel AI SDK, xsAI is the leaner, narrower option: less surface area, less documentation, fewer framework integrations, and a much smaller bill at bundle time. Compared with writing
Limitations
- Scope is deliberately narrow: only OpenAI Responses, Chat Completions and Anthropic Messages protocols are supported, so a provider outside those protocols needs a compatibility layer rather than a native SDK.
- Several capabilities live in separate extension packages from Moeru AI (xsai-transformers for local models, xsai-use for React hooks, xsmcp for MCP) rather than core, so coverage depends on community-maintained code and can lag.
- The docs site currently redirects some documentation pages to a v0 archive, which slows reference lookups.
- It is a client SDK with no underlying AI model of its own — you supply the endpoint, API key and model name.
as of 2026-10-31
Researching Xsai? Get your full AI stack in 60 seconds.
Free, no signup — tell us your goal and get tools matched to your budget & existing stack.
Is Xsai still active?
Xsai is live · free · last verified 30 Nov 2026 · viability monitor.
Viability score
How well maintained and how widely used is Xsai? Built from what the vendor actually publishes (docs, changelog, tutorials, integrations, pricing), whether the site is live, and how much real users discuss it. How we calculate this
Last calculated: December 2026
How we score →What do users say about Xsai?
What people actually say about Xsai — is it worth it?
We scanned public community sources for Xsai on Nov 8, 2026 and could not establish that the discussion we found is about this tool rather than something else sharing its name. Only 1 of the posts we fetched could be positively tied to Xsai. Rather than publish a sentiment score built on the wrong subject, we publish nothing here and re-run the scan.
How we verified this
Every listed fact about Xsai — pricing, features, links, status — is re-read from the vendor's own pages by our verification pipeline and each change is logged with a date; the last pass ran on 30 Nov 2026. Analysis is drafted with AI models and checked against our editorial standards before publishing; see how we verify.
Verification history
We have re-verified Xsai 16 times since . Each pass re-reads the vendor's own pages and re-checks every listed field against that evidence; passes where nothing had changed are marked as such.
- — changed who it suits, summary, features, our verdict, who should skip it, description
- — changed pricing page, platforms, limitations
- — changed our verdict, features, summary, who it suits, description
- — changed pricing page, models, limitations
- — changed setup time, who should skip it, switching out, description, switching in, who it suits, use cases, limitations, summary, our verdict, pricing fit, features, hidden costs
- — changed SSL certificate
Showing the 6 most recent of 16 verification passes.
Free to cite with attribution — this page re-verifies continuously.
How much does Xsai cost in 2026?
Xsai: Free to use. Pricing last verified 30 Nov 2026.
Where the pricing makes sense
The company stage and team size where Xsai's pricing actually pencils out — and where peers do it cheaper.
xsAI is an open-source library distributed through your package manager, so the cost to you is engineering time rather than a subscription — you install only the packages you import, from 0.3 KB (@xsai/model) to 3.2 KB (@xsai/text-messages). Compare it against heavier SDKs by bundle budget: you're trading a bigger dependency tree and vendor-provided support for 13.0 KB total.
Has Xsai's pricing changed?
No plan price for Xsai has moved since we began tracking it in Aug 2026; the pricing page is re-read on every verification pass.
Who should pick Xsai?
Pick Xsai if you are Browser extensions, edge workers and npx CLIs where dependency weight is a shipping constraint, TypeScript teams already on OpenAI Responses, Chat Completions or Anthropic Messages endpoints, Developers who want a Vercel-AI-SDK-shaped API at 13.4 KB gzipped, Polyglot runtimes — one codebase for Node.js, Deno, Bun, Workers and browsers.
Look elsewhere if you are Teams on providers with no OpenAI-compatible or Anthropic Messages endpoint and no compatibility layer, Projects that need a vendor-provided support contract or SLA, Developers who want native SDK coverage for every major provider out of the box, Teams that lean on a large tutorial library and abundant community answers.
Skip it if Skip xsAI if your target provider speaks neither OpenAI Responses, Chat Completions nor Anthropic Messages, or if you want official per-vendor SDKs and a vendor support contract.
GeneratedReal-world workflow fit
Concrete scenarios for the personas Xsai actually fits — and what changes day-one when you adopt it.
You add xsai plus @xsai/text-responses to an extension build and call responses() against an OpenAI key from a background worker, streaming into the popup UI with streamText.
Outcome: A streaming chat surface that fits the extension's size budget, with the event loop unchanged if you later switch to an Anthropic endpoint via messages().
You deploy the same source to Workers and Node.js, using fetch, ReadableStream and AbortSignal only, and wrap fetch with your own retry logic in CI.
Outcome: One codebase across runtimes, with AI calls testable by swapping in a fetch double instead of hitting a live endpoint.
You define a get_weather tool with a Zod input schema via tool(), pass it to streamText, and let the compiler infer the input and result types.
Outcome: Tool inputs, results and stream events are typed from your schema rather than a hand-maintained interface.
Use cases
- Stream text responses from a prompt inside a small web bundle.
- Transcribe audio to text through OpenAI-compatible speech endpoints.
- Build structured data extraction with @xsai/decide.
- Add typed tool calling to serverless functions without a large dependency.
- Ship lightweight AI chat in browser extensions or edge workers.
- Generate embeddings for semantic search or recommendations.
- Run local models in a JS app through the xsai-transformers extension.
- Wire React UIs to AI calls with the xsai-use hooks package.
Setup time & first value
How long it actually takes to get something useful out of Xsai — broken out by persona, not the marketing-page minute.
If you already call an OpenAI-compatible endpoint, plan on 15-30 minutes: one install (`pnpm add xsai`), one adapter call, one streamText loop. Adding Anthropic is a swap of adapter and base URL, not a rewrite. Teams adding MCP, React hooks or local models should budget extra time for the separate Moeru AI extension packages.
Switching to or from Xsai
How to bring data in from common predecessors and how to get it back out — written for the switcher, not the buyer.
- →From Vercel AI SDK: replace `generateText`/`streamText` model construction with `responses()`/`chat()`/`messages()` adapters and keep the streaming loop shape.
- ↗To Vercel AI SDK: move model construction to a provider instance and keep streamText event handling, since the API surface was shaped similarly.
Integrations
Resources & guides
Tutorials & Learning
YouTube returned 6 videos for “Xsai”, and we withheld 6: 6 could not be judged, because “Xsai” is a single word that other videos use for other things. We are showing none, because we could not prove any of them are about Xsai.
Official links
What are the best Xsai alternatives?
The closest alternatives to Xsai we list are Openai Scala Client, Vercel AI SDK and SwiftOpenAI. Ranked by direct product-type match, not category overlap.
| Alternative | Pricing | Starts at | Last verified |
|---|---|---|---|
| Openai Scala Client | Free | Free | 29 Nov 2026 |
| Vercel AI SDK | Freemium | Free plan · usage-based paid tier | 27 Nov 2026 |
| SwiftOpenAI | Free | Free | 23 Oct 2026 |
Alternatives to Xsai
View allOpenai Scala Client
OpenAI Scala Client: typed, effect-friendly JVM calls to OpenAI's chat, image, embedding and audio APIs
Vercel AI SDK
Vercel AI SDK: an open-source TypeScript framework for streaming AI apps, agents, and multi-model support
SwiftOpenAI
SwiftOpenAI: an MIT-licensed Swift package for calling the OpenAI API with native async/await and Combine on Apple platforms.
Xsai vs its closest rival
Xsai's closest head-to-head is with Spider Cloud.
Our Xsai vs Spider Cloud verdict written Jul 3, 2026 is more than 90 days old, so it is being re-reviewed against current data and is not shown.
Frequently asked questions
Categories
Best-of guides
For makers of Xsai
- Get a Verified Listing for Xsai ($39): a written decision within 1 working day.
- Free listing for another tool: Free reviews are decided in order, within 3 weeks of the review starting.
Used Xsai? Help shape our editorial sentiment research.