
Surat Izin Mengemudi (SIM)
SIM is a driver license issued in Indonesia.
Before using the SIM OCR service, please review the OCR limitations that may affect text recognition accuracy.
SIM Object
- Name
status- Type
- string
- Description
Enum code indicating the status of the reading result.
SUCCESSNO_FILEFILE_INVALID_FORMATFAILED
- Name
reason- Type
- string
- Description
A human-readable message providing more details about the reading result.
- Name
read- Type
- object
- Description
Contains the reading for each SIM fields. Each field contains:
confidence_text(number): Text recognition confidence in percentageconfidence(number): Overall confidence score in percentagepolygon(array): Array of coordinate pairs[x, y]representing the bounding box of the fieldvalue_original(string): The original text as read from the documentvalue(string): The processed/extracted valuepage_index(number): Page number where the field was found (0-indexed)
- Name
alamat- Type
- object
- Description
Address.
- Name
berlaku- Type
- object
- Description
Expiration date.
- Name
foto- Type
- object
- Description
Face image in
base64format.
- Name
golongan_darah- Type
- object
- Description
Blood type.
- Name
jenis_kelamin- Type
- object
- Description
Sex.
- Name
nama- Type
- object
- Description
Name.
- Name
nomor_sim- Type
- object
- Description
SIM number.
- Name
pekerjaan- Type
- object
- Description
Job.
- Name
tanda_tangan- Type
- object
- Description
Signature image in
base64format.
- Name
tanggal_lahir- Type
- object
- Description
Date of birth.
- Name
tempat_lahir- Type
- object
- Description
Place of birth.
- Name
tinggi- Type
- object
- Description
Owner's height.
- Name
tipe_sim- Type
- object
- Description
SIM type.
- Name
wilayah- Type
- object
- Description
Region.
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
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
{
"read": {
"alamat": {
"confidence_text": 99.00,
"confidence": 93.00,
"polygon": [
[557, 570],
[770, 570],
[770, 595],
[557, 595]
],
"value_original": "MANGGAR RAYA RT.004 RW.009 KAB. BANYUASIN",
"value": "MANGGAR RAYA RT.004 RW.009 KAB. BANYUASIN",
"page_index": 0
},
"berlaku": {
"confidence_text": 99.00,
"confidence": 96.00,
"polygon": [
[984, 669],
[1129, 669],
[1129, 693],
[984, 693]
],
"value_original": "23-11-2022",
"value": "23-11-2022",
"page_index": 0
},
"foto": {
"value": "iVBO...",
"confidence": 40.99,
"polygon": [
[769, 457],
[786, 124],
[1042, 138],
[1024, 471]
],
"page_index": 0
},
"golongan_darah": {
"confidence_text": 99.00,
"confidence": 97.00,
"polygon": [
[557, 463],
[591, 463],
[591, 489],
[557, 489]
],
"value_original": "AB",
"value": "AB",
"page_index": 0
},
...
},
"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.",
//...,
}