Building and running websites and apps on Vercel

UAE · India · Global

Your developer wants a Python API beside the website? Five limits to check on Vercel

By Shivanath DevinarayananPublished 7 min read
Written forHead of digital, IT manager, or founder who owns the company website or web app, signs the hosting bill and answers client security questionnaires“Our site and web app live on an old server, and the security questionnaire is due.”

The short answer

Should a Python team run its FastAPI backend on Vercel, and which limits decide it?

Vercel runs a FastAPI app as one function on Fluid compute. It fits APIs that answer within minutes, take requests under 4.5 MB and fit a 500 MB bundle. Large uploads, heavy libraries and long jobs need another plan. At Mindcat, we check those limits against your app before anything moves.

A desk with a laptop showing a wordless dashboard and, beside it, five brass measuring tools laid out in a row

Takeaways

  1. 01Vercel turns a whole FastAPI app into one function on Fluid compute, with Python 3.12 as the default.
  2. 02Request and response bodies stop at 4.5 MB. Larger uploads go straight to storage.
  3. 03The bundle limit is 500 MB with no tree-shaking, so heavy libraries count in full.
  4. 04Files served from the CDN skip middleware and Depends() guards, so keep private files out of public/.

If your team writes Python and needs an API next to the website, for bookings, a price calculator or reports, this is for you. Vercel will run FastAPI with almost no setup. Whether it should depends on five limits, and you can check them before anyone moves a file.

What does Vercel do with a FastAPI app?

It runs the whole app for you, with no server to size or patch, and scales it with traffic. Technically, it turns the app into one Vercel Function. Vercel looks for a FastAPI instance named app in app.py, index.py, server.py, main.py, wsgi.py or asgi.py, and the function runs on Fluid compute by default, so it scales with traffic. Python 3.12 is the default, with 3.13 and 3.14 available.

Files in a public/ folder are served from Vercel's CDN, not the function. Since a recent change, frontends and static folders mounted inside FastAPI can be served from the CDN too.

For what FastAPI does on Vercel and how it fits with your other systems, see FastAPI on Vercel.

Which five limits decide it?

These five, all from Vercel's docs read on 16 October 2026.

LimitWhat it means for your app
Request and response bodies: 4.5 MBA larger upload gets a 413 error. Send files straight to storage instead
Bundle: 500 MB, no tree-shakingHeavy data or machine learning libraries count in full, so a large app may not deploy. Large Functions up to 5 GB are in public beta
Run time: Hobby 300 s; Pro 300 s default, 800 s maximum1,800 s is in beta on Pro. Longer jobs need a queue or a worker
Shutdown cleanup: 500 msWhen Vercel stops a copy of your app, cleanup gets half a second, and its logs are not shown. Do not rely on it to save data
Memory: Hobby 2 GB; Pro 4 GBA report that loads a large file into memory can hit this first
FastAPI on Vercel limits: 4.5 MB bodies, 500 MB bundle, 300 to 800 s runs, 500 ms shutdown, CDN files skip guards
Five limits that decide it, from Vercel's FastAPI and function limits pages, 16 October 2026.

The first one catches most owners. A Python team used to its own server rarely thinks about upload size until a customer sends a scanned 12-page document and gets an error.

Which files skip your login checks?

Anything served from the CDN. Vercel's FastAPI docs say CDN-served files "bypass the function entirely", so middleware and Depends() guards do not run for them.

Vercel guards against the obvious mistake. When your app has top-level middleware, or a frontend with a Depends() guard, it keeps those files in the function. Two things undo that protection:

  1. 01Setting cdn = true in pyproject.toml. Vercel then serves the files from the CDN even when guards exist.
  2. 02Putting files in public/. Vercel serves that folder from the CDN at the platform level, with no check at all.

Keep anything private, such as reports, invoices or patient papers, in storage that your API hands out after a login, never in public/.

What does it cost, as of 16 October 2026?

