What it does
The OCR API reads text from scanned documents and images. Send the file as file_base64 with its file_name, and get back the extracted text and the number of pages.
It handles photos and scans as well as clean images. In our tests it read rotated, blurred and low-quality JPG images correctly. Supported files are PDF, PNG, JPG, TIFF, WEBP, BMP and GIF, up to 20 MB. Each request can contain up to 2 pages, so split longer PDFs and send the parts separately. An image with no text returns an empty text field.
The response is plain text with line breaks kept, ready for search, classification or storage.
Teams use the OCR API to digitize scanned records and read text from uploaded photos and screenshots. It also feeds document pipelines that need text first.
To translate the text, use the Text Translation API. To remove names and phone numbers before you store it, use the Text Anonymization API.