Documentation Index
Fetch the complete documentation index at: https://mintlify.com/reductoai/reducto-python-sdk/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Reducto SDK supports multiple ways to upload files for processing. You can pass files as bytes, PathLike objects, or as tuples with custom filenames and media types.Upload Methods
Request parameters that correspond to file uploads can be passed in three formats:1. PathLike Objects
The most common method is to use aPathLike object from Python’s pathlib:
2. Bytes
You can also pass file contents directly as bytes:3. Tuple Format
For more control, use a tuple of(filename, contents, media_type):
Async File Uploads
The async client uses the exact same interface. If you pass aPathLike instance, the file contents will be read asynchronously automatically:
Using with Parse
Here’s a complete example of uploading and parsing a document:All three upload methods work with both synchronous and asynchronous clients.