upload_file()
Upload a file from disk. Vrin accepts PDFs, CSVs, text files, and other common document formats.Parameters
string | Path
required
Path to the file to upload. Accepts strings or
pathlib.Path objects.bool
default:"True"
If
True, persist extracted knowledge to the knowledge base. If False, the file is processed but facts are not stored permanently.bool
default:"True"
If
True, poll until processing completes.float
default:"3.0"
Seconds between status polls when
wait=True.float
default:"120.0"
Maximum seconds to wait when
wait=True.Example
upload_bytes()
Upload raw bytes directly without a file on disk.Parameters
bytes
required
File content as bytes.
string
required
Name of the file. Used for MIME type detection and display.
string
MIME type (e.g.
"application/pdf"). Auto-detected from filename if not provided.bool
default:"True"
If
True, persist extracted knowledge.bool
default:"True"
If
True, poll until processing completes.float
default:"3.0"
Seconds between status polls.
float
default:"120.0"
Maximum seconds to wait.
get_upload_status()
Check the processing status of a file upload.Parameters
string
required
The upload ID returned by
upload_file() or upload_bytes().Supported file types
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)