Upload fails on Vercel with error 413? The 4.5 MB function limit

Ship ItChecked against the official source

The short answer

Vercel's docs say the maximum payload size for the request body or the response body of a Vercel Function is 4.5 MB. A function that receives more returns error 413: FUNCTION_PAYLOAD_TOO_LARGE. Vercel's knowledge base says the most common reason is uploading large files through the function, and that functions should be treated like a lightweight API layer, not a media server.

What to do

  1. Check whether your uploads pass through a Vercel Function.
  2. Upload large files directly from the browser to a media host or storage, so the file never passes through the function. Vercel's example is client-side uploads to Vercel Blob.
  3. Send your API only the file URL.
  4. Ask your AI tool: "Uploads over 4.5 MB fail with 413 on Vercel. Change the upload so the browser sends the file straight to storage and my API only receives the file URL."

Good to know

  • The 4.5 MB limit applies to Vercel Functions only.
  • If the response is too big, Vercel suggests returning less data per request or streaming it.

Source

Checked on 10 Oct 2026. Prices, limits and settings change, so check the source before you rely on them.

Related