Documentation

Nitro API Servers

Export supported AI SDK patterns as standalone Nitro API servers that run on Node.js.

Nitro support lets you run a pattern's server logic outside its Next.js app. The pattern preview stays in Next.js, while the export becomes a standalone, API-only Nitro service that any frontend can call over HTTP.

What you get

A Nitro export contains:

  • the pattern's AI and API route logic under src/
  • programmatic Nitro routes in nitro.config.ts (no filesystem route scanning)
  • one handler file per operation under server/handlers/
  • CORS middleware that mirrors the Hono export (CORS_ORIGINS, streaming headers)
  • exact runtime dependencies and TypeScript configuration
  • an .env.example with pattern and server settings
  • a pattern-specific README with routes and security declarations
  • a /healthz endpoint

It does not contain the React UI, Next.js application shell, preview proxy, or product entitlement middleware.

Choose an export

GoalChoose
Run the complete pattern UI and server togetherDownload → Next.js app
Run the pattern API as a Hono Node serviceDownload → Hono API server
Run the pattern API as a Nitro Node serviceDownload → Nitro API server
Give an AI coding tool the Nitro server sourceCopy for a coding agent → Nitro API server
Add the pattern to an existing Next.js appInstall with shadcn CLI

Quick start

  1. Open a pattern that offers a Nitro export.
  2. Choose Download → Nitro API server.
  3. Extract the archive and create .env from .env.example.
  4. Install, typecheck, and start the service:
pnpm install
pnpm typecheck
pnpm dev

The default server address is http://127.0.0.1:3001. Check the generated README for the pattern's exact API routes, required environment variables, and security declarations.

Shared docs

Compatibility constraints and frontend wiring are the same as Hono:

Continue

  • Deploy for production builds and environment notes.