Building and running websites and apps on Vercel

India · UAE

Paying for servers that wait on AI replies: what fluid compute bills, worked through

By Shivanath DevinarayananPublished 5 min read
Written forCTO, CXO, or VP or director of engineering who owns the agent stack and the model bill“Which model should run which step, and what does each step cost?”

The short answer

How does Vercel's fluid compute bill AI and API requests, and when does it lower the cost of running them?

On fluid compute you pay for CPU only while your code is working, not while it waits on a model or an API. Memory is billed the whole time, and many waiting requests can share one instance. It pays off for work that mostly waits, not for heavy number-crunching. At Mindcat, we cost each step before choosing where it runs.

A delivery scooter at night with a phone showing a chat and a glowing hourglass, and the words CPU billed when busy

Takeaways

  1. 01Active CPU is billed only while code runs. Waiting on a model or an API pauses it.
  2. 02Provisioned memory is billed for the instance's whole life, waiting included. On waiting work it is the bigger line.
  3. 03Many requests share one instance on Node.js and Python, which is where the saving on waiting work comes from.
  4. 04Requests run 300 seconds by default and up to 800 on Pro. Longer jobs belong in Workflows.

If your app spends most of each request waiting on an AI model, a CRM or a WhatsApp API, and you cannot say what that waiting costs, this is for you. It is not for a team without a production workload to measure: cost it once you have real traffic, not before.

What are you paying for while a model writes a reply?

On classic serverless billing, the whole time. The function holds its CPU and memory from the first line to the last, and most of that time it is waiting for someone else's server to answer.

Vercel's functions pricing docs give the shape of it: a function that spends 100 ms working and 400 ms waiting on a database query is billed for 100 ms of active CPU. For an AI reply the gap is wider. The code that reads a record and builds a prompt takes a moment; the model takes seconds.

That waiting is the cost fluid compute goes after. Vercel's product page calls it "CPU that's charged when active, not idle."

Where we run agents and APIs, and how we cost each step, is on fluid compute.

How does fluid compute bill a request?

On three lines, and only one of them pauses while you wait.

A 4-second request: 0.05 s of code bills CPU, 3.95 s waiting on the model does not; memory bills throughout
What a request is billed for while the model writes the reply.
LineBilled whilePro rate, Mumbai (bom1)
Active CPUYour code is running. Paused while it waits on I/O.$0.140 per CPU-hour
Provisioned MemoryThe instance is alive, until the last request in flight finishes$0.0116 per GB-hour
InvocationsEach request, successful or not$0.60 per million

The memory line is the one to watch. Vercel says memory "continues billing while handling requests, even during I/O operations." What brings it down is sharing. With optimized concurrency, many requests run on one instance, so the memory one instance holds is spread across every request waiting inside it. Vercel offers this on the Node.js and Python runtimes.

Three instances each holding one request, against one fluid compute instance holding three requests
Optimized concurrency: waiting requests share one instance on Node.js and Python.

After the last request finishes, the instance pauses and nothing is billed until the next one arrives.

What does a parcel-status reply cost to run?

Here is a sample, not a client. A courier company answers "where is my parcel?" on WhatsApp. A function reads the tracking record, asks a model to write the reply, sends it, and writes a log after the reply has gone, using waitUntil so the customer does not wait for the log.

Sample flow: customer asks on WhatsApp, function reads the tracking record, model writes, reply sent, log written after
A sample parcel-status flow, not a client.

Our assumptions, to show the method: each reply takes 4 seconds, of which 0.05 seconds is the function's own work and the rest is waiting on the model and the APIs. The function runs on the default 2 GB, 1 vCPU size in Mumbai. We take the worst case, where no two replies overlap, so nothing is shared.

LineArithmeticCost
Active CPU100,000 × 0.05 s = 1.39 CPU-hours × $0.140$0.19
Provisioned Memory100,000 × 4 s × 2 GB = 222 GB-hours × $0.0116$2.58
Invocations0.1 million × $0.60$0.06
Total on VercelBefore the Pro credit$2.83

Two things follow. On waiting work, memory is about nine tenths of the Vercel line, so the saving comes from replies overlapping on a shared instance, and how much depends on how bunched your traffic is. And this table leaves out the model and WhatsApp, which bill you separately. We cost those per step as well, because that is where a reply's price usually moves. For the messaging side, see WhatsApp Business API pricing in the UAE, and for the work itself, Mindcat for couriers and delivery.

