Vercel Serverless Functions
Vercel Serverless Functions on Hobby include 1 million invocations and a 300 second maximum duration, and passing a usage limit usually means waiting 30 days, with no overage.
Vercel Functions run server-side code, such as API routes, webhooks, and streamed responses, deployed together with your site. They are for front-end and full-stack developers who do not want to manage servers.
Is it a fit?
Good fit
Use it for API routes, webhooks, and backend logic that live next to a site you host on Vercel for a personal project.
- prototyping
- static site backends
- personal projects
- small teams
Not a fit
Avoid it for commercial projects on Hobby, or for jobs longer than 300 seconds on the free plan.
- commercial projects on Hobby
- jobs longer than 300 seconds
You add an API route or a function file to your project, such as app/api/hello/route.ts in Next.js or an api/ file in other setups. Vercel builds it on every push or CLI deploy. It suits front-end and full-stack developers who want backend routes and webhooks next to their site.
What the free plan gives you
The Hobby plan is free and meant for personal or non-commercial projects. Its included usage covers the first 1,000,000 function invocations each month. It also includes 4 CPU-hrs of Active CPU and 360 GB-hrs of provisioned memory, which Vercel measures under Fluid compute.
A function on Hobby can use up to 2 GB of memory and run for up to 300 seconds. Functions run in one region by default, iad1, and you can change it. The standard function bundle limit is 250 MB uncompressed, or 500 MB for Python. The large-functions beta permits up to 5 GB for Node.js, Bun and Python with Fluid Active CPU enabled; new projects are eligible by default, while existing projects opt in with VERCEL_SUPPORT_LARGE_FUNCTIONS=1. Hobby also includes 1,000,000 CDN requests and 100 GB of Fast Data Transfer.
When you hit a limit
Hobby is a free tier with no billing cycle. The docs say that if you go over your usage limits, you will in most cases have to wait until 30 days have passed before you can use the feature again. Some limits have shorter pauses.
A function that runs longer than its maximum duration gets a 504 error with the code FUNCTION_INVOCATION_TIMEOUT. To get more room, upgrade to Pro, which includes $20 of usage credit and extends the generally available maximum duration to 800 seconds, with a 1,800-second beta maximum for supported runtime versions after function-level configuration.
Gotchas
- Hobby is for personal or non-commercial use under Vercel's terms of service.
- Caching a response means the function does not run, so it does not use an invocation, though the request still counts as a CDN request. Hobby request bodies are limited to 4.5 MB; oversized requests return 413 FUNCTION_PAYLOAD_TOO_LARGE. The 20 MiB request-body beta requires the paid Performance memory setting.
- Hobby functions cannot run in several regions. Pro and Enterprise teams can set multiple regions.
Alternatives in this atlas
- Vercel Edge Functions: when you want the Edge runtime on Vercel, though Vercel now recommends Node.js.
- Netlify Functions: when your site is hosted on Netlify.
- Cloudflare Workers: when you want a free plan with a different set of limits.
Questions people ask
Are Vercel Serverless Functions free?
Yes, on the Hobby plan for personal or non-commercial use. It includes the first 1,000,000 function invocations, 4 CPU-hrs of Active CPU, and 360 GB-hrs of provisioned memory per month.
What happens when I go over the Vercel Hobby limits?
In most cases you must wait until 30 days have passed before you can use the feature again. Hobby cannot buy extra usage; the Pro plan includes $20 of usage credit.
How long can a Vercel Function run on the free plan?
On Hobby, the default and maximum duration is 300 seconds. A function that runs longer returns a 504 error.
How to get started
- Sign up for a free Vercel account.
- Create a project with pnpm create next-app@latest, or use an existing one.
- Install the Vercel CLI with npm i -g vercel and run vercel link.
- Add a route such as app/api/hello/route.ts that exports a GET function returning a Response.
- Test locally with vercel dev, then deploy with vercel --prod or by pushing to a connected Git repository.
Other free compute options
Same category, safest first.