Vercel for AI apps: hosting Morphic, CopilotKit and LobeChat, plus the AI SDK and AI Gateway in 2026
What Vercel does
Vercel builds and hosts web apps from a Git repository. Each push creates a preview deployment with its own URL, and merging to the main branch deploys to production. Static files go to a global CDN, and server code runs as Vercel Functions. Vercel created and maintains Next.js, and it supports most other frameworks, including SvelteKit, Nuxt, Astro and Vite apps.
Which directory projects deploy to Vercel
| Project | What it is | Vercel use |
|---|---|---|
| Morphic | AI answer engine with web search | One-click deploy; built with Next.js and the AI SDK |
| CopilotKit | Framework for in-app copilots | Example apps and runtime endpoints deploy to Vercel |
| LobeChat | Chat app with plugins and agents | One-click Vercel deploy for personal instances |
Vercel also hosts the official Next.js AI chatbot template, an open-source reference app using the AI SDK, Postgres and auth.
Plans
| Plan | Price | Who it is for |
|---|---|---|
| Hobby | Free | Personal, non-commercial projects |
| Pro | $20 per member per month plus usage | Professional and commercial projects |
| Enterprise | Custom | Larger organizations needing SSO, SLAs and advanced security |
Pro includes a monthly usage credit, with additional usage billed by resource. Spend management lets you set a cap that pauses projects or alerts you when reached.
Fluid compute and AI workloads
Fluid compute is Vercel's function model. One function instance can serve several requests at once, and billing counts active CPU time rather than total time the request is open. On Pro, rates start at:
| Resource | Price |
|---|---|
| Active CPU | $0.128 per hour |
| Provisioned memory | $0.0106 per GB-hour |
| Invocations | $0.60 per million |
This matters for AI apps. A chat request might stay open for 30 seconds while a model streams its answer, but the function's CPU is busy for only a small fraction of that. Under older per-duration billing, those 30 seconds were billed in full. Fluid compute also supports long function durations on paid plans, which agent tasks need.
Builds
In April 2026, Vercel cut the price of Turbo build machines to $0.0035 per CPU-minute, rolling out from April 27. Large Next.js apps with many pages build faster on bigger machines, and the lower price makes that more affordable.
WebSockets
On October 20, 2026, WebSocket support in Vercel Functions became generally available. Voice agents built with real-time model APIs, multiplayer AI editors and live agent dashboards all need two-way connections. Previously these apps ran a separate WebSocket server elsewhere, for example on Fly.io or a VM. Now a single Vercel project can handle them, though very long-lived connections still count toward function duration and memory.
The AI SDK
The AI SDK is open source under the Apache 2.0 license and is the most popular TypeScript toolkit for AI features. Its parts:
| Part | What it does |
|---|---|
| AI SDK Core | generateText, streamText, generateObject, tool calling, agents and embeddings across providers |
| AI SDK UI | useChat and related hooks for React, Vue, Svelte and Angular |
| Providers | Official packages for OpenAI, Anthropic, Google, Amazon Bedrock, Mistral, Groq, xAI and many more |
| MCP support | Connect to MCP servers and use their tools in agent loops |
Because it works on any Node.js host, many self-hosted AI apps use it without ever deploying to Vercel.
AI Gateway
Vercel's AI Gateway gives one endpoint and key for hundreds of models. It handles provider fallbacks when one is down, tracks usage and spend per project, and supports bringing your own provider keys. It is compatible with the AI SDK and with OpenAI-format clients. Compared with a self-hosted gateway such as LiteLLM, it needs no infrastructure but keeps traffic and logs on Vercel's platform.
Other Vercel tools for AI apps
| Tool | Use |
|---|---|
| v0 | Generates Next.js apps and components from prompts |
| Sandbox | Isolated microVMs for running untrusted or AI-generated code |
| Workflow | Durable, resumable functions for long agent tasks |
| Queues | Background jobs |
| Blob and Edge Config | File storage and low-latency configuration |
| Marketplace | One-click databases such as Neon, Supabase, Upstash and others |
When to self-host instead
Vercel is convenient but not always the right home:
- Long-running or GPU workloads. Model inference and heavy document processing belong on GPU servers or dedicated workers.
- Multi-service platforms. Dify, Langfuse and LibreChat need databases, queues and workers; run them with Docker or Kubernetes.
- Data residency or private networks. Self-hosting keeps traffic entirely in your control.
- Predictable high traffic. At large steady volumes, a fixed-price server can cost less than usage-based billing.
Many teams split the work: the Next.js front end on Vercel, back-end services and databases elsewhere.
Practical tips
- Store model API keys as encrypted environment variables, scoped to production or preview as needed.
- Set function maximum duration high enough for long model calls and agent steps.
- Protect preview deployments with Vercel Authentication so unreleased AI features are not public.
- Add rate limiting, for example with Upstash Redis or Vercel's firewall rules, to stop abuse of endpoints that call paid models.
- Turn on spend management before launch.
Deploying an open-source AI app to Vercel
For a project with a Deploy button, such as Morphic or LobeChat, the process is:
- Click the button in the project's README, which forks the repository into your GitHub account and creates a Vercel project.
- Enter the required environment variables, usually model API keys and, for apps with history, a database URL.
- Add a database from the Vercel Marketplace if the app needs one, such as Neon Postgres, Supabase or Upstash Redis.
- Deploy, then set a custom domain and turn on Vercel Authentication if the app should not be public.
- Sync your fork with the upstream repository regularly to receive security fixes; forks do not update themselves.
That last step is easy to forget, and an unmaintained fork of a Next.js app can stay exposed to framework vulnerabilities long after a fix is released.
Cost example
A small AI chat app with a few thousand users a month on Pro might use a few hours of active CPU, some memory and under a million invocations, staying inside or close to the included credit. The model provider bill for the same traffic could easily be ten or a hundred times larger. Track model costs per user in an observability tool such as Langfuse, since Vercel's usage dashboard shows compute, not tokens.
Related: Next.js stack, React stack, Supabase stack, LiteLLM stack, Vite stack, Stack index.
Frequently asked questions
Can I use Vercel's free plan for an AI app?
For personal, non-commercial projects, yes. Hobby has usage limits on functions, bandwidth and build minutes. Any commercial use, including a side project that earns money, requires Pro or Enterprise under Vercel's terms.
How much does a Vercel AI app cost to run?
The platform cost is usually small: Pro is $20 a month per member with included usage, and Fluid compute bills active CPU time, so waiting on a model response is cheap. Model API fees from OpenAI, Anthropic or Google are separate and usually far larger. Set spend limits in the Vercel dashboard.
What is the Vercel AI SDK?
An open-source TypeScript library for building AI features. It offers one API across many model providers for text generation, streaming, structured output, tool calls, agents and embeddings, plus React, Vue, Svelte and Angular hooks for chat interfaces. It works on any host, not only Vercel.
What is the Vercel AI Gateway?
A hosted proxy that gives one API key and endpoint for hundreds of models from many providers, with automatic fallbacks, usage tracking and spend controls. Vercel charges provider list prices without markup on tokens, and you can bring your own provider keys.
Why did WebSocket support matter?
Real-time voice agents and collaborative AI apps keep two-way connections open. Before October 20, 2026, Vercel Functions did not support WebSockets generally, so these apps needed a separate server. Now the connection can be handled in a Vercel Function.