Documents live inside a knowledge base, which belongs to your organization.
Adding and managing documents requires the owner or admin role — see
Roles & permissions. Every request is scoped to
your organization by the
X-Organization-ID header (see
Org context).Add documents
Open a knowledge base, then drag files onto the upload area or click to choose them. You can select several files at once; ModuleX uploads them one after another.1
Choose your files
Drag and drop, or click the upload area and pick files. Each file is checked
against the supported formats and your
plan’s size limit before it is sent.
2
ModuleX uploads each file
Files upload one at a time. As soon as a file is accepted, it appears as a
document with the status pending.
3
Processing starts automatically
ModuleX prepares each document in the background — extracting text, splitting
it into chunks, and embedding each chunk. You can keep working while large
files process. See Watch documents process.
Supported file types
A knowledge base accepts these formats. The file type is read from the file extension first, then from its content type if the extension is missing.Documents
PDF (
.pdf), Word (.docx, .doc), plain text (.txt), and
Markdown (.md).Web and structured data
HTML (
.html), CSV (.csv), and JSON (.json).Spreadsheets and slides
Excel (
.xlsx) and PowerPoint (.pptx).Check the live list
The app fetches the current list of supported types when you open the upload
area, so it always matches what the service accepts.
Upload size is set by your plan
The largest file you can upload is a plan entitlement, not a single fixed cap. Although some older surfaces still mention a flat 50 MB limit, the value that is actually enforced comes from your organization’s plan:
A second limit applies per knowledge base: there is a cap on how many documents a
single knowledge base can hold, and your plan can set this too. If you hit it,
delete some documents or use another knowledge base. See
Plan limits for the full table.
Duplicate files are skipped
ModuleX fingerprints each file’s contents. If you upload a file whose contents exactly match a document already in that knowledge base, the upload is rejected as a duplicate rather than stored twice. Change the file (even slightly) or upload it to a different knowledge base if you genuinely need a second copy.Add a note to a document (optional)
When you upload over the API, you can attach a small JSON object of metadata — for example{"tags": ["product"]} — to label or group documents. The metadata must
be valid JSON; an invalid value is rejected. See
Add documents over the API.
Watch documents process
Every document reports its progress, so you always know whether it is ready to search. While files are still being prepared, the app refreshes the status automatically every few seconds — you do not need to reload the page.The four document states: pending, processing, completed, failed
The four document states: pending, processing, completed, failed
A document moves through these states in order:
- Pending — uploaded and waiting in the queue. No chunks yet.
- Processing — being parsed, split into chunks, and embedded. This is where text extraction and vectorizing happen.
- Completed — fully prepared. The document now has a chunk count and a token count, and its chunks are searchable.
- Failed — something went wrong while preparing the file. The document keeps an error message explaining what happened, and you can retry it.
Chunk count
How many searchable passages the document was split into. More chunks usually
means a longer document, or smaller chunk-size settings on the knowledge base.
Token count
The total number of tokens across the document’s chunks. This is what managed
knowledge bases meter for embedding — see What processing costs.
Retry a failed document
If a document ends up failed, the most common causes are a corrupt file, an unreadable scan with no extractable text, or a format the parser could not open. Fix the source file if needed, then retry.1
Open the failed document
Find the document in the table — failed documents show an error message that
usually explains what went wrong.
2
Select retry
Retrying resets the document to pending, clears the old error and
timestamps, and runs the preparation pipeline again from the start.
3
Watch it process again
The document moves back through processing to completed (or failed
again if the underlying problem is not fixed).
Retrying does not double-charge. On a managed (modulexdb)
knowledge base, the embedding cost for a document is recorded against its content,
so retrying an unchanged document does not spend embedding credits again. See
What processing costs.
Inspect a document’s chunks
Once a document is completed, you can look at the individual chunks it was split into. This is the quickest way to understand why a search returns a particular passage, or to check that a document was extracted cleanly. Each chunk carries:
You can also run the knowledge base’s search test to preview which chunks a
question returns, ranked by relevance — see
Use a knowledge base.
Delete a document
Deleting a document removes it and all of its chunks from the knowledge base. By default it also removes the stored file. Deletion is permanent — there is no undo — so the document stops contributing to answers immediately.What processing costs
Whether preparing a document costs anything depends on where the knowledge base stores its vectors.Bring your own (BYOK)
On a knowledge base pointed at your own vector store, ModuleX does not charge
credits for processing — your provider bills you directly. See
External knowledge providers.
On a managed knowledge base, an upload that would exceed your plan allowance can
return a billing denial — a
402, 403, or 429 response carrying a
{code, layer, key, current, limit, reason} envelope — instead of storing the
document. Plan size and document-count limits, by contrast, return a 403 with a
plain {detail} message. See Credits & metering,
Usage gating & limits, and
Errors & status codes.Add documents over the API
Everything above is available programmatically. Upload is amultipart/form-data request: send the file as the file part, and an optional
JSON metadata part. Authenticate every request the same way as every other
endpoint — an Authorization: Bearer mx_live_… header plus X-Organization-ID
(see Authentication).
pending. Poll its status
to follow the move through processing to completed (or failed). A completed
document reports its chunk_count and token_count; a failed one carries an
error_message.
The exact SDK method names and argument shapes for document upload, list, status,
retry, and delete are not yet pinned in the SDK reference; the snippets above show
the operation and the request shape the REST API expects. For the authoritative
per-operation signatures, see the SDKs overview and the
SDK ⇄ API parity matrix.
Where to go next
Knowledge overview
Create a knowledge base, set its chunking, and use it across chats and
workflows.
Managed knowledge (modulexdb)
How ModuleX-hosted vector storage and retrieval work, and what they cost.
Knowledge & RAG
The concepts behind documents: chunks, embeddings, ingest, and retrieval.
Build a RAG knowledge base
A start-to-finish guide: create a knowledge base, ingest documents, and query
it.
Credits & metering
What a credit is and exactly what processing a document consumes.
Chat with your knowledge
Ask questions in chat answered from your completed documents.