Documentation Index
Fetch the complete documentation index at: https://docs.moss.dev/llms.txt
Use this file to discover all available pages before exploring further.
Overview
createIndexFromFiles / create_index_from_files lets you index raw files directly. The server handles parsing, chunking, and embedding - you don’t need to extract text or split documents yourself.
Use this instead of createIndex when your source content is files (PDFs, documents) rather than pre-extracted text strings.
Supported formats
| Format | MIME type |
|---|---|
application/pdf |
createIndex.
Usage
Query the index
Once created, use the index exactly like any other -loadIndex + query:
ParseFileInput: see JavaScript or Python for the full field reference.
Options
| Option | JS | Python | Default | Notes |
|---|---|---|---|---|
| Model | modelId | model_id | "moss-minilm" | "moss-minilm" or "moss-mediumlm" only; "custom" is not supported |
| Progress | onProgress | - | - | JS only: callback fired ~every 2s during processing |
"custom" model is not supported because the parse pipeline generates embeddings server-side. If you need to supply your own embedding vectors, extract the text first and use createIndex.
Limits
- Maximum 20 files per call
- Each
ParseFileInputmust provide at least one ofpathordata. If both are given,datatakes precedence.