The fastest way to use Reducto is to upload a document → parse it → get structured output. We’ll show you how with our Python and Node.js SDKs, then link you to more advanced options.
Need help finding your API Key? Find them in your Studio account under “API Keys”.
Prepare a document (PDF, DOCX, image, XLSX, etc) to test with, or download a sample PDF from a demo pipeline at this link.

Method 1: use the Reducto SDKs

1

Install the SDK

pip install reductoai
2

Parse a Document

If no configuration is provided, the Parse endpoint runs with the default settings. In most cases, this will work as is. For complex documents, refer to our best practices guide.
from pathlib import Path
from reducto import Reducto

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

print(result)
3

Add custom configurations

Reducto’s APIs offer a wide range of configurations that customize for your use case. Check out our API Reference or the Configurations section for more.
from pathlib import Path
from reducto import Reducto

client = Reducto(api_key='REDUCTO_API_KEY')
upload = client.upload(file=Path("sample.pdf"))
result = client.parse.run(
  document_url=upload,
  options={ # Sample configurations
    "ocr_mode": "agentic",
    "extraction_mode": "ocr",
    "chunking": {
        "chunk_mode": "variable",
    }
  },
  advanced_options={
    "ocr_system": "multilingual",
    "page_range": {
        "start": 1,
        "end": 10,
    },
    "table_output_format": "ai_json",
    "merge_tables": True,
  },
  experimental_options={
    "enable_checkboxes": True,
    "return_figure_images": False,
    "rotate_pages": True,
  }
)
print(result)
You’ve parsed your first document! You can now access all text, tables, and metadata in result. Learn to understand the result JSON format in the response format guide.

Method 2: use the REST API endpoint

No SDK? Use cURL, Python requests, or fetch. All endpoints have an API playground you can explore and use to get sample code.
import requests

url = "https://platform.reducto.ai/parse"

payload = {
    "options": {
      "ocr_mode": "agentic",
    },
    "advanced_options": {
      "page_range": {
        "start": 1,
        "end": 10,
      },
    },
    "priority": True
}
headers = {
    "Authorization": "Bearer REDUCTO_API_KEY",
    "Content-Type": "application/json"
}

response = requests.request("POST", url, json=payload, headers=headers)

print(response.text)

Next steps

  • Experiment with documents in Studio to test out different configurations.
  • Build end-to-end pipelines with Upload → Parse → Extract.