Background supergraphic

Surat Izin Mengemudi (SIM)

SIM is a driver license issued in Indonesia.

SIM Object

  • Name
    status
    Type
    string
    Description

    Enum code indicating the status of the reading result.

    1. SUCCESS
    2. NO_FILE
    3. FILE_INVALID_FORMAT
    4. FAILED
  • Name
    reason
    Type
    string
    Description

    A human-readable message providing more details about the reading result.

  • Name
    images
    Type
    object
    Description

    Contains the cropped image (in base64 format) of SIM's face and signature.

    • Name
      photo
      Type
      string
      Description

      Face in base64 format.

    • Name
      sign
      Type
      string
      Description

      Signature in base64 format.

  • Name
    read
    Type
    object
    Description

    Contains the reading for each SIM fields. Each fields has confidence (in percentage) and value (the reading).

    • Name
      alamat
      Type
      object
      Description

      Address.

    • Name
      berlaku
      Type
      object
      Description

      Expiration date.

    • Name
      golonganDarah
      Type
      object
      Description

      Blood type.

    • Name
      jenisKelamin
      Type
      object
      Description

      Sex.

    • Name
      nama
      Type
      object
      Description

      Name.

    • Name
      nomorSim
      Type
      object
      Description

      SIM number.

    • Name
      pekerjaan
      Type
      object
      Description

      Job.

    • Name
      tanggalLahir
      Type
      object
      Description

      Date of birth.

    • Name
      tempatLahir
      Type
      object
      Description

      Place of birth.

    • Name
      tinggi
      Type
      object
      Description

      Owner's height.

    • Name
      tipeSim
      Type
      object
      Description

      SIM type.

    • Name
      wilayah
      Type
      object
      Description

      Region.


POST/ocr/v1/sim

Read SIM

Detects a valid SIM image and returns the information as text.

Required parameter

  • Name
    image
    Type
    file (.png, .jpg, .jpeg)
    Description

    The image file for the SIM.

Sample Request

POST
/ocr/v1/sim
1
2
3
4
curl -v -L -X POST 'https://api.vision.glair.ai/ocr/v1/sim' \ -H "Authorization: Basic $(printf "%s" "USERNAME:PASSWORD" | base64)" \ -H 'x-api-key: API_KEY' \ -F 'image=@"/path/to/image/SIM.jpg"'

Sample Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{ "read": { "alamat": { "confidence": 97, "value": "KP.KERANG RT.01/01 KEL.ASRI" }, "berlaku": { "confidence": 99, "value": "01-02-2014" }, "golongan_darah": { "confidence": 38, "value": "" }, "jenis_kelamin": { "confidence": 99, "value": "PRIA" }, "nama": { "confidence": 99, "value": "INDRA BUDI" }, "nomor_sim": { "confidence": 99, "value": "751234567898" }, "pekerjaan": { "confidence": 99, "value": "PEG.SWASTA" }, "tanggal_lahir": { "confidence": 99, "value": "07-08-197" }, "tempat_lahir": { "confidence": 99, "value": "JAKARTA" }, "tinggi": { "confidence": 0, "value": "165 cm" }, "tipe_sim": { "confidence": 99, "value": "C" }, "wilayah": { "confidence": 99, "value": "METRO JAYA" } }, "images": { "photo": "sdjJaw...", "sign": "oP1<==..." }, "reason": "File successfully read.", "status": "SUCCESS" }

Request ID

An associated request identifier is generated for every request made to this endpoint. This value can be found in the response headers under Request-Id


Responses

Various responses for this endpoint, in addition to general responses specified in Errors.

200 - OK

Request with readable SIM image

Response

1
2
3
4
5
{ "status": "SUCCESS", "reason": "File successfully read.", //..., }

400 - Bad Request

Request without form-data image

Response

1
2
3
4
5
{ "status": "NO_FILE", "reason": "No file in request body. Some fields are invalid.", //..., }

415 - Unsupported Media Type

Request with non-image file format

Response

1
2
3
4
5
{ "status": "FILE_INVALID_FORMAT", "reason": "Failed to process invalid file format. Please upload the correct file format. Some fields are invalid.", //..., }