tencent cloud

RecognizeBrazilCommonOCR
最后更新时间:2025-08-27 19:46:05
RecognizeBrazilCommonOCR
最后更新时间: 2025-08-27 19:46:05

1. API Description

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

This API is used to identify Brazil common documents.

This API is used to set the default request rate limit to 5 requests/second.

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: RecognizeBrazilCommonOCR.
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. supported image formats: PNG, JPG, JPEG. GIF format is not currently supported. supported image size: no more than 7M after encoding. image download time: no more than 3 seconds.
ImageUrl No String The Url of the image. supported image formats: PNG, JPG, JPEG. GIF format is not currently supported. supported image size: no more than 7M after Base64 encoding. image download time is no more than 3 seconds. urls stored in tencent cloud guarantee higher download speed and stability. it is advisable to store images in tencent cloud. urls not stored in tencent cloud may possibly be impacted in speed and stability.
BackImageBase64 No String The Base64 value of the back side of the card. supported image formats: PNG, JPG, JPEG. GIF format is not currently supported. supported image size: no more than 7M after encoding. image download time: not more than 3 seconds. either ImageUrl or ImageBase64 must be provided. if both are provided, only use ImageUrl.
BackImageUrl No String The Url address of the back side of the card. supported image formats: PNG, JPG, JPEG. GIF format is not currently supported. supported image size: no more than 7M after Base64 encoding. image download time is no more than 3 seconds. urls stored in tencent cloud guarantee higher download speed and stability. it is recommended to store images in tencent cloud. speed and stability of non-tencent cloud storage urls may be impacted.
ReturnHeadImage No Boolean Specifies whether to return the portrait photo.

3. Output Parameters

Parameter Name Type Description
Type Integer Specifies the type of document in brazil. valid values: 1. RNE 2. RNM 3. IDCard 4. DrivingLicense.
Result BrazilCardInfo Identifies the content of a brazil document.
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 RecognizeBrazilCommonOCR

Input Example

POST / HTTP/1.1
Host: ocr.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: RecognizeBrazilCommonOCR
<Common request parameters>

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

Output Example

{
    "Response": {
        "RequestId": "1205024c-6938-4a91-b413-c91f218f9633",
        "Result": {
            "DriverLicense": null,
            "IDCard": {
                "CPF": "",
                "DNI": "",
                "DataNascimento": "11/09/1977",
                "DispatchDate": "",
                "DocOrigem": "",
                "Fatorrh": "",
                "IssuingAgency": "SSP-SP",
                "MemberShip": "EEEE AAA/CCCC AAAA BBB DDD",
                "NaturalIDade": "S.AAAA- AA",
                "Nome": "CCC DDD EEEE AAA",
                "Observations": "",
                "PortraitImage": "",
                "Registro": "",
                "RegistroGeral": ""
            },
            "RNE": null,
            "RNM": null
        },
        "Type": 3
    }
}

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.ImageDecodeFailed Image decoding failed.
FailedOperation.OcrFailed OCR failed. This error may be caused by unstable network connections,service anomalies or other issues.
FailedOperation.UnKnowError Unknown error.
FailedOperation.UnOpenError The service is not activated.
LimitExceeded.TooLargeFileError The file is too large.
ResourceUnavailable.ResourcePackageRunOut The account resource package is exhausted.
本页内容是否解决了您的问题?
您也可以 联系销售 提交工单 以寻求帮助。

文档反馈