The upload flow
Every file upload is a three-step process:- Init — call
POST /files/initwith the filename and size. Memic returns a presigned upload URL. - Upload —
PUTthe file contents directly to the presigned URL. This bypasses the Memic API entirely so large files don’t hit request limits. - Confirm — call
POST /files/{id}/confirmto signal upload is complete. Memic queues the file for processing.
client.files.upload(...)
call, but if you’re calling the API directly (or uploading from a browser),
you’ll do each step yourself. See the cURL quickstart for
the raw HTTP flow.
Processing lifecycle
After confirm, a file goes through these statuses:pending— queued, not yet picked up by a workerprocessing— being chunked, embedded, and indexedready— searchablefailed— processing failed (check/files/{id}/statusfor the reason)
ready within 30 seconds. Larger
files or spreadsheets can take longer.
Polling vs waiting
For interactive flows, poll/files/{id}/status every 2–5 seconds until
ready. The endpoint has a higher rate limit than search/chat specifically
for this use case.
For batch uploads where you don’t need immediate feedback, upload everything
and check status in a single pass at the end.
Supported file types
- PDF — with full text extraction and table detection
- Plain text (
.txt,.md) - Microsoft Office (
.docx,.pptx,.xlsx) - Web formats (
.html) - Image formats (
.png,.jpg) — text extracted via OCR
init time with invalid_file_type.
Maximum file size
The current limit is 100 MB per file. For larger files, split them into logical sections (e.g. chapters) and upload as separate files.Batch uploads
The Python SDK provides a batch helper that uploads multiple files in parallel:init + PUT + confirm for each file with
controlled concurrency.
Replacing a file
To update the content of a file, upload a new version with the same filename. Memic treats filenames as human labels, not unique keys — the new upload creates a newfile_id.
To replace and remove the old version: upload the new file, delete the old
one with DELETE /files/{old_id}.
Related
Search guide
Once files are ready, query them.
API reference
Full file endpoint docs.