Extract
Extraction Overview
Understanding Reducto’s Extract endpoint
Extract is used to pull out specific data you want isolated within your documents, returned in a JSON format. If you want to extract different fields from the same document, check out our pipelining documentation. If your document is a combination of many subsections, check out our splitting endpoint.
Example Use cases
- Extracting important numbers and statistics on a patient lab report.
- Extracting the rows and line items inside of an invoice.
- Extracting key clauses and prices inside of a contract.
Key Features
Under the hood, an extract call first performs a /parse and then extracts your specified fields.
schema
: A JSON schema that details the specific fields and structure of your output.system_prompt
: An overall system prompt, that helps our models understand your document structure better.- Special Configurations:
array_extract
andgenerate_citations
Read our best practices guide for how best to structure and configure your extract calls.
Debugging FAQ
Example
Let’s say you’re looking to extract all the financial accounts under a customer off of a statement. You can see the output in our playground example, but your schema and code might look like this: