OCR for scanned pages and images
How image-only pages and image uploads are read on your servers, and why that channel blocks on detection instead of rewriting the image.
What is routed to OCR
With the OCR service enabled, three kinds of input are read by OCR: an image upload (PNG or JPEG), a PDF with no text layer, and the scanned pages of a mixed PDF. A page counts as scanned when an image covers at least half of it, or when it has an image and no text. The text pages of a mixed PDF are processed from their text layer as usual.
How a page is read
Pages are rasterised at 200 dpi and sent to the OCR engine, a vision-language OCR model served by a pinned engine image, on GPU by default with a CPU variant available. The recognised text is treated exactly like typed text: it goes through the rules, the entity model, the normaliser and the verifier, and the spans come back with their page number.
Guards reject a page whose output looks unreliable: too many tokens, a long run of repeated characters, an interrupted stream. A flagged page fails the whole request with 422 rather than returning a partial result.
Block on detect
The OCR channel does not produce a redacted file. Rewriting pixels is not a faithful protection of a scanned document, so instead the response carries the spans and the protected text, and stats.warnings states how many pages were read and by which engine. Your application uses the span list to decide: hold the file for review, send the protected text instead of the image, or refuse.
Limits
Per request: 20 pages, 60 seconds per page, 2,500 recognised tokens per page, 32 MiB per file. The gateway’s timeout and the request body limit are raised by the chart when OCR is enabled.
With OCR off
An image or an image-only PDF is refused with 422 and a message saying that there is no extractable text layer and OCR is not enabled. A mixed PDF is processed from its text layer only. Enabling OCR is a chart setting; see Configuration.
All example values in this documentation are synthetic.