Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
An example Express.js server in the AI SDK repo that generates and streams AI text and objects over HTTP endpoints.

Minimal Shopify Hydrogen v2 headless storefront boilerplate built on Remix, ready to deploy to Vercel with zero configuration.

Minimal full-stack starter pairing the Next.js 16 App Router with MongoDB Atlas, TypeScript, Tailwind CSS, shadcn/ui and one-click Vercel deploy.

Starter that installs an Elysia API with Bun, previews it locally through the Vercel CLI on port 3000, and deploys it to Vercel.

Full-stack React starter built on TanStack Start with file-based routing, route loaders, TanStack Query, TanStack Store, Tailwind CSS, and Vitest.
Express + AI SDK is an example server inside the AI SDK monorepo that demonstrates calling AI SDK text and object generation from an Express.js application and streaming the results back over HTTP. It is a runnable reference implementation rather than a published npm package.
Express + AI SDK is an example project in the AI SDK repository that shows how to use the TypeScript AI SDK inside an Express.js server to generate and stream text and objects. The server takes HTTP requests — including a POST to /chat whose JSON body carries a messages array, where each message has a role, an id, and a parts array containing text parts — and returns generated AI output, including streamed chat responses. It runs locally on Node.js at port 8080 and is maintained by Vercel, the team behind Next.js, as part of the free open-source AI SDK for TypeScript.
POST /chat accepts a JSON body with a messages array and streams the model response back; the curl example uses -i to inspect response headers.POST to the root path http://localhost:8080 triggers plain text generation.POST /custom-data-parts demonstrates returning structured custom data alongside generated content..env file supplies OPENAI_API_KEY; the page notes the configuration changes depending on which providers you use.pnpm install, pnpm build, and pnpm dev from the root directory of the AI SDK repo.http://localhost:8080 and documented with copy-paste curl commands..env file containing OPENAI_API_KEY and any additional provider settings.pnpm install and then pnpm build.pnpm dev, then hit the endpoints with the provided curl commands.It exposes three: a root POST at http://localhost:8080 for text generation, POST /custom-data-parts for structured data parts, and POST /chat, which takes a JSON body with a messages array and streams a chat response.
The example listens on port 8080 on your local machine, so every curl command in the README targets http://localhost:8080. You can change the port in the server code if 8080 is already in use.
You need the AI SDK repository cloned locally, pnpm installed, and an API key in a .env file — the README shows OPENAI_API_KEY, and notes that more settings are required depending on which providers you use.
The AI SDK is described as a free open-source library for building AI-powered applications and agents in TypeScript. Costs come from the model provider whose API key you supply, not from the SDK itself.
