Skip to main content
The Reducto Python SDK provides a type-safe interface to the Reducto API. It handles authentication, request formatting, and response parsing automatically.

Quick Start


Key Features

Type Safety

Full type hints and IDE autocomplete for all methods and responses using Pydantic models.

Simple API

Intuitive method names that match the REST API endpoints.

Error Handling

Clear exception hierarchy with helpful error messages and status codes.

Async Support

Both synchronous and asynchronous clients with the same interface.

Advanced Features

Raw responses, streaming, custom HTTP clients, and per-request options.

Automatic Retries

Built-in retry logic with exponential backoff for transient errors.

Installation

Requires Python 3.9+. Upgrade with pip install --upgrade reductoai.

Authentication

Set your API key as an environment variable:
The SDK reads it automatically:
Or pass it explicitly:
Get your API key from Reducto Studio → API Keys.

Core Methods

The SDK provides methods for all Reducto endpoints:

Upload

Upload documents to Reducto’s servers before processing:

Upload Documentation

File upload options, size limits, and presigned URLs.

Parse

Convert documents into structured JSON with text, tables, and figures:

Parse Documentation

Parse configuration, chunking options, and response structure.

Extract

Pull specific fields from documents using JSON schemas:

Extract Documentation

Schema design, array extraction, and citations.

Split

Divide documents into sections based on content type:

Split Documentation

Split configuration and section types.

Edit

Fill PDF forms and modify DOCX documents:

Edit Documentation

Form schemas and document modification.

Pipeline

Run pre-configured workflows from Reducto Studio:

Pipeline Documentation

Running studio-configured pipelines.

Async Client

The SDK provides an async client with the same interface:

Async Client Guide

Concurrent processing, rate limiting, and batch operations.

Response Types

All SDK methods return strongly-typed response objects. The SDK uses Pydantic models for validation and type safety:

Error Handling

The SDK raises specific exceptions for different error conditions:

Error Handling Guide

Complete error handling reference with all exception types.

Advanced Features

Raw Response Access

Access raw HTTP response data including headers:

Streaming Responses

Stream large responses without loading everything into memory:

Per-Request Options

Override client settings for individual requests:

Custom HTTP Client

Configure the underlying HTTP client:

Next Steps

1

Get your API key

Create an API key in Reducto Studio and set it as REDUCTO_API_KEY.
2

Try the quickstart

Run your first parse operation with the quickstart example.
3

Explore the methods

Check out the core methods documentation for detailed usage.