Overview
The Reducto tools let you process documents (PDFs, images, spreadsheets, and other formats) using the Reducto API. Reducto provides OCR, layout detection, table extraction, and content chunking optimized for RAG applications, so you can turn unstructured documents into text, structured JSON, or logical sections inside your flows.Key Features
REDUCTO_UPLOAD- Upload a file to Reducto and get back a
reducto://URL for use with the other Reducto tools. - Inputs:
file_url(publicly accessible or presigned URL), optionalextensionhint (e.g.pdf,docx). - Outputs:
file_idandreducto_url.
- Upload a file to Reducto and get back a
REDUCTO_PARSE- Parse a document to extract text, tables, and figures with layout-aware chunking.
- Inputs:
document_url(public URL, presigned S3 URL, orreducto://URL), plus options such aschunk_mode(variable,section,page,disabled,block,page_sections; defaultdisabled),chunk_size(250–1500 characters),table_output_format(html,json,md,jsonbbox,dynamic,csv; defaultdynamic),add_page_markers,merge_tables,ocr_system(standard/legacy),extraction_mode(ocr/hybrid),page_range(e.g."1-5","1,3,5","1-3,7-9"), anddocument_passwordfor encrypted files. - Outputs:
job_id,num_pages, and an array ofchunkswith their content blocks.
REDUCTO_EXTRACT- Extract specific fields from a document into structured JSON using a user-defined JSON Schema. Ideal for invoices, forms, and contracts.
- Inputs:
document_url,schema(JSON Schema string), optionalsystem_prompt,array_extract(repeating data such as invoice line items),include_images,optimize_for_latency, andcitations_enabled. - Outputs:
extracted_data, plusjob_id,num_pages, andnum_fields.
REDUCTO_SPLIT- Split a document into sections using natural language category descriptions.
- Inputs:
document_url,split_description(JSON array of{"name": ..., "description": ...}categories), optionalsplit_rules(natural language splitting rules), andtable_cutoff(truncate/preservefor tables at page boundaries). - Outputs:
num_pagesandsplits(each withname,pages, andconfidence).
Authentication
All Reducto tools require a Reducto API key, set in each step’s config asapi_key. Store the key as a secret (e.g. REDUCTO_API_KEY) and reference it with {{secrets.REDUCTO_API_KEY}}.
Note: Treat API keys as sensitive information and never commit them to public repositories.
Example: Parse a PDF and Summarize It
Example: Extract Structured Data from an Invoice
Notes
document_urlaccepts public URLs, presigned S3 URLs, andreducto://URLs. UseREDUCTO_UPLOADfirst when the file is not directly reachable by Reducto, then pass the returnedreducto_urlto the other tools.REDUCTO_PARSEdefaults: chunking isdisabled, table format isdynamic, OCR system isstandard(multilingual;legacysupports Germanic languages only), and extraction mode ishybrid(OCR combined with native text).page_rangeis 1-indexed and accepts ranges and comma-separated lists (e.g."1-3,7-9").schema(REDUCTO_EXTRACT) andsplit_description(REDUCTO_SPLIT) must be valid JSON strings; the step fails with an error if they cannot be parsed.- On API errors the tools return an error object with the HTTP status and the raw response, which you can inspect in the run log.