Document Recognize

Extracts personal data from a photo of an identity document (passport, ID card, etc.). OCR is applied to both MRZ and visual zones where available.

This endpoint only performs document recognition and parsing — no face or selfie comparison.

Endpoint

POST https://cloud.ooto-ai.com/api/v1.0/recognize

Request Format

  • Method: POST

  • Content-Type: multipart/form-data

Authentication Headers

To access the API, you need to include the following headers in your request:

  • APP-ID: Your application's unique identifier.

  • APP-KEY: Your application's authentication key.

Form Data

Field

Type

Required

Description

doc_image

File

Yes

JPEG or PNG photo of the document

Example

curl -X POST --location 'https://cloud.ooto-ai.com/api/v1.0/recognize' \
--header 'APP-ID: put_app_id_here' \
--header 'APP-KEY: put_app_key_here' \
--form 'doc_image=@"/path/to/doc_image"'

Replace «app_id», «app_key» with your actual credentials and the path to your doc image.

Successful Response (HTTP 200)

{
    "transactionId": "string",
    "result": {
        {
            "doc": "string",
            "ocr": {
              "countryName": "string",
              "countryName_local": "string",
              "dateOfBirth": "string",
              "dateOfIssue": "string",
              "dateOfExpiration": "string",
              "IDPlaceOfBirthCountry": "string",
              "givenNames": "string",
              "givenNames_local": "string",
              "surname": "string",
              "surname_local": "string",
              "identityCardNumber": "string",
              "issuingStateCode": "string",
              "sex": "string",
              "mrz": "string",
              "bookletNumber": "string",
              "citizenshipStatus": "string",
              "nationality": "string",
              "height_cm": 0,
              "weight_kg": 0,
              "eyes": "string"
            },
            "position": {
              "x": 0,
              "y": 0,
              "w": 0,
              "h": 0,
              "angle": 0
            },
            "portrait": {
              "x": 0,
              "y": 0,
              "w": 0,
              "h": 0,
              "angle": 0
            }
      }
}

Error response (HTTP 400)

{
  "transactionId": "efb66e50-4c87-493d-b026-543dacdbe314",
  "result": {
    "status": "error",
    "code": 5,
    "info": "can not detect document"
  }
}

Engine Errors

Code

Info

201

can not detect document

202

more than one document detected

203

can not make OCR for document, try to make another shot

204

photo should not be empty

205

wrong mime-type in input data

206

photo size is 0 bytes

207

can not decode image, check it is valid jpeg or png file

208

can not find portrait on document

209

insufficient resolution of the photo

Notes

  • Input image must show the entire document

  • MRZ and portrait detection are both required for best results

  • Resolution should be high enough for text to be clearly readable

Last updated