Skip to main content
POST
/
upload
Upload
curl --request POST \
  --url https://api.example.com/upload \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "save_to_memory": "<string>"
}
'
{
  "success": true,
  "upload_id": "upload_abc123",
  "filename": "report.pdf",
  "status": "processing",
  "message": "File uploaded and queued for processing"
}
Upload a file to Vrin for automatic text extraction, chunking, and fact extraction. Accepts multipart form data.
Authorization
string
required
Bearer token. Example: Bearer vrin_abc123
file
file
required
The file to upload (multipart form field).
save_to_memory
string
default:"true"
If "true", persist extracted knowledge to the knowledge base. Sent as a form field.
{
  "success": true,
  "upload_id": "upload_abc123",
  "filename": "report.pdf",
  "status": "processing",
  "message": "File uploaded and queued for processing"
}

Check upload status

GET /upload/{upload_id}/status
{
  "upload_id": "upload_abc123",
  "status": "completed",
  "filename": "report.pdf",
  "facts_extracted": 24,
  "chunks_created": 8
}

Upload status values

StatusDescription
processingFile is being processed
completedProcessing finished successfully
doneAlias for completed
failedProcessing failed

Supported file types

FormatMIME Type
PDFapplication/pdf
CSVtext/csv
Texttext/plain
Markdowntext/markdown

cURL example

curl -X POST https://cg7yind3j5.execute-api.us-east-1.amazonaws.com/dev/upload \
  -H "Authorization: Bearer vrin_abc123" \
  -F "file=@report.pdf" \
  -F "save_to_memory=true"

SDK usage

# Upload from file path
result = client.upload_file("report.pdf")

# Upload raw bytes
result = client.upload_bytes(pdf_bytes, "report.pdf")