All use cases

Thai OCR for contracts and legal documents

Read Thai agreements, deeds, filings, and correspondence into searchable text, so a review workflow can hold the document instead of the scan.

What comes back

A service agreementoutput: markdown
## ข้อ ๗ การบอกเลิกสัญญา

๗.๑ คู่สัญญาฝ่ายใดฝ่ายหนึ่งอาจบอกเลิกสัญญาฉบับนี้
     โดยแจ้งเป็นหนังสือล่วงหน้าไม่น้อยกว่าสามสิบ (๓๐) วัน

๗.๒ การบอกเลิกตามข้อ ๗.๑ ไม่กระทบต่อสิทธิและหน้าที่
     ที่เกิดขึ้นแล้วก่อนวันที่การบอกเลิกมีผล
Clause numbering in Thai numerals survives the read, so a cross-reference still points at the clause it named.
A schedule of feesoutput: structured
heading   ภาคผนวก ก อัตราค่าบริการ
table     6 rows x 3 columns
paragraph อัตราข้างต้นยังไม่รวมภาษีมูลค่าเพิ่ม
A schedule is a table, and typed blocks keep it one, rather than flattening it into the prose around it.
A signed amendmentoutput: markdown
# บันทึกข้อตกลงแก้ไขเพิ่มเติมสัญญา ฉบับที่ ๒

ทำที่ กรุงเทพมหานคร
วันที่ ๑๕ กรกฎาคม ๒๕๖๙

![signature block](figure)
Signature blocks and stamps come back as figures, so the review knows they were on the page without the model inventing what they say.

The reads above are illustrations of shape, not captured responses. The OCR page carries the model's own witnessed read of a real specimen, with its capture date.

How it fits a review workflow

Most Thai legal documents reach a review team as a scan of a signed original, which is to say as an image of text that nobody can search. The clause a reviewer needs is on page nineteen of a twenty-four page agreement, in Thai, next to a schedule that only exists as a table. Reading the document into text is the step that turns a folder of PDFs into something a search index, a clause library, or a reviewer's own keyboard can reach.

  1. Read the file, keep the fileThe original PDF stays your record. What the read adds is a text copy of the same pages, in the same page order, that a search index can hold.
  2. Keep the structure the document hasChoose Markdown when a human will read the result, and structured output when a clause extractor or a schedule parser will. Both keep headings, tables, and lists distinct.
  3. Send text onward, not scansOnce a document is text, everything downstream gets easier: search, clause comparison, and, where a Thai version is needed for readers rather than a court, translation.

A matter, priced

WorkloadPagesCredits
One agreement and its schedules (24 pages)24156
One request, at the 50-page ceiling50325
A 40-document matter6,240 credits

Every page bills the same 6.5 credits, so a matter's cost is its page count and nothing else. A document longer than the 50-page ceiling is split into requests by your code.

Where the read stops

It reads the page
Clauses, schedules, and correspondence come back as text in the document's own order.
It does not certify
Section 46 of the Civil Procedure Code requires a court filing in a foreign language to carry a Thai translation certified as correct. A read is not that.
It does not advise
What a clause means, and what to do about it, stays with your counsel.
It does not authenticate
Signatures and seals return as figures. Whether a document is genuine is a question this API never answers.

These are the boundaries of the product, not a summary of your obligations. Where a document is going matters more than what it says, and only you know where yours is going.

Sources:Civil Procedure Code, s. 46(opens in a new tab)

For developers

Post the agreement once; the response keeps the pages separate, so a clause citation can still name the page it came from.

# Encode without line wrapping: wrapped base64 breaks the JSON string.
DOC=$(base64 < invoice.pdf | tr -d '\n')
# --max-time covers a multi-page document; curl defaults to no limit.
curl -X POST https://api.paxalabs.com/v1/ocr \
  --max-time 300 \
  -H "Authorization: Bearer $PAXA_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"document\": \"$DOC\", \"model\": \"paxa-ocr-lite-v1\"}"

Full API reference

Thai numerals carry the structure of a contract

Thai legal drafting numbers its clauses in Thai numerals, and nests them: ข้อ ๗.๑ sits under ข้อ ๗. A reader who treats ๗ as decoration loses the document's outline and every cross-reference in it. The model reads Thai numerals as numerals, so a clause that referred to ข้อ ๗.๑ still refers to it after the read.

Common questions

Is a read the same as a certified translation?
No, and the distinction matters. Section 46 of the Civil Procedure Code requires a document in a foreign language filed with a court to come with a Thai translation certified as correct, and official processes generally expect a certified translator to attest it. This API reads what is on the page. It does not certify anything.
Does this give legal advice about our documents?
No. It returns the text of the pages you send. Everything after that, including what a clause means and what to do about it, is your counsel's work.
What happens to signatures, seals, and stamps?
They come back as figures rather than as invented text. The read tells you a signature block was on the page; it does not tell you whose signature it is.
Can we send documents longer than the page ceiling?
One request carries up to 50 pages and 10 MB. A longer document is split into consecutive requests by your code, and each page bills the same either way.

Start with free credits

Sign in with Google, GitHub, or Hugging Face and spend 100 one-time free credits on your own text.