Skip to main content

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), optional extension hint (e.g. pdf, docx).
    • Outputs: file_id and reducto_url.
  • REDUCTO_PARSE
    • Parse a document to extract text, tables, and figures with layout-aware chunking.
    • Inputs: document_url (public URL, presigned S3 URL, or reducto:// URL), plus options such as chunk_mode (variable, section, page, disabled, block, page_sections; default disabled), chunk_size (250–1500 characters), table_output_format (html, json, md, jsonbbox, dynamic, csv; default dynamic), 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"), and document_password for encrypted files.
    • Outputs: job_id, num_pages, and an array of chunks with 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), optional system_prompt, array_extract (repeating data such as invoice line items), include_images, optimize_for_latency, and citations_enabled.
    • Outputs: extracted_data, plus job_id, num_pages, and num_fields.
  • REDUCTO_SPLIT
    • Split a document into sections using natural language category descriptions.
    • Inputs: document_url, split_description (JSON array of {"name": ..., "description": ...} categories), optional split_rules (natural language splitting rules), and table_cutoff (truncate / preserve for tables at page boundaries).
    • Outputs: num_pages and splits (each with name, pages, and confidence).

Authentication

All Reducto tools require a Reducto API key, set in each step’s config as api_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_url accepts public URLs, presigned S3 URLs, and reducto:// URLs. Use REDUCTO_UPLOAD first when the file is not directly reachable by Reducto, then pass the returned reducto_url to the other tools.
  • REDUCTO_PARSE defaults: chunking is disabled, table format is dynamic, OCR system is standard (multilingual; legacy supports Germanic languages only), and extraction mode is hybrid (OCR combined with native text).
  • page_range is 1-indexed and accepts ranges and comma-separated lists (e.g. "1-3,7-9").
  • schema (REDUCTO_EXTRACT) and split_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.