Skip to main content
Vercel limits Function request bodies to 4.5 MB. On Vercel installations, RPC requests larger than that are uploaded to private Blob staging first. The server then restores the original request and runs it with the normal authorization, validation, and quota checks. The web app uses this protocol automatically for request bodies of 3 MiB or more. Docker installations do not need it.

Scope

Protocol

1. Prepare

Authenticate with a session cookie, an x-api-key header, or an OAuth bearer token. Browsers must send an Origin header that matches the application origin. Response 200:
The endpoint returns 404 when the installation does not support staging, for example on Docker. Send the original request unchanged in that case.

2. Upload

Do not send application credentials to this URL. The body must be exactly size bytes.

3. Finalize

Send the original request with an empty body and the staging reference header:
Use the same path and the same user as in step 1. The server replaces the body with the staged bytes, sets Content-Type to the stored contentType, and returns the normal RPC response.

Errors

A reference cannot be retried. If a finalization response is lost, check the result of the mutation before you stage and send it again.