upload_file()
Upload a file from disk. Vrin accepts PDFs, CSVs, text files, and other common document formats.Parameters
Path to the file to upload. Accepts strings or
pathlib.Path objects.If
True, persist extracted knowledge to the knowledge base. If False, the file is processed but facts are not stored permanently.If
True, poll until processing completes.Seconds between status polls when
wait=True.Maximum seconds to wait when
wait=True.Example
upload_bytes()
Upload raw bytes directly without a file on disk.Parameters
File content as bytes.
Name of the file. Used for MIME type detection and display.
MIME type (e.g.
"application/pdf"). Auto-detected from filename if not provided.If
True, persist extracted knowledge.If
True, poll until processing completes.Seconds between status polls.
Maximum seconds to wait.
get_upload_status()
Check the processing status of a file upload.Parameters
The upload ID returned by
upload_file() or upload_bytes().Supported file types
| Format | Extension | Notes |
|---|---|---|
.pdf | Text extraction + OCR for scanned pages | |
| CSV | .csv | Rows parsed as structured records |
| Text | .txt | Plain text, inserted as-is |
| Markdown | .md | Parsed with section awareness |
What happens during upload
- File is uploaded via multipart POST to the upload endpoint
- Vrin detects the file type and extracts text content
- Content is chunked, facts are extracted, and everything is indexed
- The upload status transitions:
processing->completed(orfailed)