Vercel's /fluid page quotes an unnamed developer "cutting costs by over 50% with zero code changes." That is Vercel's customer quote, not a number we can promise. Run your own month and compare.

When does fluid compute not help?

When the work is the CPU. Vercel's pricing docs say compute-heavy tasks such as image processing use more CPU time than I/O-heavy tasks such as API calls. Resizing photos, building PDFs or crunching a large export keeps the CPU busy, so the active CPU line grows and there is little waiting to save.

It also does not change where the function runs. Functions run in iad1, Washington, D.C., unless you choose a region, and there is no region in the Gulf. A Gulf company calling a model and a CRM should put the function near those, which often means Mumbai or Europe, not near the customer.

How long can one request run?

Five minutes by default, and a ceiling above that.

Request limits: 300 seconds by default, up to 800 on Pro and Enterprise, 30 minutes in beta, Workflows for longer
How long one request can run, from Vercel's fluid compute docs.
PlanDefaultMaximum
Hobby300 seconds300 seconds
Pro300 seconds800 seconds; 1,800 seconds in beta
Enterprise300 seconds800 seconds; 1,800 seconds in beta

An agent that reads 40 documents and writes a report does not belong in one request. Vercel's docs point long work to Vercel Workflows, which can pause, resume and keep state from minutes to months. Split the job into steps there, and keep each request short.

What should you check before you switch it on?

New projects have it on already: Vercel made fluid compute the default for new projects on 23 April 2025. Older projects have a toggle in Project Settings, under Functions, or "fluid": true in vercel.json. Before you flip it on an old project, check four things.

  1. 01Shared state: requests now share one process. Anything your code keeps in a module-level variable is visible to every request on the instance.
  2. 02Errors: Vercel says an unhandled error lets the other requests finish before the process stops, so log it and fix it rather than relying on restarts.
  3. 03The region: set it near the data, not the iad1 default by accident.
  4. 04The baseline: note last month's function cost and duration first, so you can compare a month on fluid compute with a month without.

What happens on the first call?

We call the method Preview every change, and that includes how a function runs: switch fluid compute on for one preview, measure it, then promote. On the call you tell us what each step calls and how long it waits. The written assessment is free and gives a cost per step, the region for each function and what moves to Workflows.

The first build week is a fixed AED/SAR 14,900, and Run plans watch the bill after go-live. See everything we build at Vercel, then send us the workload.

Filed under

Building and running websites and apps on Vercelvercel fluid compute pricingactive cpu pricingvercel function max durationserverless cost ai api
Useful to someone on your team?

FAQ

Questions teams ask next

What is fluid compute?
It is the way Vercel Functions run by default for new projects since 23 April 2025. Vercel describes it as combining the efficiency of servers and the flexibility of serverless. Many requests can share one instance, CPU is billed only while code is active, and background work can continue after the response with waitUntil. Cold starts are reduced, not removed.
How much does fluid compute cost?
On Pro it is billed on three lines, as of 16 October 2026: Active CPU per hour, Provisioned Memory per GB-hour and invocations at $0.60 per million. Rates vary by region. In Washington, D.C. (iad1) they are $0.128 and $0.0106; in Mumbai (bom1) $0.140 and $0.0116. Hobby includes 4 hours of Active CPU, 360 GB-hours of memory and 1 million invocations a month, but Hobby is for non-commercial use only.
Does fluid compute remove cold starts?
No. Vercel's docs say it reduces their effect, through bytecode caching on Node.js 20 and later and pre-warming on production deployments. Bytecode caching applies only in production, not in development or preview deployments, and the first request after a deploy is not cached yet. Plan for an occasional slower first request.
Can a function on fluid compute run an hour-long job?
No. The default is 300 seconds, Pro and Enterprise can set up to 800 seconds, and an extended 30-minute maximum is in beta for supported Node.js, Bun and Python versions. Hobby stops at 300 seconds. For work that must pause and resume over minutes or months, Vercel's docs point to Vercel Workflows.

Sources

  1. 01Vercel docs: Fluid computeAccessed 16 Oct 2026
  2. 02Vercel docs: Fluid compute pricing (usage and pricing for functions)Accessed 16 Oct 2026
  3. 03Vercel: Fluid compute product pageAccessed 16 Oct 2026
  4. 04Vercel docs: Configuring function memoryAccessed 16 Oct 2026
  5. 05Vercel pricingAccessed 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/fluid-compute-ai-api-costs.