Creates a GCS resumable upload session behind our domain. The caller PUTs file chunks to the returned uploadUrl with Content-Range headers.
Clerk session JWT or Unkey API key passed as Bearer token
Workspace ID fallback. Required when authenticating with a Bearer token in environments where cookies cannot be shared (e.g. preview). Not needed for API key auth (workspace is embedded in the key metadata) or when the workspace cookie is present.
"43dc2a1c-3384-41b5-a6e9-3b2d607d0fae"
Required when authenticating with an API key. Identifies the end-user making the request. Ignored when authenticating with a Bearer token (the user ID is extracted from the token).
"user_abc123"
Optional. Email of the external user, used for audit logging. Only applicable when authenticating with an API key.
"user@example.com"
Original file name including extension
1Total file size in bytes. Must not exceed the format-specific limit (e.g. 30 MB for PDF/images, 2 GB for video/audio, 10 MB for documents)
MIME type (e.g. application/pdf, image/png)
1Upload initiated — use uploadUrl to PUT file chunks
Server-generated upload identifier
Relative URL for chunk uploads: PUT /v1/uploads/{uploadId}
Maximum bytes per PUT chunk request (default 50 MB). Final chunk may be smaller.
Correlation ID for request tracing. Include in support requests.