Run OCR

POST /ocr

Document-AI workload: send a handwritten, scanned, or printed document (PDF, image, office file) by URL or as base64, and get clean, structured Markdown back. Billed per page.

POST
/ocr

Authorization

AuthorizationBearer <token>

Your Munito API key.

In: header

Header Parameters

munito-service-tier?string

priority, standard or flex. The response names the tier that is billed; see x-ratelimit-over-limit.

Default"standard"

Value in

  • "priority"
  • "standard"
  • "flex"
prefer?"respond-async"

respond-async: answer 202 at once. Then poll the location until the request finishes.

Value in

  • "respond-async"

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

document*

The document to read, by url or as base64 data.

model?string

An OCR model id from GET /models. Omit it, or send munito/ocr-auto, to let Munito pick.

pages?array<integer>

Zero-based page numbers to read, each one time, at most 1000. A negative or repeated number, or a number past the last page, answers 422. Omit it to read every page.

tables?

How to return each table.

images?

How to return each image on a page.

confidence_scores?boolean

Return a confidence per page.

Defaultfalse
extract?array<>

Page parts to move from the page text into their own fields.

preferred_region?string

Where the request can run. Omit it to use the default region of the organization.

Value in

  • "global"
  • "eu"
  • "us"

Response Body

curl -X POST "https://example.com/ocr" \
  -H "Content-Type: application/json" \
  -d '{
    "document": {
      "type": "url",
      "url": "https://example.com/invoice.pdf"
    },
    "model": "lightonai/lightonocr-2-1b"
  }'
Empty