File Uploads

Upload documents directly via multipart form data.

POST /upload

Upload a file directly to PARSEKIT for processing. Returns a file_id and file_url — use either with the /convert or /extract endpoints.

Request

```

POST https://api.parsekit.dev/upload

Content-Type: multipart/form-data

Authorization: Bearer YOUR_ACCESS_TOKEN

```

Parameters

FieldTypeRequiredDescription
fileFileYesThe document to upload

Supported File Types

CategoryExtensionsMIME Types
PDF.pdfapplication/pdf
Word.docx, .docapplication/vnd.openxmlformats-officedocument.wordprocessingml.document, application/msword
HTML.html, .htmtext/html
Markdown.mdtext/markdown
Plain Text.txttext/plain
Images.png, .jpg, .jpeg, .gif, .webp, .tiffimage/png, image/jpeg, image/gif, image/webp, image/tiff

Max file size: 25 MB

Examples

-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -F "file=@/path/to/document.pdf"

Response

{
  "file_id": "clx7abc123def",
  "file_url": "https://files.parsekit.dev/signed/...",
  "filename": "document.pdf",
  "size_bytes": 1048576,
  "mime_type": "application/pdf",
  "created_at": "2026-01-15T10:30:00.000Z",
  "expires_at": "2026-01-15T12:30:00.000Z"
}
FieldTypeDescription
file_idstringUnique file identifier — use with /convert or /extract
file_urlstringSigned URL to access the file directly
filenamestringOriginal filename
size_bytesnumberFile size in bytes
mime_typestringDetected MIME type
created_atstringUpload timestamp (ISO 8601)
expires_atstringAuto-deletion timestamp (ISO 8601) — 2 hours after upload

Files are encrypted with AES-256 and automatically deleted after 2 hours.