Extract text and structure from a document or image as markdown using an OCR model.

post/v1/ocr

Request

  • Base URL
    https://api.llmgateway.io
  • Auth
    HTTP bearer

Request body

modelstring required

ID of the OCR model to use.

idstring
include_image_base64boolean

Whether to return extracted images as base64 in the response.

image_limitinteger
image_min_sizeinteger
bbox_annotation_formatobject
document_annotation_formatobject

Example request

{
  "model": "mistral-ocr-latest",
  "document": {
    "document_url": "https://arxiv.org/pdf/2201.04234"
  }
}

Response

OCR response.

modelstring
document_annotationstring nullable

Changes

    • breaking

      removed subschema #1 subschema #2 from the request property anyOf list

    • info

      added subschema #1 subschema #2 to the request property anyOf list

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property / became nullable for the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status