OneTag AI

Free OCR API: image to text from a web page, no backend

Is there a free OCR API that turns an image into text without a server?

Yes. OneTag AI reads images with a vision model, and each email address gets a key with 1,000,000 free tokens a month and no credit card. In our tests a full page of text cost about 2,200 tokens, so the free key reads about 450 full-page images a month, or about 1,900 small ones such as receipts. The key is safe to leave in page source, so the page itself can send a photo and get the text back, with no backend.

It returns plain text, or JSON in the shape you ask for. It does not return word positions and it does not read PDFs; the comparison below lists the free OCR APIs that do.

Steps

  1. Get a free key

    Enter your email at onetagai.com. The key (it starts with ot_) arrives by email. One key per email, no card.

  2. Read the text in an image

    Pass the image file as the input. The script scales it down to at most 1,600 pixels on the long side before it is sent:

    <input type="file" id="photo" accept="image/*">
    <pre id="text"></pre>
    
    <script src="https://onetagai.com/v1.js" data-key="YOUR_ONETAG_KEY"></script>
    <script type="module">
      const photo = document.getElementById("photo");
      photo.onchange = async () => {
        document.getElementById("text").textContent = await onetag.ask(
          "Transcribe all the text in this image exactly. Keep the line breaks. Return only the text.",
          photo.files[0],
          { maxTokens: 2000 }
        );
      };
    </script>

    The input can also be an <img> element that is already on the page.

  3. Get fields instead of text

    Describe the JSON you want and set json: true. The answer is a parsed object:

    const receipt = await onetag.ask(
      'Read this receipt. Return JSON {"merchant": string, "date": "YYYY-MM-DD", "total": number, "items": [{"name": string, "price": number}]}.',
      photo.files[0],
      { json: true, maxTokens: 1000 }
    );
    console.log(receipt.merchant, receipt.total, receipt.items);

  4. Or call it over HTTP

    From a server or a script, send the image as a base64 data URL. Python needs only the standard library:

    import base64, json, urllib.request
    
    image = base64.b64encode(open("receipt.jpg", "rb").read()).decode()
    body = {
        "key": "YOUR_ONETAG_KEY",
        "prompt": "Transcribe all the text in this image exactly. Keep the line breaks. Return only the text.",
        "input": [{"type": "image", "data_url": "data:image/jpeg;base64," + image}],
        "max_tokens": 2000,
    }
    req = urllib.request.Request(
        "https://onetagai.com/v1/ask",
        data=json.dumps(body).encode(),
        headers={"Content-Type": "application/json"},
    )
    with urllib.request.urlopen(req) as res:
        print(json.load(res)["text"])

What we measured

Both tests ran against the live API on 2026-11-10, with images we generated so the right answer was known.

ImageResultTokens usedTime
A printed page, 1,600 × 1,200 pixels, 13 lines, 1,221 charactersEvery character matched2,235 (1,972 in, 263 out)about 5 s
A printed receipt, 900 × 420 pixels, 6 lines, as textEvery character matched515 (436 in, 79 out)about 3.5 s
The same receipt, as JSON with merchant, date, total and itemsAll fields correct564 (464 in, 100 out)about 2 s

These were clean, printed, high-contrast images. Handwriting, blurry photos and very small print are harder: test with your own images before you rely on it.

Free OCR APIs compared

APICallable from a public page, no backendFree allowanceWhat you need to start
OneTag AIYes. The key is public by design and can only spend its own budget1,000,000 tokens a month, reset on the 1st: about 450 full-page images or 1,900 small ones in our testsAn email address. No card
OCR.spaceYes. Their docs include a browser example; the key is then visible in the page25,000 requests a month, files up to 1 MB, PDFs up to 3 pages, 500 requests a day per IP addressA free API key
Tesseract.jsYes. The OCR engine itself runs in the browser through WebAssembly, with no API and no key. It does not read PDFsFree and open source. It runs on the visitor's device, so no provider quota appliesNothing. It is a JavaScript library
Google Cloud VisionBuilt for server code: setup goes through a Google Cloud project and the gcloud CLIThe first 1,000 units a month; then $1.50 per 1,000 for text detectionA Google Cloud project with billing enabled
Azure AI VisionNot safely. Calls carry a secret resource key5,000 transactions a month on the free F0 tier, 20 a minuteAn Azure subscription
Amazon TextractBuilt for server code inside an AWS account1,000 pages a month of text detection for the first three months, for new AWS customersAn AWS account

Other providers' figures were read on their own pages on 2026-11-10; follow the link in each row for the current numbers. Free tiers change often.

Which free OCR API should you use?

Limits to know before you rely on it

Questions

Is the OCR API really free?

Yes, up to 1,000,000 tokens a month per key, with no credit card. The allowance starts again on the 1st of each month (UTC). If a month's tokens are used up, calls return quota_exceeded until the 1st, or until you upgrade to Pro ($9.9 a month for 100,000,000 tokens a month).

How many images can I read for free?

It depends on the size of the image and the amount of text. In our tests a full page at 1,600 × 1,200 pixels used 2,235 tokens and a small receipt 515, so 1,000,000 tokens is about 450 full pages or about 1,900 receipts a month.

Does it read PDFs?

No. It reads one image per call. Convert the page to an image first, or use an API that takes PDFs, such as OCR.space.

Does it read handwriting?

Vision models can read clear handwriting, but we have not measured it, so test with your own samples. Printed text in our tests came back with every character right.

Does it return bounding boxes or word coordinates?

No. It returns the text, or JSON in the shape you ask for. For coordinates use Google Cloud Vision, Azure AI Vision or Amazon Textract.

Can I extract data from a receipt or an invoice as JSON?

Yes. Describe the fields in the prompt and set json: true, for example {"merchant": string, "date": "YYYY-MM-DD", "total": number}. In our receipt test all fields came back correct.

Are the images stored?

No. The image goes to the model and the answer comes back. OneTag AI stores token counts per key for the quota and keeps no prompts, inputs or answers.

Is it safe to put the OneTag AI key in my page?

Yes, it is designed for that. The key can only spend its own token budget and cannot read or change anything on your account. On the Pro plan you can lock it to your domain so other sites cannot use it; free keys work from any page.

Try it on your sitefree

Get a free key by email, paste one tag, call onetag.ask. 1,000,000 tokens a month, no card.

Get a free key

Updated 2026-11-11. Something wrong or missing? Email support@odysseyx.app.