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.
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. |
| 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. |
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
}{
"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
}
}
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. 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. |
文档反馈