services / ocr
textoperational · 914 ms
OCR — Image to Text
Extract text from images using Tesseract OCR. Send image as image_base64 (PNG/JPEG/WebP/TIFF/BMP, max 10 MB decoded). Returns text and confidence (0-100, where 80+ is reliable). Set language to Tesseract code: 'eng' (default), 'deu' (German), 'fra' (French), 'chi_sim' (Chinese Simplified), 'jpn' (Japanese), 'ara' (Arabic). Use for invoices, receipts, scanned documents, or screenshots with text.
Run free trial ↗1 free call per day with the example input. Paid: $0.008 USDC, no limit.
Call it
Input
| Field | Type | Description |
|---|---|---|
| image_base64 * | string | Base64-encoded image. Supported formats: PNG, JPEG, WebP, TIFF, BMP. Max 10 MB decoded. For best results use high-contrast images with clear text. |
| language | string = "eng" | Tesseract language code. Default: 'eng' (English). Other supported: 'deu' (German), 'fra' (French), 'spa' (Spanish), 'ita' (Italian), 'por' (Portuguese), 'rus' (Russian), 'chi_sim' (Chinese Simplified), 'jpn' (Japanese), 'ara' (Arabic), 'kor' (Korean), 'nld' (Dutch), 'pol' (Polish). Use '+' to combine: 'eng+deu'. |
| psm | integer = 3 | Page Segmentation Mode. 3 = fully automatic (default, best for most images). 6 = single uniform block of text. 7 = single text line. 11 = sparse text (find text anywhere). 13 = raw line (no line ordering). Use 6 or 7 for forms/labels. |
Output
| Field | Type | Description |
|---|---|---|
| text | string | Full extracted text from the image, with line breaks preserved |
| confidence | number | Overall OCR confidence score (0-100). Above 70 is considered reliable. |
| language | string | Language code used for recognition |
| word_count | integer | Number of words extracted |
| char_count | integer | Number of characters extracted (excluding whitespace) |
| processing_ms | integer | Time taken for OCR processing in milliseconds |
| processed_at | string | ISO 8601 timestamp |
Example response (data)
{
"text": "Invoice #12345\nDate: April 10, 2026\n\nBill To:\nJohn Smith\n123 Main Street\n\nTotal Due: $1,250.00",
"confidence": 94,
"language": "eng",
"word_count": 18,
"char_count": 72,
"processing_ms": 1840,
"processed_at": "2026-04-10T14:00:00.000Z"
}