Quick Start
extra-small AI SDK.
What is xsAI?
xsAI is a series of utils to help you use OpenAI or OpenAI-compatible API.
Why use the xsAI?
xsAI has a similar interface to the Vercel AI SDK, but smaller.
This makes it ideal for a variety of scenarios that require smaller bundle size, such as web applications, cli running through npx, and so on.
So how small is xsAI?
Without further ado, let's look at the results from https://pkg-size.dev:
xsAI reduces the installation size 80x and the bundle size 12x.
And it could be smaller!
If you only need basic text generation, you can just install the @xsai/generate-text
package:
Why are only OpenAI-compatible API supported?
Considering only OpenAI-compatible APIs keeps us from being plagued by a wide range of compatibility issues while avoiding bloat.
btw, Did you know that Anthropic, Google also provides an OpenAI compatible API?
We also support many more providers, which can be viewed here.
Join our Community
If you have questions about anything related to xsAI,
you're always welcome to ask our community on GitHub Discussions.
Last updated on