The upload endpoint allows you to send files directly to Reducto without relying on external storage like S3 or public URLs. Once uploaded, you’ll receive a unique reducto:// URL (file_id) that can be used with the /parse, /split, or /extract endpoints.

When to use the upload endpoint

  • You have a file on disk or in memory (e.g., from a user upload).
  • You don’t want to manage file hosting, cloud storage, or storage cleanup.
  • You need a secure, private way to upload files without making them public.

Key Features

  • Upload supports many file types like CSV, PDF, XLSX, PPT, DOC, and much more.
  • There is a maximum 100MB limit for direct uploads. If your file is bigger, try the presigned upload method.

Example

from pathlib import Path
from reducto import Reducto

client = Reducto()
upload = client.upload(file=Path("sample.pdf"))
result = client.parse.run(document_url=upload)

print(result)