parse.run() method converts documents into structured JSON with text, tables, figures, layout, and formatting. r-1 is currently in preview and is the default for new Studio pipelines. SDK requests use legacy Parse unless settings.model is "r-1" (requires reductoai>=0.23.0). Parse returns content organized into chunks for LLM and RAG workflows.
Existing pipelines can continue using legacy Parse or choose to migrate. Review Parse r-1 and r-1 configuration compatibility before moving an existing configuration.
Basic Usage
Method Signature
Parameters
Input Options
Theinput parameter accepts several formats:
Configuration Examples
Select the Parse Model
Setsettings.model to "r-1" to use r-1. Set "legacy" to pin the previous pipeline. A request that omits settings.model runs legacy Parse. See r-1 configuration compatibility before you change an existing configuration.
Chunking
By default, Parse returns the entire document as one chunk. For RAG applications, use variable chunking:Table Output Format
Control how tables appear in the output:Augment r-1 with Customized Agentic Processing
Legacy Parse supports promptless agentic scopes as general-purpose accuracy enhancements. r-1 handles those improvements natively. With r-1, add agentic processing when you need a custom prompt for a specific scope. Agentic processing adds latency.Figure Descriptions
r-1 generates short figure descriptions as part of its full-page pass. You do not need to setsummarize_figures. For legacy Parse, enable the separate figure-summary model with:
Page Range
Process only specific pages:Filter Blocks
Remove specific content types from output:Return Images
Get image URLs for figures and tables:Response Structure
TheParseResponse object contains:
Chunks
Each chunk contains:content(str): Full text content formatted as Markdownembed(str): Content optimized for embeddingsblocks(list[Block]): Individual elements with positions
Blocks
Each block contains:type(str): Element type (Title,Header,Text,Table,Figure, etc.)content(str): The block’s contentbbox(BoundingBox): Position on the page (normalized 0-1 coordinates)confidence(str): Confidence level ("high"or"low")
URL Results
For large documents, the response may return a URL instead of inline content:Advanced Features
Raw Response Access
Access raw HTTP response data:Streaming Response
Stream large responses:Per-Request Options
Override client settings for this request:Error Handling
Complete Example
Best Practices
Use Variable Chunking for RAG
Enable
chunk_mode: "variable" for RAG pipelines to get semantically meaningful chunks.Customize Agentic Processing
Add a scoped custom prompt when your workflow needs use-case-specific parsing instructions. r-1 handles scanned documents natively.
Filter Headers/Footers
Use
filter_blocks to remove headers and footers that pollute search results.Handle URL Results
Always check
result.type and handle URL results for large documents.Next Steps
- Learn about extracting specific fields from parsed documents
- Learn how Parse r-1 handles documents and customized agentic processing
- Explore response format details for complete structure
- Check out best practices for optimization
- See the async client for concurrent processing