Skip to main content
POST
/
v2
/
router
/
ocr
cURL
curl --request POST \
  --url https://api.orq.ai/v2/router/ocr \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "<string>",
  "document": {
    "type": "document_url",
    "document_url": "<string>",
    "document_name": "<string>"
  },
  "pages": [
    123
  ],
  "ocr_settings": {
    "include_image_base64": true,
    "max_images_to_include": 123,
    "image_min_size": 123
  }
}
'
{
  "model": "<string>",
  "pages": [
    {
      "index": 123,
      "markdown": "<string>",
      "images": [
        {
          "id": "<string>",
          "image_base64": "<string>"
        }
      ],
      "dimensions": {
        "dpi": 123,
        "height": 123,
        "width": 123
      }
    }
  ],
  "usage": {
    "type": "pages",
    "pages_processed": 123
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

input

model
string
required

ID of the model to use for OCR.

document
object
required

Document to run OCR on. Can be a DocumentURLChunk or ImageURLChunk.

pages
integer[] | null

Specific pages to process. Can be a single number, range, or list. Starts from 0. Null for all pages.

ocr_settings
object

Optional settings for the OCR run

Response

200 - application/json

Represents an OCR response from the API.

model
string
required

ID of the model used for OCR.

pages
object[]
required
usage
object
required

The usage information for the OCR run counted as pages processed