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
| Field | Type | Required | Description |
|---|---|---|---|
file | File | Yes | The document to upload |
Supported File Types
| Category | Extensions | MIME Types |
|---|---|---|
.pdf | application/pdf | |
| Word | .docx, .doc | application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/msword |
| HTML | .html, .htm | text/html |
| Markdown | .md | text/markdown |
| Plain Text | .txt | text/plain |
| Images | .png, .jpg, .jpeg, .gif, .webp, .tiff | image/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"
}| Field | Type | Description |
|---|---|---|
file_id | string | Unique file identifier — use with /convert or /extract |
file_url | string | Signed URL to access the file directly |
filename | string | Original filename |
size_bytes | number | File size in bytes |
mime_type | string | Detected MIME type |
created_at | string | Upload timestamp (ISO 8601) |
expires_at | string | Auto-deletion timestamp (ISO 8601) — 2 hours after upload |
Files are encrypted with AES-256 and automatically deleted after 2 hours.