OCR is the step that turns a photo of a receipt into text a program can search, store or check.
How it works
A classic OCR engine finds text regions on the page, splits them into lines, and recognises the characters in each line. Tesseract, the best-known open-source engine, added an LSTM neural network in version 4 that recognises whole lines, and it can “recognize more than 100 languages” out of the box. Output comes as plain text, hOCR (HTML), PDF, invisible-text PDF, TSV, ALTO or PAGE, so you also get word positions.
Classic OCR stops at characters. To know which number is the total or which line is the supplier name, you add rules or a second model.
Vision-language models take another route. Hugging Face’s image-text-to-text task page describes document question answering as “an OCR-free approach”: the document image goes straight to a vision-language model, which reads it and answers. You can ask for fields directly and get them back as structured output.
| Classic OCR (e.g. Tesseract) | Vision LLM | |
|---|---|---|
| Output | characters plus positions | answers, summaries or JSON fields |
| Layout understanding | limited, needs rules | reads tables and labels in context |
| Runs | locally, no per-call fee | usually an API, billed per token |
| Risk | misread characters | misread characters and invented values |
Why it matters
- Cost. An image sent to an LLM API is billed as input tokens. Local OCR has no per-call charge but needs servers and upkeep.
- Accuracy checks. A vision model can return a plausible total that is not on the page. Ask it to quote the source text and check sums in code.
- Arabic. Right-to-left text, joined letter forms and a mix of Arabic and Latin digits all add difficulty. Test any engine or model on your own scans.
On BroadNet Inference
BroadNet does not document a separate OCR endpoint. Its docs show reading an invoice by sending the image as a data: URL to a chat model whose model row lists images or vision, such as DeepSeek V4.1 Flash, BroadNet Gemma 4 VL 26B or Qwen3.8 27B. On a pay-as-you-go key the image counts as input tokens at the model’s input price ($0.10 per 1M on Gemma), and larger images use more tokens. Walk through it in the Arabic invoice guide, and see Arabic OCR with vision LLMs for when classic OCR is still the better tool.