
Plat nomor (License Plate)
License plate for vehicle issued in Indonesia.
Before using the License Plate OCR service, please review the OCR limitations that may affect text recognition accuracy.
License Plate Object
- Name
status
- Type
- string
- Description
Enum code indicating the status of the reading result.
SUCCESS
NO_FILE
FILE_INVALID_FORMAT
FAILED
- Name
reason
- Type
- string
- Description
A human-readable message providing more details about the reading result.
- Name
read
- Type
- object
- Description
Contains the reading of the plate number.
- Name
plates
- Type
- array of object
- Description
Contains the reading of the plate number.
- Name
text
- Type
- string
- Description
Plate number
Read Plate
Detects a valid Plate image and returns the information as text.
Required parameter
- Name
image
- Type
- file (.png, .jpg, .jpeg)
- Description
The image file for the Plate.
Sample Request
1
2
3
4
5
import { Vision } from '@glair/vision';
const vision = new Vision({ apiKey: 'api-key', username: 'username', password: 'password' });
await vision.ocr.licensePlate({ image: '/path/to/image/Plate.jpg' });
Sample Response
1
2
3
4
5
6
7
8
9
10
11
{
"status": "SUCCESS",
"reason": "File Successfully Read",
"read": {
"plates": [
{
"text": "KH 8041 GG"
}
]
}
}
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 Plate image
Response
1
2
3
4
5
{
"status": "SUCCESS",
"reason": "File Successfully Read",
//...,
}
200 - OK
Request with non Plate image
Response
1
2
3
4
5
{
"status": "SUCCESS",
"reason": "File successfully read. Some fields are invalid.",
//...,
}
400 - Bad Request
Request without form-data image
Response
1
2
3
4
5
{
"status": "NO_FILE",
"reason": "No file in request body",
//...,
}
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",
//...,
}