Vercel Pro is USD 20 a month with one deploying seat and USD 20 of usage credit. Extra deploying seats are USD 20 a month each, and viewer seats are free. Above the credit, functions are metered: USD 0.128 per Active CPU hour and USD 0.0106 per GB-hour of memory (USD 0.14 and USD 0.0116 in Mumbai), plus USD 0.60 per million invocations. Active CPU is not charged while your code waits on a database or another API, though memory still is. New teams get a default on-demand budget of USD 200.

In one line: USD 20 a month for each deploying seat, and well under a dollar of usage for the sample below, inside the included credit. Our arithmetic for the clinic below, from list prices at Mumbai rates, not a measured bill. Assume 50,000 API calls a month, each 30 ms of Active CPU while the rest is database wait, and 2 GB held for 300 ms. That is 0.42 CPU hours (USD 0.06), 8.3 GB-hours (USD 0.10) and USD 0.03 of invocations: about USD 0.19, inside the USD 20 credit.

We are not a Vercel partner and earn nothing from your Vercel bill. Our own site runs on Netlify. What stays portable: a FastAPI app is a standard ASGI app that runs in any container. What is Vercel's: the pyproject.toml tool.vercel settings, vercel.json services and the CDN promotion.

The free Hobby plan is for non-commercial, personal use only, so a business API belongs on Pro. Your database and file storage are billed separately.

If the website and the API should live together, Vercel's Services, in beta on all plans, puts both in one project. You declare a Next.js frontend and a FastAPI backend in vercel.json, and rewrites send each path to the right one.

One Vercel project with Services: the website and the FastAPI backend, with rewrites sending each path to the right one
Website and Python API in one project with Services (beta).

What would we do for a clinic?

Take a sample outpatient clinic in Dubai with a booking website and a small Python team that wants patients to upload lab reports and read results online. This is an illustration, not a client story.

  1. 01Put the website and the FastAPI backend in one project with Services, so one preview link shows both.
  2. 02Send lab report uploads straight to storage with a short-lived upload link, so no file passes through the 4.5 MB limit.
  3. 03Keep results out of public/ and serve each one through the API after the patient logs in.
  4. 04Check where the storage and database keep their data. There is no Vercel region in the UAE or Saudi Arabia; Mumbai (bom1) is the nearest.
  5. 05Move the nightly report that reads a month of bookings into a queue, so it never races the run-time limit.
  6. 06Have the clinic manager approve every change on its preview link before it goes live.
Clinic example: the booking site calls FastAPI, lab reports go straight to storage, results sit behind a login
A worked example for a clinic. Illustrative, not a client story.

Patient records carry their own rules on where data is kept. Settle those with your compliance lead before choosing any host. See how we work with clinics, and Mindcat Clinic if you would rather not build the patient side at all.

What goes on the security questionnaire?

Vercel splits the answers in its shared responsibility model, read on 16 October 2026. Here is who writes each line.

Questionnaire lineWho answers it
Platform certificationsVercel. It holds a SOC 2 Type 2 attestation and ISO 27001:2022; reports are at security.vercel.com. They cover Vercel's platform, so request them from Vercel
Network, infrastructure, encryption in transit and at restVercel, for the services it runs
Where data is processedYou. You pick the function region. None is in the UAE or Saudi Arabia; Mumbai (bom1) is the nearest. Your database is wherever you put it
Logins, keys and source codeYou. Vercel holds environment variables; who can read them is your team setting
Logs kept long termYou, through a log drain. Vercel keeps short-term runtime logs
Cost of bad trafficYou. Vercel's model says the customer pays for malicious traffic, so set a spend limit

If a contract says data must be processed inside the UAE, Vercel cannot meet it today. Say so before you sign, not after.

