tencent cloud

All product documents
RecognizeBrazilDriverLicenseOCR
Last updated: 2025-02-19 11:58:40
RecognizeBrazilDriverLicenseOCR
Last updated: 2025-02-19 11:58:40

1. API Description

Domain name for API request: ocr.intl.tencentcloudapi.com.

This interface supports identification of the front and back of Brazilian driver's license. The identification fields include name, driver's license category, number, validity period, etc.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

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: RecognizeBrazilDriverLicenseOCR.
Version Yes String Common Params. The value used for this API: 2018-11-19.
Region No String Common Params. This parameter is not required.
ImageBase64 No String The Base64 value of the image. It is required that the image after Base64 encoding should not exceed 7M, the resolution is recommended to be 500*800 or above, and PNG, JPG, JPEG, and BMP formats are supported. It is recommended that the card part occupies at least 2/3 of the picture. One of ImageUrl and ImageBase64 of the image must be provided. If both are provided, only ImageUrl will be used.
BackImageBase64 No String The Base64 value of the image. It is required that the image after Base64 encoding should not exceed 7M, the resolution is recommended to be 500*800 or above, and PNG, JPG, JPEG, and BMP formats are supported. It is recommended that the card part occupies at least 2/3 of the picture. One of ImageUrl and ImageBase64 of the image must be provided. If both are provided, only ImageUrl will be used.
ImageUrl No String The URL address of the image. It is required that the image after Base64 encoding should not exceed 7M, the resolution is recommended to be 500*800 or above, and PNG, JPG, JPEG, and BMP formats are supported. It is recommended that the card part occupies at least 2/3 of the picture. It is recommended that images be stored in Tencent Cloud to ensure higher download speed and stability.
BackImageUrl No String The URL address of the image. It is required that the image after Base64 encoding should not exceed 7M, the resolution is recommended to be 500*800 or above, and PNG, JPG, JPEG, and BMP formats are supported. It is recommended that the card part occupies at least 2/3 of the picture. It is recommended that images be stored in Tencent Cloud to ensure higher download speed and stability.
CropPortrait No Boolean Picture switch. The default is false, and the base64 encoding of the avatar photo is not returned. When set to true, the base64 encoding of the portrait photo is returned.

3. Output Parameters

Parameter Name Type Description
NOME String Name
CatHab String Driving license type
CNHNumber String CNH number
VALIDADE String Valid date
QUALIFICATION String Qualification
IDENTIDADE String ID number
CPF String CPF
NASCIMENTO String Birthday
MEMBERSHIP String Membership
REGISTRO String Registration number
OBSERVATIONS String Remark
IssueDate String Issue date
LOCAL String Issue location
BackNumber String Number in the back of the card
AdvancedInfo String Field confidence
PortraitImage String PortraitImage base64
RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 RecognizeBrazilDriverLicenseOCR example

Input Example

POST / HTTP/1.1
Host: ocr.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: RecognizeBrazilDriverLicenseOCR
<public parameter>

{
    "ImageBase64": "/9j/4AAQSkZJRg.....s97n//2Q=="
}

Output Example

{
    "Response": {
        "AdvancedInfo": "{\"NOME\":0.71914065,\"CatHab\":0.46235353,\"CNHNumber\":0.64985657,\"VALIDADE\":0.73679197,\"QUALIFICATION\":0.7534424,\"IDENTIDADE\":0.7685954,\"CPF\":0.74205434,\"NASCIMENTO\":0.73850095,\"MEMBERSHIP\":0.8054733,\"REGISTRO\":0.67544556}",
        "CNHNumber": "235*****10",
        "CPF": "238.550.758-75",
        "CatHab": "B",
        "IDENTIDADE": "F048055D DIREX EX",
        "MEMBERSHIP": "JINJI PAN/WEIHONG CHEN",
        "NASCIMENTO": "28/03/1992",
        "NOME": "ZHAOLIN PAN",
        "PortraitImage": "",
        "QUALIFICATION": "23/05/2012",
        "REGISTRO": "07343723357",
        "RequestId": "667fbb53-8bf9-46e2-b411-e53ae8cea7e1",
        "VALIDADE": "07/08/2024"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

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.EmptyImageError The image is empty.
FailedOperation.ImageDecodeFailed Image decoding failed.
FailedOperation.OcrFailed OCR failed.
FailedOperation.UnOpenError The service is not activated.
InvalidParameterValue.InvalidParameterValueLimit Incorrect parameter value.
LimitExceeded.TooLargeFileError The file is too large.
ResourcesSoldOut.ChargeStatusException Exceptional billing status.
UnknownParameter
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 available.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon