OCR.chat API

ଗୋଟିଏ HTTP ଅନୁରୋଧ ଗୋଟିଏ ପ୍ରତିଛବି କିମ୍ବା PDFକୁ ସଫା ପାଠ୍ୟ, Markdown, ସାରଣୀ, ଏବଂ JSONରେ ପରିବର୍ତ୍ତନ କରେ - 100+ ଭାଷାରେ। ପ୍ରତି ପୃଷ୍ଠାରେ ମିଟର, କୌଣସି ଅଦ୍ଭୁତ।

ସମୀକ୍ଷା

The OCR.chat API is a small REST interface. You POST a file and get back a job with the recognized text and a per-page breakdown (text, bounding boxes, confidence). Jobs of 5 pages or fewer return inline; larger jobs return immediately with a pending status that you poll until done.

  • Base URL: https://ocr.chat
  • Formats in: PNG, JPG, WEBP, GIF, BMP, TIFF, and multi-page PDF
  • Formats out: txt, md, docx, pdf, csv, json
  • Engines: cpu (fast, printed docs) and vlm (premium AI, handwriting, complex layout, math)

ବୈଧିକରଣ

Authenticate with your API token (find it on your account page) as a Bearer header:

Authorization: Bearer YOUR_API_TOKEN

You can also pass ?api_token=… as a query parameter. Usage is metered against your account's page balance.

ଦଲିଲ ଦାଖଲ କରନ୍ତୁ

POST /api/v1/ocr/, multipart form upload.

curl -X POST https://ocr.chat/api/v1/ocr/ \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -F "file=@invoice.pdf" \
  -F "tier=vlm" \
  -F "language=auto"

Returns the job. For ≤5-page files it is already done with the text; larger files come back pending/processing, poll the status endpoint.

{
  "uuid": "9f2c1b7e4a...",
  "status": "done",
  "tier": "vlm",
  "language": "auto",
  "page_count": 1,
  "mean_confidence": 0.98,
  "text": "INVOICE\nAcme Corp\nTotal: 215.00 USD",
  "markdown": "# INVOICE\n\n**Acme Corp** ...",
  "pages": [ { "index": 0, "text": "...", "blocks": [ { "text": "...", "bbox": [x0,y0,x1,y1], "confidence": 0.98 } ] } ]
}

ଗୋଟିଏ ଫଳାଫଳ ଗ୍ରହଣ କରନ୍ତୁ

GET /api/v1/ocr/<uuid>/, poll until status is done or failed.

curl https://ocr.chat/api/v1/ocr/9f2c1b7e4a.../ \
  -H "Authorization: Bearer YOUR_API_TOKEN"

ଗୋଟିଏ ଶୈଳୀ ଆହରଣ କରନ୍ତୁ

GET /api/v1/ocr/<uuid>/download/?format=md, export the result. format is one of txt, md, docx, pdf, csv, json.

curl -L "https://ocr.chat/api/v1/ocr/9f2c1b7e4a.../download/?format=docx" \
  -H "Authorization: Bearer YOUR_API_TOKEN" -o result.docx

ଦଲିଲ ସହିତ ଚାଟ କରନ୍ତୁ

ଗୋଟିଏ ସମାପ୍ତ କାର୍ଯ୍ୟ ବିଷୟରେ ପ୍ରଶ୍ନ ପଚାରନ୍ତୁ। ଉତ୍ତରଗୁଡ଼ିକ କେବଳ କାଢ଼ିବା ପାଠ୍ୟରେ ଆଧାରିତ ଏବଂ ଉତ୍ସ ପୃଷ୍ଠାକୁ ଉଲ୍ଲେଖ କରିଥାଏ। ଗୋଟିଏ ଖାତା ଟୋକନ ଆବଶ୍ୟକ - ଚାଟ ବିଶେଷତାଟି ଖାତା-ଗେଟିତ।

POST /api/v1/chat/<uuid>/, JSON body {"message": "your question"}.

