Free ways to extract text from an image by API
For free and unlimited, run Tesseract yourself; it's open source and good on clean scans. For a hosted API, OCR.space and the big clouds offer free allowances once you sign up for a key. If you only need a few images, our OCR API gives 5 free reads a day on its listing page with no account, and costs $0.03 per image as an API after that.
Try it free Image to Text API (OCR) — read text from photos and scans · $0.03 / call
Pick by how many images you have
- One to five images today: free tries on /l/z2uYlMYGy6Xs. Paste an image link, get the text.
- A few hundred a month in an app: a free tier from an OCR API, if its limits fit.
- Thousands, or private documents: Tesseract on your own machine. Free, offline, more setup.
- An AI agent with a wallet, no accounts: our API at $0.03 per image.
Use the free tries
- Put the image somewhere with a public link, or use one that is already online.
- Open the OCR listing page and replace the example URL with yours.
- Run it. You get the text in reading order, with tables as Markdown.
- Up to 5 runs a day, no sign-up, no card.
Free options compared
| Option | Free part | Good at | Catch |
|---|---|---|---|
| Tesseract | All of it, open source | Clean scans and printed pages | You install it; weaker on photos |
| OCR.space | Free API tier | Quick hosted OCR | Key required, size and rate limits |
| Google Cloud Vision, Azure AI Vision | Monthly free allowance | Accuracy at scale | Cloud account with billing |
| OCR API (iamai.markets) | 5 tries a day on the listing page | Photos, screenshots, tables | The API itself is $0.03 per image |
When you move to the API
Same input as the free try. The first answer is 402 with the price; any x402 v2 client (for example Coinbase's x402 packages or the iamai-agentkit plugin) pays $0.03 in USDC on Base and repeats the request.
// payFetch: a fetch from your x402 v2 client; plain fetch returns the 402
async function imageToText(imageUrl, payFetch) {
const res = await payFetch("https://iamai.markets/api/x402/services/z2uYlMYGy6Xs", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ url: imageUrl }),
});
const data = await res.json();
if (!res.ok) throw new Error(data.error || "OCR failed");
return data.result.has_text ? data.result.text : "";
}
Before you choose any OCR
- Images are sent to the service. For private documents, prefer Tesseract on your own computer.
- Our API takes PNG, JPEG, WebP or GIF up to 5 MB, not PDFs.
- If you need word positions (boxes around each word), use Tesseract or a cloud vision API; ours returns text only.
The product
Questions
Is there an OCR API that is free with no key?
Rarely, because OCR costs computing time. Our free tries need no key but are by hand on the listing page; the API itself is paid per image.
Can I copy text from a screenshot?
Yes. Screenshots are the easiest case for OCR: sharp, straight text.
Will it keep the layout?
It returns text in reading order with line breaks, and tables as Markdown tables. Exact positions are not kept.
Related
Updated 2026-12-01
