Vercel 413 FUNCTION_PAYLOAD_TOO_LARGE with Sume video
Vercel Functions cap request and response bodies at 4.5 MB. Do not proxy a generated video through one; hand the client the media.sume.com URL instead.

Vercel returns 413: FUNCTION_PAYLOAD_TOO_LARGE when a Function's request or response body exceeds 4.5 MB. A generated video is usually bigger, so do not stream it back through a Function; return the Sume media URL from the job result and let the browser fetch it directly.
The limit is from Vercel's Functions limitations page (updated 2026-08-24), read 2026-09-30. Sume behavior is from Jobs and results and Media inputs.
What exactly does Vercel limit?
The page says the maximum payload size for the request body or the response body of a Vercel Function is 4.5 MB, and a larger payload returns 413 FUNCTION_PAYLOAD_TOO_LARGE. It applies in both directions, so it hits an upload through your route and a download through your route.
What does a Sume result give me instead of bytes?
Results carry a hosted URL. A webhook payload's artifact looks like { "id": "artf_...", "url": "https://media.sume.com/artifacts/...", "type": "image", ... }. The docs say to use Sume media URLs from the result, that Sume mirrors generated outputs into Sume-owned media URLs, and that integrations should store the Sume URL. So your route can return a few hundred bytes of JSON.
| Approach | Body size through the Function | Risk |
|---|---|---|
| Proxy the video bytes | The whole file | 413 above 4.5 MB |
| Return the Sume artifact URL | A short JSON field | None from this limit |
| Browser fetches the URL | Nothing | Store your own copy if you need long-term retention |
What about sending big inputs to Sume?
Inputs go in as public HTTPS URLs in fields such as input.image_url or video_url, and the docs say no separate upload step is needed for normal integrations. So you do not need to push a large file through a Function either. See downloading a generated video from the API for saving the file.
Does Sume also have a request size limit?
Yes, separately: the error table lists 413 payload_too_large when the request body exceeds the configured API limit. That is about your JSON request to Sume, which should be small when you pass URLs.
Sources
Related posts
More in Developers
- Vercel Queues retry can resubmit a paid Sume job
A Vercel Queues consumer that times out is redelivered, and maxDeliveries is unlimited by default. Reuse one Idempotency-Key per message so Sume bills once.
- Vercel rewrite to an external API times out at 120 seconds
Vercel proxied rewrites to an external destination time out at 120 seconds with ROUTER_EXTERNAL_TARGET_ERROR. A Sume async submit returns at once.
- Video 1.0 4k resolution error: only 720p and 1080p on that URL
Video 1.0 accepts 720p (default) and 1080p from its legacy vocabulary and rejects 4k. For 4K send a sume/auto request to POST /v1/videos instead.
- Video 1.0 bitrate_mode: still in the shape, rejected by Auto
bitrate_mode is retained in Video 1.0's legacy request shape but Auto rejects it. Omit it, and note that Gemini Omni Flash 1.1 has no bitrate_mode either.
Written by Sume