curl -X POST https://ocr.chat/api/v1/chat/9f2c1b7e4a.../ \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"message": "What is the invoice total and due date?"}'

ଏହାର ଉତ୍ତର ସହିତ ସହାୟକ ସନ୍ଦେଶକୁ ଫେରାଇଥାଏ ଏବଂ ଉଦ୍ଧୃତ ପୃଷ୍ଠାଗୁଡ଼ିକର ଗୋଟିଏ ତାଲିକା:

{"conversation": "a1b2…", "message": {
   "role": "assistant",
   "content": "The total is $42, due on March 3 (p. 1).",
   "citations": [{"page": 1, "snippet": "The invoice total is $42…"}]
}}

GET /api/v1/chat/<uuid>/history/, ଗୋଟିଏ କାର୍ଯ୍ୟ ପାଇଁ ସମ୍ପୂର୍ଣ୍ଣ ବାର୍ତ୍ତାଳାପ ଟ୍ରାନ୍ସକ୍ରିପସନକୁ ଆଣନ୍ତୁ।

ସଂକେତ ଉଦାହରଣଗୁଡ଼ିକ

import requests, time

API = "https://ocr.chat/api/v1/ocr/"
H = {"Authorization": "Bearer YOUR_API_TOKEN"}

# Submit
with open("invoice.pdf", "rb") as f:
    job = requests.post(API, headers=H,
        files={"file": f}, data={"tier": "vlm"}).json()

# Poll until done
while job["status"] in ("pending", "processing"):
    time.sleep(2)
    job = requests.get(API + job["uuid"] + "/", headers=H).json()

print(job["markdown"])

# Download as DOCX
r = requests.get(API + job["uuid"] + "/download/",
                 headers=H, params={"format": "docx"})
open("result.docx", "wb").write(r.content)
import fs from "fs";

const API = "https://ocr.chat/api/v1/ocr/";
const H = { Authorization: "Bearer YOUR_API_TOKEN" };

const form = new FormData();
form.append("file", new Blob([fs.readFileSync("invoice.pdf")]), "invoice.pdf");
form.append("tier", "vlm");

let job = await (await fetch(API, { method: "POST", headers: H, body: form })).json();

while (["pending", "processing"].includes(job.status)) {
  await new Promise(r => setTimeout(r, 2000));
  job = await (await fetch(API + job.uuid + "/", { headers: H })).json();
}
console.log(job.markdown);
# 1. Submit
curl -X POST https://ocr.chat/api/v1/ocr/ \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -F "file=@invoice.pdf" -F "tier=vlm"

# 2. Poll  (use the uuid from step 1)
curl https://ocr.chat/api/v1/ocr/UUID/ \
  -H "Authorization: Bearer YOUR_API_TOKEN"

# 3. Download
curl -L "https://ocr.chat/api/v1/ocr/UUID/download/?format=md" \
  -H "Authorization: Bearer YOUR_API_TOKEN" -o result.md

ପ୍ରାଚଳଗୁଡ଼ିକ

FieldTypeDescription
filefileRequired. The image or PDF to process.
tierstringcpu (default, fast/printed) or vlm (premium AI: handwriting, layout, math).
languagestringauto (default) or a language code (en, ch, ja, ar, …).
toolstringOptional tool slug (e.g. extract-tables, handwriting-to-text) to apply that tool's preset.
translate_tostringFor the translate tool, target language code.

ତ୍ରୁଟି ଏବଂ ସୀମାଗୁଡିକ

CodeMeaning
400No file, unsupported type, or file too large.
401Missing or invalid API token.
402Out of pages, daily/monthly free limit reached, or no credits. The body includes used/cap.
404Job UUID not found.
409Download requested before the job finished.

Each page processed costs credits (1/page on the fast tier, more on premium). Paid plans raise per-file page caps and add priority. See pricing.

ସାଧାରଣ ପ୍ରଶ୍ନ

Create a free account and open your account page, your token is shown there with a copy button.

