INTERESTED ?
Title
Create new category
Edit page index title
Edit category
Edit link
ID Classification API
Use Attestr AI / ML model for instant classification and recognition of identity document images.
Image Constraints
Following images constraints are enforced for better accuracy of classification algorithm.
- Maximum allowed image size is 10 MB.
- Minimum image dimensions are 200 x 200 pixels.
- Only JPEG and PNG images are supported.
To start a chat, click the button below, and one of our available executives will assist you with questions about onboarding and commercials.
In order to ensure continued compliance with the Digital Personal Data Protection Act, 2023 (DPDP Act), we are implementing DPDP V3 (Consent-Driven Processing). Under this framework, clients are required to obtain explicit, informed, and verifiable consent from the data principal prior to accessing, processing, viewing, or storing any personal data through the platform. This regulatory transition may require modifications to existing configurations and workflows. Clients are advised to review and update their implementations to ensure ongoing compliance with applicable data protection obligations. Further information regarding this transition can be enquired here. Learn more about this change here.
API Details
Request
| Type | URL |
|---|---|
| Post | https://api.attestr.com/api/{version}/public/xtract/classify |
Request Body Parameters
| Type | Name | Description | Optional (Default) | Min Version | Max Version |
|---|---|---|---|---|---|
| String | src | Media document ID | Required | v1 | |
| String | label | label to identify. Following labels are supported. UIDAI - For Aadhaar document PAN - For PAN card PP - For passport | Required | v1 | |
| Number | threshold | Threshold value. Classification is considered valid for the input label if output confidence is more than specified threshold value. Allowed values are float number 0.1 to 1.0 with 1 digit precision after decimal. | Optional | v1 |
Request Header Parameters
| Type | Name | Value / Description | Optional | Min Version | Max Version |
|---|---|---|---|---|---|
| String | Content-Type | application/json | Required | v1 | |
| String | Authorization | Basic {authToken} | Required | v1 |
If you do not have the authentication token, please refer to Register App to generate one.
Sample Request
{ "src": "MX11d8esbv8kr6f2wto", "threshold": 0.5, "label": "UIDAI"}Response
Http Status Code 200
| Key | Description | Type | Min Version | Max Version |
|---|---|---|---|---|
| valid | Boolean to check if the input media image matches the specified input label. False if the label does not match. | Boolean | v1 | |
| confidence | Confidence outcome from AI model while predicting the image type, specifies how likely the image matches the input label. | Number | v1 | |
| label | Same as input label | String | v1 | |
| suggestedLabel | The suggested label for the input media document, if the input label does not match. The possible values are UIDAI, PAN, PP, OTHER. | String | v1 | |
| suggestedLabelConfidence | Confidence level for the suggested label if available | Number | v1 |
Sample Response
Valid Match
{ "valid": true, "confidence": 0.88839, "label": "UIDAI", "suggestedLabel": null, "suggestedLabelConfidence": null}Invalid Match
{ "valid": false, "confidence": 0.1500, "label": "UIDAI", "suggestedLabel": "PAN" "suggestedLabelConfidence": 0.8500}Error Response
| Parameter | Type | Description |
|---|---|---|
| code | Number | Unique error codes for different errors. Always available. |
| message | String | Error message describing the error. Always Available. |
| details | String | Detail error message. Available only for certain types of errors. |
Error Codes
| HTTP Status | Error Code | Error Message |
|---|---|---|
| 400 | 4001 | Malformed data or missing required parameter values |
| 400 | 4005 | Operation could not be performed due to low credits balance |
| 401 | 4016 | Invalid client authorization |
| 403 | 4031 | Unauthorized access |
| 403 | 4035 | Requested service is not provisioned for your account |
| 403 | 4039 | Client's IP address is not whitelisted |
| 429 | 4291 | Maximum account rate limit exceeded |
| 429 | 4292 | Maximum API rate limit exceeded |
| 429 | 4293 | Maximum account daily limit exceeded |
| 429 | 4294 | Maximum API daily limit exceeded |
| 500 | 5001 | Request could not be processed |
Sample Error Response
{ "httpStatusCode": 400, "code": 4001, "message": "Malformed data or missing required parameter values"}INTERESTED ?
To start a chat, click the button below, and one of our available executives will assist you with questions about onboarding and commercials.
Copyright © Attestr