tencent cloud

APIs

RecognizeBrazilDriverLicenseOCR

Unduh
Mode fokus
Ukuran font
Terakhir diperbarui: 2026-07-02 16:21:53

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.
LicenceVersion No String Version of the driver's license image.
Valid values:
OLD (old version),
NEW (new version).
The default value is OLD.

3. Output Parameters

Parameter Name Type Description
NOME String Name of the license holder.
CatHab String Driver's license category.
CNHNumber String Driver's license number (CNH).
VALIDADE String Validity date (valid until).
QUALIFICATION String Qualification information.
IDENTIDADE String ID number (Identity document number).
CPF String CPF
NASCIMENTO String Date of birth.
MEMBERSHIP String Membership
REGISTRO String Registration number
OBSERVATIONS String Remarks
IssueDate String Date of issue.
LOCAL String Place of issue.
BackNumber String Registration number on the back of the card.
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

RecognizeBrazilDriverLicenseOCR

Input Example

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

{
    "ImageBase64": "/9j/4AAQSkZJRg.....s97n//2Q==",
    "ImageUrl": "",
    "BackImageBase64": "/9j/4AAQSkZJRg.....s97n//2Q==",
    "BackImageUrl": ""
}

Output Example

{
    "Response": {
        "AdvancedInfo": "{\"BackNumber\":\"1.0000\",\"CNHNumber\":\"1.0000\",\"CPF\":\"1.0000\",\"CatHab\":\"1.0000\",\"IDENTIDADE\":\"1.0000\",\"IssueDate\":\"1.0000\",\"LOCAL\":\"1.0000\",\"MEMBERSHIP\":\"1.0000\",\"NASCIMENTO\":\"1.0000\",\"NOME\":\"1.0000\",\"QUALIFICATION\":\"1.0000\",\"REGISTRO\":\"1.0000\",\"VALIDADE\":\"1.0000\"}",
        "BackNumber": "99999999999/XX222222222",
        "CNHNumber": "000000000",
        "CPF": "999.999.999-99",
        "CatHab": "XXX",
        "IDENTIDADE": "X000000000000000000000X-UF",
        "IssueDate": "",
        "LOCAL": "X000000000000000000000000X-UF",
        "MEMBERSHIP": "X000000000000000000000000000X",
        "NASCIMENTO": "00/00/0000",
        "NOME": "CARTEIRA NACIONAL DE HABILITACAO/DRIVING LICENCE/PERMIS DE CONDUIRE",
        "OBSERVATIONS": "",
        "PortraitImage": "",
        "QUALIFICATION": "01/01/1900",
        "REGISTRO": "99999999989",
        "RequestId": "8a328bfd-cea1-4532-8c3d-1b170e5dff43",
        "VALIDADE": "01/01/1900"
    }
}

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 Failed to download the file.
FailedOperation.EmptyImageError The image is empty.
FailedOperation.ImageDecodeFailed Failed to decode the image.
FailedOperation.OcrFailed OCR recognition failed. This error may be caused by unstable network connections, service anomalies, or other issues.
FailedOperation.UnOpenError The service has not been activated.
InvalidParameterValue.InvalidParameterValueLimit Incorrect parameter value.
LimitExceeded.TooLargeFileError The file size exceeds the limit
ResourcesSoldOut.ChargeStatusException The billing status is abnormal.
UnknownParameter Unknown parameter error.

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan