Skip to main content

Vercel limits the request body of a Function to 4.5 MB. On a Reactive Resume installation hosted on Vercel, larger RPC requests, such as big file uploads or assistant attachments, are first uploaded to private Blob storage. The server then restores the original request and runs it with the usual authentication, validation and limits.

The web app does this for you: it stages any RPC request body of 3 MiB or more, and sends smaller bodies directly. You only need this page if you write your own client for /api/rpc against a Vercel installation.

Scope#

ItemValue
Applies toPOST /api/rpc/... only
Does not apply toThe REST API (/api/openapi) and MCP (/mcp). Their bodies stay subject to the 4.5 MB limit on Vercel.
Available onInstallations running on Vercel with Blob storage (STORAGE_BACKEND=blob, the default there). Everywhere else the prepare step returns 404 and you send the request directly. Staging also needs Redis; without it the prepare step returns 503.
Maximum staged size160 MiB of serialized request bytes, including base64 and RPC framing
LifetimesUpload URL: 5 minutes. Staging reference: 10 minutes.
Use countOne. The reference is used up as soon as a finalize request passes the user and path checks, whether the RPC call then succeeds or fails.
Rate limit30 prepare requests per user per minute

Protocol#

1. Prepare#

Tell the server what you are about to send.

FieldTypeDescription
pathstringPathname and query string of the original RPC request. Must start with /api/rpc.
contentTypestringThe original request’s Content-Type header, including any multipart boundary.
sizeintegerExact byte length of the serialized original body. At most 167,772,160 (160 MiB).

Authenticate with an x-api-key header, an OAuth bearer token or a session cookie. If the request carries an Origin header, it must match the installation’s own origin.

Response 200:

If you get 404, the installation doesn’t stage bodies (for example, it runs in Docker). Send the original request unchanged, and skip staging for later requests too.

2. Upload#

Upload the exact body bytes to the URL from step 1.

Don’t send your Reactive Resume credentials to this URL. The body must be exactly size bytes, sent as application/octet-stream.

3. Finalize#

Send the original request with an empty body and the staging reference in the x-resume-staged-body header:

Use the same path (including the query string) and the same user as in step 1. The server replaces the body with the staged bytes, sets Content-Type to the stored contentType, deletes the staged object and returns the normal RPC response.

Errors#

StatusStepCause
400PrepareInvalid JSON, a path outside /api/rpc or on another origin, or size above the maximum.
400FinalizeMalformed reference, a method other than POST, staging not available on this installation, or the staged object is missing.
401Prepare, finalizeNot authenticated, or the Origin header doesn’t match.
403FinalizeThe reference belongs to another user or another path.
404PrepareStaging isn’t available on this installation.
409FinalizeA parallel request already used the reference.
410FinalizeThe reference expired or was already used.
413FinalizeThe uploaded byte count differs from size.
429PrepareRate limit exceeded.
503PrepareRedis isn’t available.

A reference can’t be retried. If a finalize response is lost, check whether the change was saved before you stage and send the request again.