This is useful if direct uploads exceed the maximum 100MB limit.

1

Request a presigned URL

Request a presigned URL from the /upload endpoint.

2

Upload the file using the presigned URL

Upload the file using the presigned URL using a PUT request.

3

Parse the file

Parse the file using the /parse endpoint. Pass the file_id from the response in first step.

import requests

upload_form = requests.post("https://platform.reducto.ai/upload",
                            headers={"Authorization": "Bearer <auth token>"}).json()

requests.put(upload_form["presigned_url"], data=open("./local.pdf", "rb"))

response = requests.post("https://platform.reducto.ai/parse",
                         json={"document_url": upload_form["file_id"]},
                         headers={"Authorization": "Bearer <auth token>"})