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

# Parse With OCR

> Parse the full content from your documents into markdown format.

## Overview

Using `AnyParser`, you can parse the full content from your documents into markdown.
The `Parse with OCR` model refines parsing results by applying OCR detection and correction techniques.

## Setup

Refer to the [Quickstart guide](/quickstart/#setup) to install the AnyParser SDK and get your api key.

Next, set up your `AnyParser` sync or async client.

```python anyparser_async.py theme={null}
from any_parser import AnyParser

ap = AnyParser(api_key="...")
# start the parsing request
file_id = ap.async_parse_with_ocr(file_path="/path/to/your/file")
# fetch results (5s polling up to 60s)
markdown_string = ap.async_fetch(file_id, sync=True, sync_timeout=60, sync_interval=5)
```

## Output

A string containing the markdown representation of the given file.

## Full Notebook Examples

Check out these notebooks for more detailed examples of using AnyParser BASE and PRO models:

* [AnyParser Async API](https://github.com/CambioML/any-parser/blob/main/examples/async_parse_with_ocr.ipynb): Parse longer documents (which may take longer than 30 seconds).

<CardGroup cols={1}>
  <Card title="AnyParser Async Parse Example" icon="rotate" href="https://github.com/CambioML/any-parser/blob/main/examples/async_parse_with_ocr.ipynb">
    Extracting content from a table of contents.
  </Card>
</CardGroup>
