AI OCR API in India
Extract text from images and documents using AI. Accurate optical character recognition via OpenAI-compatible API, billed in rupees from India.
Optical character recognition (OCR) with AI
Modern OCR goes beyond drawing boxes around text. unoblox lets you build document-parsing systems on vision-capable models — extracting not just raw text but structured fields — through one OpenAI-compatible endpoint (https://api.unoblox.ai/v1), billed in rupees on a GST invoice.
Why AI-powered OCR beats rule-based engines
Traditional OCR stumbles on handwriting, skewed scans, and mixed-language documents. Vision-capable LLMs read layout and context together — they can tell a total is a total because it sits next to "Grand Total", not just because it's a number in a box.
Recommended models
| Model | Input ₹/1M | Output ₹/1M | Best for |
|---|---|---|---|
| GPT-4o | ₹252 | ₹1008 | Fastest, strong general accuracy |
| Claude Opus | ₹504 | ₹2520 | Dense, multi-page documents |
| Qwen3 Max | ₹120.95 | ₹604.77 | Cost-effective, solid accuracy |
Prices per 1M tokens — live rates at /models.
Extract raw text from an image
from openai import OpenAI
import base64
client = OpenAI(
api_key="ub-gw-...",
base_url="https://api.unoblox.ai/v1"
)
with open("document.png", "rb") as f:
image_data = base64.b64encode(f.read()).decode()
response = client.chat.completions.create(
model="openai/gpt-4o",
messages=[{
"role": "user",
"content": [
{"type": "image_url", "image_url": {"url": f"data:image/png;base64,{image_data}"}},
{"type": "text", "text": "Extract all text from this image."}
]
}]
)
print(response.choices[0].message.content)
Extracting structured fields, not just text
For invoices, receipts, and forms you usually want fields, not a text blob. Add a schema to the prompt and turn on JSON mode:
response = client.chat.completions.create(
model="openai/gpt-4o",
messages=[{
"role": "user",
"content": [
{"type": "image_url", "image_url": {"url": f"data:image/png;base64,{image_data}"}},
{"type": "text", "text": "Extract as JSON: {vendor, invoice_number, date, line_items: [{description, qty, amount}], total}"}
]
}],
response_format={"type": "json_object"}
)
What it costs
A single invoice image typically resolves to 500–1,500 input tokens (image + prompt) and 100–300 output tokens for the extracted fields. At GPT-4o rates, that's roughly ₹0.15–₹0.50 per document — processing 10,000 invoices a month lands somewhere between ₹1,500 and ₹5,000 depending on document complexity.
Use cases
- Invoice digitization and accounts-payable data entry
- Receipt scanning for expense management
- Handwritten form processing (surveys, applications)
- Multilingual document extraction and translation
- ID and passport field verification for onboarding
Frequently asked questions
Q: Can unoblox handle handwritten text? A: Yes, GPT-4o and Claude Opus both read handwriting reasonably well, though results depend heavily on image quality — scan at a higher resolution if extraction looks unreliable.
Q: Does my document data leave unoblox's platform? A: Requests are billed and logged through unoblox's India-based gateway; the model you choose (GPT-4o, Claude Opus, Qwen3 Max) determines where the actual image processing happens — see each model's page on /models for details before sending sensitive documents.
Q: How much does OCR cost per document? A: A typical single-page document uses 500–1,500 tokens. At GPT-4o rates that's roughly ₹0.15–₹0.50 per page — see the cost breakdown above for volume estimates.
Q: Can I process multiple images in one request?
A: Yes, add multiple image blocks to the same content array, or loop over documents. There's no dedicated batch endpoint yet, but raw throughput is high.
Q: Which models support vision? A: GPT-4o, Claude Opus, Claude Sonnet, and Qwen3 Max all accept images. Check each model's card on /models to confirm current vision support before building against it.
Q: Can I get structured JSON instead of a text blob?
A: Yes — set response_format to json_object and describe the schema you want in your prompt, as shown above.
Get started in rupees → https://unoblox.ai/sign-in
Start building in rupees
Call every major model through one OpenAI-compatible endpoint, billed in ₹ on a GST invoice.