Yes, files of 5 pages or fewer return the full result inline in the POST response, so no polling is needed for most images and short PDFs.

Over 100, including Latin, CJK, Arabic, Cyrillic and Indic scripts. Use language=auto to detect, or pass a specific code.

Uploads are processed for OCR and deleted automatically. We never sell, share, or train on your documents.

ବ୍ୟବହାର ଆପଣଙ୍କର ଖାତା ବଳକା ସହିତ ପ୍ରତି ପୃଷ୍ଠା ପାଇଁ ମାପ ହୋଇଥାଏ: ଅଜ୍ଞାତ କଲଗୁଡ଼ିକ ପ୍ରତି-IP ପ୍ରତିଦିନ ଅନୁମତି ପାଇଥାଏ, ମୁକ୍ତ ଖାତାଗୁଡ଼ିକ ମାସିକ ବକ୍ସ, ଏବଂ ପଇସା ଦେଇଥିବା ଯୋଜନାଗୁଡ଼ିକ ଉଚ୍ଚତମ ପ୍ରତି-ଫାଇଲ ପୃଷ୍ଠା ବର୍ଦ୍ଧନ ଏବଂ ପ୍ରାଥମିକତା ସହିତ କ୍ରୟ କରାଯାଇଥିବା କ୍ରେଡିଟ ବ୍ୟବହାର କରିଥାଏ। ଯେତେବେଳେ ଆପଣ ବନ୍ଦ ହୋଇଯାଆନ୍ତି, ଆପଣ ବସ୍ତୁରେ ବ୍ୟବହାର ଏବଂ ବର୍ଦ୍ଧନ ସହିତ 402 ପାଇବେ।

ଆପଣ PNG, JPG, WEBP, GIF, BMP, TIFF, ଏବଂ ବହୁ-ପୃଷ୍ଠା PDF ପଠାଇ ପାରିବେ। ଫଳାଫଳଗୁଡ଼ିକୁ txt, md, docx, pdf (ସନ୍ଧାନଯୋଗ୍ୟ), csv, କିମ୍ବା json ଭାବରେ ଆହରଣ କରନ୍ତୁ ଆହରଣ ଶେଷ ବିନ୍ଦୁର ଶୈଳୀ ପରିମାପକ ମାଧ୍ୟମରେ।

400 ଗୋଟିଏ ଲୁପ୍ତ ଫାଇଲ, ଅସମର୍ଥିତ ପ୍ରକାର, କିମ୍ବା ଫାଇଲ ଅତ୍ୟଧିକ ବଡ଼; 401 ଗୋଟିଏ ଲୁପ୍ତ କିମ୍ବା ଅବୈଧ ଟୋକନ; 402 ପୃଷ୍ଠାରୁ ବାହାର; 404 ଗୋଟିଏ ଅଜଣା କାର୍ଯ୍ୟ UUID; ଏବଂ 409 ଗୋଟିଏ ଆହରଣ ଅନୁରୋଧ କାର୍ଯ୍ୟ ସମାପ୍ତ ହେବା ପୂର୍ବରୁ। ତ୍ରୁଟି ଶରୀରରେ ଗୋଟିଏ ସଂକ୍ଷିପ୍ତ ସନ୍ଦେଶ ଅନ୍ତର୍ଭୁକ୍ତ।

ସ୍ଥିତି, ସ୍ତର, ଭାଷା, ପୃଷ୍ଠା_ଗଣନା, ଏବଂ mean_confidence ସହିତ ଗୋଟିଏ କାର୍ଯ୍ୟ ବସ୍ତୁ, ଏବଂ ସମ୍ପୂର୍ଣ୍ଣ ପାଠ୍ୟ ଏବଂ ମାର୍କଡାଉନ ସହିତ। ପୃଷ୍ଠା ଆରଏରି ପ୍ରତ୍ୟେକ ପୃଷ୍ଠାକୁ ସେମାନଙ୍କର ପାଠ୍ୟ ସହିତ ବୃକ୍ଷରେ ଭାଙ୍ଗେ, ସୀମା ବାକ୍ସ (bbox), ଏବଂ ପ୍ରତି-ବୃକ୍ଷ ବିଶ୍ୱାସ।

