Tools,

A free image to text API, tested

84.6%

of 7,083 words read in order by rapidocr_api

Start it in 3 commands

rapidocr_api led the 3 free servers

Words found in reading order
Server All Scans Photos Screens Sideways
rapidocr_api 84.6% 97.3% 97.4% 100% 49.4%
docTR API, fast_base 75.7% 95.4% 58.8% 97.6% 59.1%
docTR API 64.1% 92.4% 49.5% 64.9% 49.9%
Tesseract server 49.1% 96.0% 31.9% 79.4% 0.6%
Our Actor's code (paid, no HTTP) 93.8% 96.2% 93.6% 96.3% 90.0%

The same 40 JPGs as our JPG to text test: 10 book scans, phone photos of them, 10 screenshots, and the photos again, stored sideways.

rapidocr_api and docTR are open source (Apache-2.0), and the Tesseract server is our free 53-line sample. Our Actor is paid. Its row is its code, run on the same Mac without HTTP.

rapidocr_api in 3 commands

pip install rapidocr_api onnxruntime
rapidocr_api -ip 127.0.0.1 -p 9003
curl -F [email protected] http://127.0.0.1:9003/ocr | jq -r '.[].rec_txt'

Turn phone photos upright first

A phone often stores a photo sideways, with a tag that says which way is up. rapidocr_api does not read the tag. It found 87.8% of the words on those photos, but only 49.4% in reading order.

from PIL import Image, ImageOps

ImageOps.exif_transpose(Image.open("photo.jpg")).save("upright.jpg", quality=95)

Turned upright first, the same photos came back at 97.4%. The RapidOCR library reads the tag when you give it a file path.

docTR's API: add ?det_arch=fast_base

git clone --branch v1.1.0 https://github.com/mindee/doctr
pip install python-doctr==1.1.0 fastapi uvicorn python-multipart
uvicorn app.main:app --app-dir doctr/api --host 127.0.0.1 --port 8080
curl -F [email protected] "http://127.0.0.1:8080/ocr/?det_arch=fast_base"

What a wrong file gets back

HTTP status for each file
File sent rapidocr_api docTR API Tesseract server
No file 500 500 413
A .txt file 500 400 422
Text named .jpg 500 400 422
WEBP 200 400 200
HEIC 500 400 422
PDF 500 200 422

All 3 read PNG. Only docTR's API reads a PDF. rapidocr_api gives a bare 500 with no reason, so check the file type first.

Tesseract is small, docTR is big

Install and median seconds a call
Server Install Seconds
rapidocr_api 283 MB, models inside 5.8
docTR API 1,066 MB + 165 MB of models 11.7
Tesseract server 53 lines + Tesseract 1.8

Highest RAM after a call: rapidocr_api 1.6 GiB, docTR's API 2.7 GiB, or 3.7 GiB with fast_base. One call at a time, on a busy Mac, so the seconds are rough.

No server: our Actor

PDF OCR to Markdown, our Apify Actor, takes a JPG, PNG, WEBP, TIFF or HEIC by URL and returns its text. Its code found 93.8% of these words.

What I did not test

How I tested it
  • The 40 JPGs: book pages proofread on Wikisource, made-up phone photos of them, light-mode screenshots, and the photos stored turned with EXIF Orientation 6.
  • 10 files in each set, 7,083 words in all.
  • Score: a true word counts if the reply has it, spelled the same, in reading order. Curly quotes count as straight ones.
  • rapidocr_api 0.2.0, RapidOCR 3.10.0, onnxruntime 1.31.1.
  • docTR 1.1.0 and its api folder at tag v1.1.0, on Python 3.12.
  • Tesseract 5.5.4, on macOS 26.6.
  • The Tesseract server is the 53-line one on Tesseract OCR API. It gave the same text as the Tesseract command on all 40 files.
  • Our Actor's code is build 0.1.141, run on our Mac.
  • Scripts and results stay in our private repo, in research/bench/image-to-text-api-2026-11-25/.
Sources

Questions people ask

Is there a free image to text API?

Yes, if you run it yourself. rapidocr_api is free and open source (Apache-2.0) and found 84.6% of the words in our 40 JPGs, in reading order. OCR.space has a free hosted key, with limits.

Which open-source OCR API found the most words?

In reading order, rapidocr_api: 84.6%. In any order, docTR's API with ?det_arch=fast_base found about as many, but mixed up the order on photos. The Tesseract server read scans well, not phone photos.

Why does my phone photo come back jumbled?

The phone stored it sideways, with a tag that says which way is up. rapidocr_api and the Tesseract server did not read the tag. Turn the photo upright before you send it.