Domain name for API request: ocr.tencentcloudapi.com.
This API is used to recognize a Philippine driver's license.
A maximum of 20 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
Parameter Name | Required | Type | Description |
---|---|---|---|
Action | Yes | String | Common Params. The value used for this API: RecognizePhilippinesDrivingLicenseOCR. |
Version | Yes | String | Common Params. The value used for this API: 2018-11-19. |
Region | No | String | Common Params. This parameter is not required for this API. |
ImageBase64 | No | String | The Base64-encoded value of an image. Supported image formats: PNG, JPG, and JPEG. GIF is currently not supported. Supported image size: The downloaded image after Base64 encoding can be up to 7 MB. The download time of the image cannot exceed 3s. Either the ImageUrl or ImageBase64 of the image must be provided. If both are provided, only ImageUrl will be used. |
ImageUrl | No | String | The URL of the image. Supported image formats: PNG, JPG, and JPEG. GIF is currently not supported. Supported image size: The downloaded image after Base64 encoding can be up to 7 MB. The download time of the image cannot exceed 3s. We recommend that you store the image in Tencent Cloud for higher download speed and stability. For a non-Tencent Cloud URL, the download speed and stability may be affected. |
ReturnHeadImage | No | Boolean | Whether to return the identity photo. |
Parameter Name | Type | Description |
---|---|---|
HeadPortrait | TextDetectionResult | The Base64-encoded identity photo. |
Name | TextDetectionResult | The full name. |
LastName | TextDetectionResult | The last name. |
FirstName | TextDetectionResult | The first name. |
MiddleName | TextDetectionResult | The middle name. |
Nationality | TextDetectionResult | The nationality. |
Sex | TextDetectionResult | The gender. |
Address | TextDetectionResult | The address. |
LicenseNo | TextDetectionResult | The license No. |
ExpiresDate | TextDetectionResult | The expiration date. |
AgencyCode | TextDetectionResult | The agency code. |
Birthday | TextDetectionResult | The date of birth. |
RequestId | String | The unique request ID, which is returned for each request. RequestId is required for locating a problem. |
POST / HTTP/1.1
Host: ocr.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: RecognizePhilippinesDrivingLicenseOCR
<Common request parameters>
{
"ReturnHeadImage": "true",
"ImageUrl": "https://xx/a.jpg"
}
{
"Response": {
"Address": {
"Polygon": [
{
"X": "442",
"Y": "489"
},
{
"X": "529",
"Y": "489"
},
{
"X": "529",
"Y": "506"
},
{
"X": "442",
"Y": "506"
}
],
"Value": "28 PAYAPA ST BAGONG DIWA"
},
"AgencyCode": {
"Polygon": [],
"Value": ""
},
"Birthday": {
"Polygon": [],
"Value": ""
},
"ExpiresDate": {
"Polygon": [],
"Value": ""
},
"FirstName": {
"Polygon": [],
"Value": ""
},
"HeadPortrait": {
"Polygon": [],
"Value": ""
},
"LastName": {
"Polygon": [],
"Value": ""
},
"LicenseNo": {
"Polygon": [],
"Value": ""
},
"MiddleName": {
"Polygon": [],
"Value": ""
},
"Name": {
"Polygon": [],
"Value": ", "
},
"Nationality": {
"Polygon": [],
"Value": ""
},
"RequestId": "1234-1234-1234-1234",
"Sex": {
"Polygon": [],
"Value": ""
}
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
Error Code | Description |
---|---|
FailedOperation.DownLoadError | File download failed. |
FailedOperation.ImageDecodeFailed | Image decoding failed. |
FailedOperation.OcrFailed | OCR failed. |
FailedOperation.UnKnowError | Unknown error. |
FailedOperation.UnOpenError | The service is not activated. |
InvalidParameter.EngineImageDecodeFailed | Image decoding failed. |
InvalidParameterValue.InvalidParameterValueLimit | Incorrect parameter value. |
LimitExceeded.TooLargeFileError | The file is too large. |
ResourcesSoldOut.ChargeStatusException | Exceptional billing status. |
Was this page helpful?