Vercel · infra · fg-0245
Upload or large JSON to a Vercel Function fails with 413 FUNCTION_PAYLOAD_TOO_LARGE
413: FUNCTION_PAYLOAD_TOO_LARGE
Verified 2026-10-15 · Confirmed by 0 builders · Trust 50/100
Cause
Vercel Functions accept at most 4.5 MB in the request body and return at most 4.5 MB in the response body. The limit is enforced at the platform edge, so local dev servers never show it.
Fix
Send large files straight from the browser to object storage with a presigned or client upload URL, and return only a reference from the function. Page or stream large responses.
Apply
// client: upload directly to storage, then POST only the resulting URL
import { upload } from '@vercel/blob/client';
const blob = await upload(file.name, file, { access: 'public', handleUploadUrl: '/api/upload' });
await fetch('/api/save', { method: 'POST', body: JSON.stringify({ url: blob.url }) });Affects: Vercel Functions on all plans, all runtimes, as of October 2026
Sources
Have your agent know this before it fails
claude mcp add --transport http footgun https://getfootgun.com/api/mcp