# Vercel: 413 FUNCTION_PAYLOAD_TOO_LARGE — Request Entity Too Large (4.5 MB limit)

**Code:** `Vercel FUNCTION_PAYLOAD_TOO_LARGE (413)` · **Category:** Next.js · **Seen on:** Next.js

A request or response exceeded Vercel's 4.5 MB serverless function payload limit.

## Meaning

Large uploads/downloads can't go through a Serverless Function. Upload directly from the browser to storage (Vercel Blob, S3 presigned URL, Supabase), stream responses, or split data/pagination. Raising Next.js body limits doesn't bypass the platform limit.

## Common causes

- File upload through an API route
- Large JSON response over 4.5 MB
- Base64-encoded images in request body
- Server Action with big payload
- Proxying large downloads

## Quick fix

1. Use direct-to-storage uploads (presigned URLs/Vercel Blob client uploads)
2. Paginate or stream large responses
3. Compress or reduce payload size

## Detailed fix by platform

### Next.js

1. `import { handleUpload } from "@vercel/blob/client"; // client-side direct upload`

## How to diagnose

1. **Size** — Request/response?
2. **Route** — Upload or API?
3. **Alternative** — Direct upload?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/nextjs/vercel-function-payload-too-large)
