> ## Documentation Index
> Fetch the complete documentation index at: https://developer.opus.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Opus Text Extraction

> Extract text from documents and images so your workflow can process them.

The Opus Text Extraction task uses OCR (Optical Character Recognition) to pull text out of documents and images. Feed it a PDF, PNG, or JPEG, and it returns the text content—ready for processing by Opus Agent, Custom Agent, or other tasks in your workflow.

## Key Capabilities

<CardGroup cols={2}>
  <Card title="OCR Processing" icon="scanner">
    Extract text from scanned documents and images.
  </Card>

  <Card title="Multiple Formats" icon="file-image">
    Works with PDF, PNG, JPEG, and JPG files.
  </Card>

  <Card title="Page-by-Page Output" icon="files">
    For multi-page documents, get text from each page separately.
  </Card>

  <Card title="Ready for AI" icon="robot">
    Output flows directly to AI tasks for analysis.
  </Card>
</CardGroup>

## When to Use It

Use Opus Text Extraction when you need to convert documents or images into text your workflow can process:

* Pull text from scanned invoices or receipts
* Extract text from screenshots or photos
* Convert PDFs into text for AI analysis
* Digitize paper documents for processing

<Note>
  Opus Text Extraction outputs raw text. To extract specific fields (like amounts from invoices), follow it with an Opus Agent task to parse and structure the text.
</Note>

## Supported File Types

| Format   | Extensions      |
| -------- | --------------- |
| **PDF**  | `.pdf`          |
| **PNG**  | `.png`          |
| **JPEG** | `.jpeg`, `.jpg` |

<Warning>
  Only PDF, PNG, JPEG, and JPG formats are supported. Other file types will cause the task to fail. The maximum file size is **10 MB**.
</Warning>

## Input

The **File** input accepts the document to extract text from. Only File (single) type is supported; multiple files are not currently supported.

## Synchronous Extraction

The **Synchronous Extraction** toggle (off by default) controls how the extraction is processed:

* **Off (Asynchronous):** Supports multi-page PDFs. The extraction runs in the background and retrieves results when complete. Use this for documents with multiple pages or when processing larger files.

* **On (Synchronous):** Returns results immediately in real-time. However, this mode only supports single-page documents. If you pass a multi-page PDF with synchronous extraction enabled, the extraction will fail.

For documents with varying page counts, keep synchronous extraction off to ensure reliable processing.

## How to Add Opus Text Extraction

<Steps>
  <Step title="Drop it into your workflow">
    Drag an Opus Text Extraction task into your workflow where you need to convert documents to text.
  </Step>

  <Step title="Connect the input file">
    Link the file input to a source—like a Workflow Input, Import Data task, or another task's file output.
  </Step>

  <Step title="Name the output">
    Give the extracted text output a meaningful name so you can reference it in later tasks.
  </Step>

  <Step title="Connect to downstream tasks">
    Wire the text output to tasks that will process the content—like Opus Agent or Custom Agent.
  </Step>

  <Step title="Test it">
    Run a preview with a sample document to verify the extraction works correctly.
  </Step>
</Steps>

<Tip>
  For multi-page PDFs, the output is a list where each item contains the text from one page. This makes it easier to process documents page by page.
</Tip>

## Tips for Better Results

<AccordionGroup>
  <Accordion title="Use high-quality source documents">
    OCR accuracy depends on input quality:

    * Use high-resolution scans (300 DPI or higher)
    * Make sure documents are properly aligned
    * Avoid blurry or distorted images
    * Ensure good contrast between text and background
  </Accordion>

  <Accordion title="Validate extracted text">
    OCR isn't perfect—plan for errors:

    * Use Agentic Review to check extraction quality
    * Add Human Review for critical documents
    * Handle low-confidence extractions appropriately
  </Accordion>

  <Accordion title="Structure text with downstream agents">
    Opus Text Extraction outputs raw text:

    * Use Opus Agent to parse into structured fields
    * Use Custom Agent to extract specific data points
    * Validate structure before further processing
  </Accordion>
</AccordionGroup>

## Related

<CardGroup cols={2}>
  <Card title="Opus Agent" icon="robot" href="/tasks/agent/opus-agent">
    Process extracted text with AI reasoning.
  </Card>

  <Card title="Custom Agent" icon="sliders" href="/tasks/agent/custom-agent">
    Parse extracted text into structured data.
  </Card>

  <Card title="Import Data" icon="file-import" href="/tasks/data/import-data">
    Pull documents from connected services.
  </Card>

  <Card title="Review Task" icon="magnifying-glass" href="/tasks/review">
    Validate extraction quality with human or AI review.
  </Card>
</CardGroup>
