Control
Image and document reading (OCR)
OCR reads the text in images and scanned documents inside your organization. Images and document files do not go to an external service. The text is masked first, and the model receives only masked text.
How it works
You turn OCR on for each project. In a project with OCR on, the flow is:
1. BaseLLM reads the image on the server. 2. BaseLLM corrects Turkish letter errors in the text. 3. Personal data protection masks the text. 4. Prompt injection protection scans the text and records the result. 5. The model receives only the masked text.
If OCR cannot extract text, the request does not go to the model. The application receives a clear error code.
Turn on OCR
1. Open the Personal data section in the project settings. 2. Turn on personal data protection and select a masking mode. Report mode is not sufficient for OCR. 3. Turn on name detection and select the name model. 4. Turn on OCR on the OCR card.
If a condition is missing, the card shows it under Needed for OCR.
| Warning on the card | Action |
|---|---|
| OCR is not included in your license | Update to a license that includes the OCR feature |
| The OCR models are not installed | The system administrator must add the models to the installation image |
| Personal data masking is not included in your license | Update your license |
| Turn on personal data masking | Turn on personal data protection |
| Personal data mode must not be report | Select a masking mode |
| Turn on name detection and choose the name model | Turn on name detection and select the name model |
| The name model is not installed | The system administrator must add the name model to the installation image |
Supported places
| Place | Content that is read |
|---|---|
| Knowledge Catalog | PNG, JPG, WebP, scanned PDF, and images in PDF and Word files |
| /api/v1/chat/completions, /api/v1/responses | Images in the request |
| /api/v1/messages | Images, PDF documents and images in tool results |
| /api/v1/messages/count_tokens | The same content; the count uses the masked text |
The Knowledge Catalog accepts files of up to 20 MB. One document can have at most 300 pages or images to read.
Send the image as base64 in the request. In a project with OCR on, images given as a link or a file ID are rejected. If the same image comes again within 10 minutes, the result comes from the cache.
Relation to the Images setting
| OCR | Images | Result |
|---|---|---|
| On | On or off | The image is read and the model receives masked text. The image does not go to the model |
| Off | On | The image goes to the model as it is, and its content is not scanned |
| Off | Off | A request with an image is rejected |
Error codes
| Error code | HTTP | Meaning |
|---|---|---|
| ocr_not_ready | 503 | OCR is on but a condition is missing. Check the personal data settings and the OCR card |
| ocr_source_not_supported | 400 | The image came as a link or a file ID. Send base64 |
| ocr_no_text | 422 | No text was found in the image |
| ocr_failed | 422 | The file could not be read. Make sure that the file is not damaged |
| ocr_too_many_pages | 422 | The document has more than 300 pages or images |
| ocr_busy | 429 | The queue is full. Send the request again after a short time |
| ocr_unavailable | 503 | OCR is not working now. Tell your system administrator |
License and installation
OCR is a separate license feature. It is on in enterprise and trial licenses and off in individual licenses. OCR does not need a graphics card; it runs on the CPU. Memory and process settings are in the installation document.