Skip to main content

What is Reducto?

Reducto is a document parsing platform that extracts structured data from PDFs, images, Word documents, spreadsheets, and presentations. It converts complex documents into clean markdown with bounding boxes, tables, figures, and metadata—making it easy to feed document content into LLMs for analysis, summarization, and question-answering. By combining Reducto’s parsing capabilities with Cerebras’s ultra-fast inference, you can build powerful document processing pipelines that analyze thousands of documents in seconds. Learn more at Reducto.

Prerequisites

Before you begin, ensure you have:
  • Cerebras API Key - Get a free API key here
  • Reducto Account - Visit Reducto and create an account to get your API key
  • Python 3.7 or higher
  • Documents to parse - PDFs, images, Word docs, or other supported formats

Configure Reducto with Cerebras

1

Install required dependencies

Install the Reducto SDK and OpenAI client for Cerebras:
2

Configure environment variables

Create a .env file in your project directory with your API keys. This keeps your credentials secure and separate from your code.
You can find your Reducto API key in your Reducto dashboard under Settings.
3

Parse a document with Reducto

Use Reducto to extract structured content from your document. Reducto converts complex documents into clean markdown, preserving tables, figures, and document structure.
The parsed_content variable now contains clean markdown with all text, tables, and figures extracted from your document.
4

Analyze parsed content with Cerebras

Now that you have structured content from Reducto, use Cerebras to analyze it. Cerebras’s fast inference means you can process hundreds of documents per minute.
Python
5

Extract structured information

You can also use Cerebras to extract specific information from parsed documents. This example extracts key financial metrics using JSON mode for structured output.
Python

Complete Example: Document Q&A Pipeline

Here’s a complete example that combines Reducto’s parsing with Cerebras’s inference to create a document question-answering system:

Advanced Features

Process Multiple Documents

Process multiple documents in parallel using Reducto’s batch API and Cerebras’s fast inference. This approach is ideal for analyzing large document collections:

Use Reducto Studio Pipelines

Reducto Studio lets you configure parsing pipelines visually and deploy them for API access. Once you’ve created a pipeline in Reducto Studio, you can use it programmatically:

Async Processing with Webhooks

For large document batches, use Reducto’s webhook support for async processing. This pairs well with Cerebras’s fast inference for real-time analysis:

Troubleshooting

Check file format: Reducto supports 30+ formats including PDF, DOCX, XLSX, PPTX, and images. Ensure your file isn’t corrupted.File size limits: Large files may need to be split or compressed. Check Reducto’s rate limits for current limits.API key issues: Verify your Reducto API key is correct and has sufficient credits in your dashboard.
Use batch processing: Process multiple documents in parallel using ThreadPoolExecutor to maximize throughput.Optimize prompts: Shorter, more focused prompts reduce token usage and latency. Be specific about what information you need.Choose the right model: Use cerebras/gpt-oss-120b for simple tasks like classification, cerebras/gpt-oss-120b for complex analysis and extraction.
Split large documents: If parsed content exceeds token limits, split the document into sections and process separately.Increase max_tokens: Adjust the max_tokens parameter for longer responses, but be mindful of costs.Use summarization: Summarize sections before detailed analysis to reduce token usage.Check context windows: See our models documentation for context window sizes of each model.
Reducto limits: Check your Reducto plan limits and upgrade if needed.Cerebras limits: See our rate limits documentation for current limits and how to request increases.Implement retry logic: Add exponential backoff for production applications to handle temporary rate limits gracefully.
Improve prompts: Be specific about the format and structure you want. Use examples in your prompts.Use JSON mode: Enable response_format={"type": "json_object"} for structured data extraction.Configure Reducto parsing: Adjust Reducto’s parsing configuration to better preserve document structure. See Parse Configurations.Try different models: cerebras/gpt-oss-120b and cerebras/zai-glm-4.7 offer different strengths for extraction tasks.

Next Steps

Reducto Documentation

Learn about advanced parsing configurations and features

Cerebras Models

Explore different Cerebras models for various document analysis tasks

Build a RAG System

Combine Reducto, Cerebras, and vector databases for RAG

Reducto Studio

Configure visual pipelines for document processing
For production deployments, consider using Reducto’s webhook support for async processing of large document batches. This pairs well with Cerebras’s fast inference for real-time analysis. See Async Processing & Webhooks for details.