OCRRouter

GPT vs TrOCR

Pick GPT for handwritten notes, whole pages and PDFs, and for pulling fields into custom JSON through a hosted API. Pick TrOCR for English text-line recognition that you run yourself under an MIT licence, or as a base to fine-tune on your own line images. TrOCR reads only single text-line images, so a page needs a separate line detector in front of it.

GPTopenai/gptTrOCRmicrosoft/trocr
TypeVision modelOpen source
Price11 credits / page1 credit / page
Per 1,000 pages$11.00$1.00
Typical speed2.4 s / page1.2 s / page
Best forMessy scans, custom instructionsHandwritten text lines
InputsPDF, imagesimages
Languages50+ languagesEnglish
Max pages per request100100
Tables✓ YesNo
Handwriting✓ Yes✓ Yes
Math✓ YesNo
Bounding boxesNoNo
ConfidenceNoNo
FormsNoNo
Multilingual✓ YesNo
On OCRRouterAvailableAvailable

Prices are what you pay on OCRRouter. Speed is the provider's typical figure, not a benchmark we ran.

Which to choose

Choose GPT if

  • It takes PDFs and page images directly, with files up to 50 MB per request, so you need no line detector.
  • It can be prompted to return Markdown, JSON or plain text, which suits extraction into custom JSON and document question answering.
  • An HN user reported about 5% errors on messy cursive versus about 30% for Mistral OCR.

Choose TrOCR if

  • It is MIT licensed and free to self-host, so you pay only for compute and no per-token fees.
  • The large model reports 2.89 character error rate on the IAM handwriting set, and there are separate checkpoints for handwritten (IAM), printed (SROIE) and scene text.
  • It loads in a few lines with Hugging Face transformers and can be fine-tuned on custom line images.

Key differences

GPTTrOCR
InputImages and PDFs, up to 50 MB per requestSingle text-line images only; a separate line detector is needed
How you run itHosted API from OpenAILocal library via Hugging Face transformers
LicenceProprietaryMIT (microsoft/unilm repository)
PriceToken-based per model; page images add input tokens, so cost per page is not fixedFree, self-hosted; you pay for compute
OutputMarkdown, JSON, plain text; no bounding boxes or confidence scores in the standard responsePlain text only; no layout, table or page-level output
BenchmarkGPT-5.2 scores 85.50 on OmniDocBench v1.5 and 86.59 on v1.6 (independent)2.89 CER on IAM handwriting with TrOCR-large (reported by the authors)
LanguagesNot publishedReleased checkpoints are English-focused; other languages need fine-tuning

Sources

What each one is

GPT

General vision model. Good at messy scans and following extraction instructions.

GPT details

TrOCR

Transformer text recognition model. Reads single text lines, including handwriting.

TrOCR details

Try both on your own file

Run the file once with each model and compare the output.

PDF, PNG, JPG, WebP, HEIC. Up to 20 MB each, 10 files.No file?

Use one, fall back to the other

{"model": "openai/gpt","fallbacks": ["microsoft/trocr"],"file_url": "https://example.com/document.pdf"}

Questions

More comparisons

GPT alternativesTrOCR alternativesBest OCR models in 2026