Back to templates

Template details

Hono + AI SDK

Vercel example boilerplate that runs an AI SDK backend on a Hono server and deploys with the Vercel CLI.

About this template

Hono + AI SDK is a Vercel framework boilerplate in the vercel/examples repository that serves AI SDK requests from a Hono backend and deploys to Vercel with the CLI.

What is Hono + AI SDK?

Hono + AI SDK is a starter template from Vercel's examples collection (the framework-boilerplates/hono directory) that combines a Hono server with the AI SDK so AI model calls happen in a Hono backend rather than in a Next.js API route. It takes a prompt or request from the client and returns an AI SDK response streamed by your Hono routes, packaged as a Vercel project you can develop locally and ship with the Vercel CLI. A live demo is published at hono-ai-sdk-demo.vercel.app, and the repository it ships in carries roughly 5,156 GitHub stars.

What makes this template stand out?

  • Hono backend — the server layer is Hono, not Next.js, so AI endpoints live in a lightweight routing framework that can be built and deployed as a Vercel project.
  • AI SDK integration — the template wires the AI SDK into Hono handlers, giving you streaming model responses from your own backend routes.
  • Vercel AI Gateway key — authentication goes through a Vercel AI Gateway API key, which is listed as a hard prerequisite alongside the CLI.
  • One-click deploy — a Deploy with Vercel button clones vercel/examples/tree/main/framework-boilerplates/hono straight into your Vercel account.
  • CLI-driven workflow — npm install then vc dev for local development, vc build for a local production build, and vc deploy to publish.
  • Fixed local port — vc dev serves the app at http://localhost:3000.
  • Open example — the source lives in the public vercel/examples repo, so you can read and fork the whole setup.

Who should use it?

  • Backend developers who prefer Hono: build AI endpoints with Hono routing instead of adopting Next.js route handlers.
  • Developers testing Vercel AI Gateway: start from a working AI SDK setup and swap in your own key and models.
  • Teams needing a minimal deployment target: use vc deploy to get a running AI backend on Vercel without configuring servers.
  • Example collectors: fork the repo as a reference for how Hono and the AI SDK fit together on Vercel.

What can you do with it?

  • API builders: stand up an AI-backed HTTP endpoint on Hono and stream results to any client that can call your deployed URL.
  • Prototypers: clone the repo, add your AI Gateway key, and iterate locally on localhost:3000 before deploying.
  • Evaluators: compare a Hono AI backend against a Next.js one using the same Vercel hosting and AI SDK layer.

How does it work?

  1. Clone the template via the Deploy with Vercel button or the GitHub repository.
  2. Install the Vercel CLI globally and obtain an AI Gateway API key.
  3. Run npm install and vc dev, then open http://localhost:3000 to test locally.
  4. Run npm install and vc build to produce a local build, or vc deploy to publish.

FAQ

What do I need before running the Hono + AI SDK template?

Two prerequisites are stated: the Vercel CLI installed globally and a Vercel AI Gateway API key. Without the gateway key, the AI SDK calls the template makes will not authenticate, so plan for both before starting.

How do I run it locally?

Install dependencies with npm install, start the dev server with vc dev, and open http://localhost:3000. A local production build is available through npm install followed by vc build.

Does it use Next.js?

No — the backend is a Hono server, which is the point of this example. It sits inside vercel/examples, a collection that also contains Next.js examples, but this specific boilerplate pairs Hono with the AI SDK.

How do I deploy it?

Either use the Deploy with Vercel button, which clones the repo into your Vercel account, or run npm install and vc deploy from your own clone after installing the Vercel CLI.

Is there a live demo?

Yes. Vercel publishes a running instance at hono-ai-sdk-demo.vercel.app, linked above the setup commands, so you can inspect the behaviour before cloning the repository.

screenshot of Hono + AI SDK on template0.com