LensaOCR

OCR over HTTP, answering in Tesseract's own output formats: send an image, get its text and word boxes with confidences as txt, TSV, hOCR or ALTO — drop-in shapes for tools that already read Tesseract, without wrangling language packs or running an OCR server. Tesseract-compatible: an alternative to calling the Tesseract CLI yourself.

Pricing

Pay per call in USDC with x402, or buy prepaid credits by card.

EndpointWhat it doesPriceFree

Try it

Pick a sample image and see exactly what the API answers (the same bytes the recorded reference answers in the test suite came from):

Or with curl, on any PNG (up to 5 MB) you base64-encode:

curl -X POST "$ORIGIN/v1/ocr" -H 'content-type: application/json' -H 'X-Free-Call: 1' -d '{"image_base64":"<PNG bytes, base64>","format":"tsv"}'

format is text (default), tsv, hocr, alto or words (JSON with every word's text, confidence and bounding box). The answer's shapes are the ones Tesseract writes for the same format: the TSV header level page_num block_num par_num line_num word_num left top width height conf text, hOCR's ocr_page/ocr_line/ocrx_word elements with title="bbox x0 y0 x1 y1; x_wconf <confidence>", and ALTO's String CONTENT HPOS VPOS WIDTH HEIGHT WC.

Routes with free calls allow a few a day per caller: send X-Free-Call: 1. Without it, an unpaid call gets 402 Payment Required with the x402 terms, which x402 clients and agents pay automatically.

Use it from an AI agent (MCP)

Every endpoint is also a tool on this product's MCP server. Add it to any MCP client (Claude, Cursor, VS Code and others) with your API key:

{ "mcpServers": { "lensaocr": { "url": "$ORIGIN/mcp", "headers": { "Authorization": "Bearer <your API key>" } } } }

Buy credits