OCR API — Free Tier + Pay-As-You-Go
Optical character recognition for scanned PDFs and images via API. Tesseract, searchable-PDF or plain-text output, 17 language packs.
What it does
The OCR API runs Tesseract through `POST /v1/convert` in two shapes. `toolOperation=ocr-pdf` with `targetFormat=pdf` rasterises each page at 300 DPI, recognises it, and rebuilds a searchable PDF — the page image with an invisible text layer behind it, so the document looks the same but is findable in any reader and indexable by a document management system. `toolOperation=image-to-text` with `targetFormat=txt` runs the same engine over a photo or screenshot and returns the recognised text as a plain UTF-8 file. Choose the model with `language=eng`, and use Tesseract's `+` syntax for mixed documents (`language=eng+fra`). The production image ships 17 trained language packs — English, French, German, Spanish, Italian, Portuguese, Dutch, Russian, Arabic, Simplified and Traditional Chinese, Japanese, Korean, Hindi, Turkish, Polish and Vietnamese — and anything outside that list falls back to English.
Recognition runs in page-segmentation mode 6 (assume a uniform block of text), which is the right default for scanned pages and screenshots. What the API does not do: automatic language detection, de-skew or contrast pre-processing, confidence filtering, and hOCR or TSV output. Because the searchable PDF is rebuilt from 300 DPI page renders, the output is image-backed even when the input had live text.
Supported formats
Source formats (7)
- jpg
- jpeg
- png
- tiff
- tif
- bmp
Target formats (2)
- txt
Quick start
Every sample posts the job, then polls /v1/status/{jobId} until it finishes, with your API key in the X-Api-Key header. The parameter names below are the ones the endpoint actually accepts — anything else is dropped rather than rejected.
curl -X POST https://api.convertintomp4.com/v1/convert \
-H "X-Api-Key: ck_your_api_key" \
-F "file=@scan.pdf" \
-F "targetFormat=pdf" \
-F "toolOperation=ocr-pdf" \
-F "language=eng"import { readFileSync } from "node:fs";
import { ConvertIntoMP4Client } from "convertintomp4";
const apiKey = process.env.CIM4_API_KEY;
const client = new ConvertIntoMP4Client({ apiKey });
// language accepts Tesseract's "+" syntax, e.g. "eng+fra"
const { jobId } = await client.uploadDirect(
readFileSync("scan.pdf"),
"scan.pdf",
"application/pdf",
{ targetFormat: "pdf", toolOperation: "ocr-pdf", language: "eng" },
);
let job;
do {
await new Promise((r) => setTimeout(r, 2000));
job = await fetch(`https://api.convertintomp4.com/v1/status/${jobId}`, {
headers: { "X-Api-Key": apiKey },
}).then((r) => r.json());
} while (job.status !== "completed" && job.status !== "failed");
console.log("Searchable PDF:", job.result?.downloadUrl);import time, requests
from convertintomp4 import Client
api_key = "ck_your_api_key"
client = Client(api_key=api_key)
# Images go to plain text with image-to-text.
with open("receipt.jpg", "rb") as f:
job = client.upload_direct(
f, "receipt.jpg", "image/jpeg", "txt",
tool_operation="image-to-text",
language="eng",
)
while True:
status = requests.get(
f"https://api.convertintomp4.com/v1/status/{job['jobId']}",
headers={"X-Api-Key": api_key},
).json()
if status["status"] in ("completed", "failed"):
break
time.sleep(2)
print("Text file:", status.get("result", {}).get("downloadUrl"))Features
- `ocr-pdf` → searchable PDF, `image-to-text` → plain UTF-8 text
- 17 bundled Tesseract language packs, `+`-joined for mixed documents
- PDF pages rasterised at 300 DPI before recognition
- Page-segmentation mode 6 (uniform text block) on both paths
- Same job lifecycle as every other conversion: status poll, then signed download
Pricing
From $9.99/mo (Pro) or $24.99/mo (Business) — or pay-as-you-go on the API plan.
Free tier: 5 conversions/day, 100 MB file size, no API key required (IP-gated). Pro $9.99/mo: 100/day (2,000/month), 2 GB files. Business $24.99/mo: 1,000/day (20,000/month), 10 GB files, GPU encoding, dedicated support.
See full pricing breakdown →Built for production
99.9% uptime SLA
Multi-region failover, transparent status page, 60-second response-time guarantee on Business.
Encryption + auto-delete
TLS 1.2+ in transit, AES-256 at rest. Files deleted after 1h / 24h / 7d depending on plan, or instantly via DELETE endpoint. See the security page.
~7s median latency
Most sub-100 MB jobs complete in 6-9 seconds. Webhook-driven async for heavier workloads; waitForJob for synchronous flows.
Frequently Asked Questions
Which languages are actually installed?
Seventeen: English, French, German, Spanish, Italian, Portuguese, Dutch, Russian, Arabic, Chinese (Simplified and Traditional), Japanese, Korean, Hindi, Turkish, Polish and Vietnamese. Pass them as Tesseract codes — `language=deu`, or `language=eng+fra` for a mixed document. A code with no installed pack falls back to English rather than failing the job.
What is a searchable PDF, and what does the output actually contain?
It is the page image with an invisible text layer positioned behind it, so it looks identical to the scan but supports find-in-page and full-text indexing. Be aware that the API rebuilds the PDF from 300 DPI renders of every page, so the output is image-backed even if the source had selectable text — run OCR on scans, not on born-digital PDFs.
Can the API detect the language automatically?
No. There is no auto-detection and no per-page language switching. You pass `language` explicitly, and it applies to the whole document. For an archive with mixed languages, either list several packs together with `+` or split the document and submit each part with its own language.
Can I get hOCR, TSV or word-level bounding boxes?
No. The API exposes searchable PDF and plain text only — the other Tesseract output modes are not reachable through the request schema, and passing an extra parameter for them will be ignored rather than rejected. If you need coordinates, run Tesseract yourself against the extracted page images.
How accurate should I expect it to be?
This is stock Tesseract, so the usual rules apply: clean 300 DPI scans of printed Latin-script text are its strongest case, and accuracy falls off with low-resolution phone photos, skew, unusual fonts and handwriting. There is no de-skew or contrast enhancement step in the pipeline, so anything you do to clean up the source before uploading directly improves the result.
Related APIs
- Compression APICompress video, image, PDF, and audio files programmatically. Quality presets, resolution scaling, and a real byte-ceiling mode for video and audio.
- Merge APIMerge PDFs, videos, images, and audio files programmatically. Upload-order concatenation with per-type engines.
- Split APIPull a page range out of a PDF or cut a time range out of a video or audio file via API. One output per request.
- Watermark APIAdd a text or image watermark to PDFs, videos, and images via API. Nine anchor positions, opacity, size, and colour.
- File Conversion APIOne unified file conversion API for video, audio, image, document, ebook, archive, and font formats — 255 formats, 2,290+ conversion pairs.
- Convert APIProduction-grade file conversion API with 9 language SDKs, async webhooks, and cloud-to-cloud workflows. Free tier available.
Or browse the full catalogue of 23 API products →
Get an API key
Start integrating the OCR API in five minutes. Read the docs, grab a key, and ship your first conversion before the trial coffee cools.