/v1/uploads
An upload is a short-lived, single-use slot for a file. It exists for one situation: a program has a file on its own disk but reaches Deskew through something that cannot carry bytes well, such as an assistant talking to the hosted MCP server. Instead of pushing base64 through the conversation, the program asks for an upload URL, sends the bytes with one curl, and refers to the upload by id.
Uploads live for one hour, belong to the project of the key that created them, and are consumed by the first request that uses them. The worker sweeps uploads that were never used.
POST /v1/uploads
Section titled “POST /v1/uploads”Scope extract:write. JSON body:
| Field | |
|---|---|
filename |
Required. Used for type detection and shown in the dashboard |
size |
Optional. Checked against the 500 MB limit before you upload |
content_type |
Optional |
{ "object": "upload", "id": "upl_01M93…", "status": "pending", "filename": "receipt.pdf", "upload_url": "https://api.deskew.dev/v1/uploads/upl_01M93…/content?token=…", "method": "PUT", "max_bytes": 524288000, "expires_at": "2026-12-05T18:12:04Z", "curl": "curl -sS -X PUT --data-binary @'receipt.pdf' 'https://api.deskew.dev/v1/uploads/upl_01M93…/content?token=…'", "then": "POST /v1/extract with upload=upl_01M93… …"}PUT /v1/uploads/{id}/content?token=…
Section titled “PUT /v1/uploads/{id}/content?token=…”No API key: the signed token in the URL is the credential, so the command can run anywhere. The body is the raw file bytes (curl --data-binary @file or curl -T file); a multipart form is refused with upload_not_raw. Answers { "status": "ready", "size": … }. Errors: upload_url_invalid (401, wrong or expired token), upload_empty (422), file_too_large (413).
GET /v1/uploads/{id}
Section titled “GET /v1/uploads/{id}”Scope extract:write. status is pending until the bytes arrive and ready after.
Using the id
Section titled “Using the id”POST /v1/extractwithupload=<id>as a form field or{ "upload": "<id>" }in a JSON body, in place offileorurl.POST /v1/extractors/suggestwithupload=<id>.POST /v1/packetswith one or moreuploads=<id>form fields, alone or alongsidefiles.
A used, expired or unknown id answers 404 upload_not_found. The same id cannot be used twice.