cpu ( ପୂର୍ବନିର୍ଦ୍ଧାରିତ) କୁ ଶୀଘ୍ର, ସ୍ୱଚ୍ଛ ମୁଦ୍ରଣ ଦଲିଲଗୁଡ଼ିକର କମ-ଖର୍ଚ୍ଚ ବିବେଚନା ପାଇଁ ବ୍ୟବହାର କରନ୍ତୁ। vlm, ପ୍ରିମିଆ AI ଯନ୍ତ୍ର,କୁ ହସ୍ତଲିଖନ, ଜଟିଳ କିମ୍ବା ବହୁ-ସ୍ତମ୍ଭ ବିନ୍ୟାସ, ଗଣିତ, ଏବଂ ଅନୁବାଦ ପାଇଁ ବ୍ୟବହାର କରନ୍ତୁ, ଯେଉଁଠାରେ ଏହା ଅଧିକ ସଠିକ।

ସାଧନଗୁଡ଼ିକର ପୂର୍ବନିର୍ଦ୍ଧାରିତ ପୂର୍ବସଂରଚନାକୁ ପ୍ରୟୋଗ କରିବା ପାଇଁ ଗୋଟିଏ ସଲଗ ସହିତ ସାଧନକୁ ପାସ କରନ୍ତୁ (ଉଦାହରଣ ସ୍ୱରୂପ କାଢ଼ିବା-ସାରଣୀ କିମ୍ବା ହସ୍ତଲିଖନ-କୁ-ପାଠ୍ୟ)। ଅନୁବାଦ ସାଧନ ପାଇଁ, ପରିଚୟପୂର୍ବକ ପାଠ୍ୟକୁ ପୁନଃ ଅନୁବାଦ କରିବା ପାଇଁ ଲକ୍ଷ୍ୟ ଭାଷା ସଂକେତ ସହିତ ଅନୁବାଦକୁ ମଧ୍ୟ ପାସ କରନ୍ତୁ।

POST ଉତ୍ତରରେ5ପୃଷ୍ଠା କିମ୍ବା କମ୍ ଫାଇଲଗୁଡ଼ିକ ରେଖାଗତ ଭାବରେ ଫେରିଆସିଥାଏ। ବଡ଼ ଫାଇଲଗୁଡ଼ିକ ତୁରନ୍ତ ଅପେକ୍ଷା କରୁଥିବା କିମ୍ବା ପ୍ରକ୍ରିୟାକରଣ କରୁଥିବା ଭାବରେ ଫେରିଆସିଥାଏ, ଏବଂ ଆପଣ GET /api/v1/ocr/କୁ ପଲଟି ପାରିବେ<uuid>/ ସ୍ଥିତି ସମ୍ପୂର୍ଣ୍ଣ କିମ୍ବା ବିଫଳ ହେବା ପର୍ଯ୍ୟନ୍ତ. ପୈଠିତ ଯୋଜନାଗୁଡ଼ିକ ପ୍ରତି ଫାଇଲ ପୃଷ୍ଠା ସୀମାକୁ ବଢ଼ାଇଥାଏ ।

API HTTPS ଉପରେ ସରଳ REST ଅଟେ, ତେଣୁ ଏହା HTTP ଗ୍ରାହକ ସହିତ କୌଣସି ଭାଷାରୁ କାମ କରେ - Python, Node.js, ଏବଂ cURL ଉଦାହରଣଗୁଡ଼ିକୁ ଉପର ଦେଖନ୍ତୁ। ସ୍ଥାପନ କରିବା ପାଇଁ କୌଣସି SDK ନାହିଁ; ମାନକ HTTP ସଂକେତର କିଛି ଧାଡ଼ି ଆପଣଙ୍କୁ ଆବଶ୍ୟକ।