Skip to main content

Sync Usage

The simplest way to run OCR — call get_text for plain text or process_file for detailed results.

get_text

Returns the extracted text as a string.

process_file

Returns an OCRResult object with text, confidence, page count, blocks, and processing time.

Async Usage

Every sync method has an async counterpart with the _async suffix. The framework is async-first — sync methods are convenience wrappers.

get_text_async

process_file_async

Supported Formats

Both sync and async methods accept the following file formats: .png, .jpg, .jpeg, .bmp, .tiff, .tif, .gif, .webp, .pdf

Timeout

If you set layer_1_timeout when creating the orchestrator, the engine will raise OCRTimeoutError when the per-page processing time is exceeded. See Timeout for configuration and error handling details.