For a bad month, set Spend Management. Vercel sends alerts at 50%, 75% and 100% of the amount you set, and pauses production when you reach it if Pause Production Deployments is on. A budget alone does not stop usage, and the check can lag by several minutes. If a change breaks the site, Instant Rollback on Pro returns production to any earlier production deployment from the dashboard; environment variable changes are not rolled back with it. Vercel offers a HIPAA business associate agreement on Pro for USD 350 a month, which matters for US patient data; UAE health data rules are a separate question for your compliance lead.

Vercel or a server of your own?

Here is the rule we use.

If your APIThen
Answers in seconds, takes small requests, uses ordinary librariesVercel fits. Put it beside the website with Services
Takes large uploads or serves private filesVercel fits once files go straight to storage and stay out of public/
Needs heavy machine learning libraries, long jobs or a process that never stopsUse a container or a server of your own for that part

If your Python team already runs the API on a server it knows, and nothing about it is hurting, leave it there. This post is for teams choosing where a new or moving API should live.

What happens on the first call?

We call the method Preview every change: each change gets its own preview link, someone on your side approves it on a phone, then it goes live, and any release can be rolled back. Send us the repository and tell us what the API does and who uses it. The written assessment is free and checks your app against each limit above. The first build week is a fixed AED/SAR 14,900, and a Run plan keeps the site and the API patched afterwards. More on how we build and run apps is on our Vercel page.

Filed under

Building and running websites and apps on Verceldeploy fastapi to vercelfastapi vercel limitspython api on vercelvercel services fastapi
Useful to someone on your team?

FAQ

Questions teams ask next

Can I deploy FastAPI to Vercel without configuration?
Yes. Vercel looks for a FastAPI instance named app in app.py, index.py, server.py, main.py, wsgi.py or asgi.py, at the root or under src/ or app/. A custom module can be named with tool.vercel.entrypoint in pyproject.toml. The CLI command vc init fastapi starts a new project, and needs Vercel CLI 48.1.8 or later.
How long can a FastAPI request run on Vercel?
On Hobby, 300 seconds. On Pro, 300 seconds by default and up to 800 seconds when you set maxDuration, with 1,800 seconds in beta, according to Vercel's function limits page read on 16 October 2026. Work that runs longer, or must run all the time, belongs in a queue or a worker.
Can Vercel host the website and the FastAPI backend in one project?
Yes, with Services, which Vercel lists as beta and available on all plans. You declare each service in vercel.json, such as a Next.js frontend and a FastAPI backend, and rewrites send each path to the right one. For workers that run continuously and pull their own work, Vercel points to Daemons.
Which Python versions does Vercel support?
Vercel's Python runtime page lists 3.12 as the default, plus 3.13 and 3.14, read on 16 October 2026. You choose the version in your project files. Check that every library your app uses supports the version you pick before the first deploy, especially libraries with compiled parts.

Sources

  1. 01Vercel docs: FastAPI on VercelAccessed 16 Oct 2026
  2. 02Vercel docs: Vercel Functions limitationsAccessed 16 Oct 2026
  3. 03Vercel docs: Python runtimeAccessed 16 Oct 2026
  4. 04Vercel docs: ServicesAccessed 16 Oct 2026
  5. 05Vercel docs: Fluid computeAccessed 16 Oct 2026
  6. 06Vercel docs: Functions usage and pricingAccessed 16 Oct 2026
  7. 07Vercel docs: Pro planAccessed 16 Oct 2026
Shivanath Devinarayanan, founder of Mindcat

Written by

Shivanath Devinarayanan

Founder, Mindcat Consulting · Salesforce MVP Hall of Fame

Runs 200+ agents in production. Reads every brief that comes in and signs the work that goes out.

About Shivanath

Build It, Preview It, Run It · the written assessment

We work in real estate and right now, leads go cold before anyone replies.

Industry
Problem

Brief: Real estate. Leads from portals and WhatsApp. Follow-up has no owner. An agent on a named process. A reviewer on the exceptions. From: /blog/fastapi-vercel-python-api-limits.