post https://api.instantpay.in/identity/faceAnalysis
Face Detection & Analysis APIs can help you to detect and analyze faces in images and videos. This section provides an overview of the non-storage operations for facial analysis. These operations include functionalities like detecting facial landmarks, analyzing emotions, and comparing faces. Facial Detection & Analysis APIs can identify facial landmarks (e.g., eye position), detect emotions (e.g., happiness or sadness), and other attributes (e.g., glasses presence, face occlusion). When a face is detected, the system analyzes facial attributes and returns a confidence score for each attribute.
Header Parameters
Name | Type | Description | Mandatory (M) , Optional (O) | Provided by INSTANTPAY (Y/N) |
---|---|---|---|---|
X-Ipay-Auth-Code | String | Auth Code -1 (Fixed) | M | Y |
X-Ipay-Client-Id | String | Unique Client ID | M | Y |
X-Ipay-Client-Secret | String | Unique secret key | M | Y |
X-Ipay-Endpoint-Ip | String | End Customer IP Address | M | N |
Request Parameters
Name | Type | Mandatory (M) , Optional (O) | Description |
---|---|---|---|
image | multipart/form-data | M | Upload single image. It must be .jpeg or .png and no larger than 5mb. |
latitude | String | M | Current location latitude |
longitude | String | M | Current location longitude |
externalRef | String | M | Your Unique Transaction Id |
Sample Request
curl --location 'https://api.instantpay.in/identity/faceAnalysis' \
--header 'X-Ipay-Auth-Code: {{authCode}}' \
--header 'X-Ipay-Client-Id: {{clientId}}' \
--header 'X-Ipay-Client-Secret: {{clientSecret}}' \
--header 'X-Ipay-Endpoint-Ip: {{endPointIP}}' \
--form 'image=@"/Users/rajvir/Downloads/download (2).jpeg"' \
--form 'latitude="0"' \
--form 'longitude="0"' \
--form 'externalRef="1709630255"'
POST /identity/faceAnalysis HTTP/1.1
Host: api.instantpay.in
X-Ipay-Auth-Code: 1
X-Ipay-Client-Id: YWY3OTAzYzNlM2ExZTJlOfh549Gzt+5IEcETrD5Yx+Q=
X-Ipay-Client-Secret: 82e4755d7c1cf636816addfe1460936d7b64612208df87f3000aa5b56fc926d1
X-Ipay-Endpoint-Ip: 14.142.186.142
Content-Length: 476
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="image"; filename="download (2).jpeg"
Content-Type: image/jpeg
(data)
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="latitude"
0
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="longitude"
0
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="externalRef"
1709630236
------WebKitFormBoundary7MA4YWxkTrZu0gW--
Response Parameters
Name | Type | Description |
---|---|---|
statuscode | String | InstantPay Status Code |
actcode | String | Action Code |
status | String | Status message |
data | Array | Response Data (If Present) |
timestamp | String | Current time (YYYY-MM-DD HH:II:SS) |
ipay_uuid | String | Request reference number |
orderid | String | Transaction Id ( If transaction otherwise it is null ) |
environment | String | Live/Sandbox |
Note :
- externalRef must be unique and in alpha numeric characters.
- Click here for guidelines for entering data in latitude/ longitude parameter.
Sample Response
{
"statuscode": "TXN",
"actcode": null,
"status": "Sucesses",
"data": {
"faceAnalysisData": {
"faceDetails": [
{
"BoundingBox": {
"Width": 0.47787919640541077,
"Height": 0.36140406131744385,
"Left": 0.354006826877594,
"Top": 0.32657408714294434
},
"AgeRange": {
"Low": 23,
"High": 31
},
"Smile": {
"Value": false,
"Confidence": 99.93019104003906
},
"Eyeglasses": {
"Value": true,
"Confidence": 99.99998474121094
},
"Sunglasses": {
"Value": true,
"Confidence": 85.56258392333984
},
"Gender": {
"Value": "Male",
"Confidence": 99.99976348876953
},
"Beard": {
"Value": true,
"Confidence": 99.74595642089844
},
"Mustache": {
"Value": true,
"Confidence": 89.1291732788086
},
"EyesOpen": {
"Value": true,
"Confidence": 98.76644134521484
},
"MouthOpen": {
"Value": false,
"Confidence": 92.4822769165039
},
"Emotions": [
{
"Type": "CALM",
"Confidence": 76.41015625
},
{
"Type": "SURPRISED",
"Confidence": 24.88024139404297
},
{
"Type": "CONFUSED",
"Confidence": 0.13856887817382812
},
{
"Type": "HAPPY",
"Confidence": 0.017245609313249588
},
{
"Type": "FEAR",
"Confidence": 0.01043081283569336
},
{
"Type": "DISGUSTED",
"Confidence": 0.0056743621826171875
},
{
"Type": "SAD",
"Confidence": 0.0005960464477539062
},
{
"Type": "ANGRY",
"Confidence": 0.0003039836883544922
}
],
"Landmarks": [
{
"Type": "eyeLeft",
"X": 0.5139376521110535,
"Y": 0.4526228904724121
},
{
"Type": "eyeRight",
"X": 0.710635781288147,
"Y": 0.47408267855644226
},
{
"Type": "mouthLeft",
"X": 0.49215957522392273,
"Y": 0.5892491936683655
},
{
"Type": "mouthRight",
"X": 0.6558822393417358,
"Y": 0.606961190700531
},
{
"Type": "nose",
"X": 0.6081581115722656,
"Y": 0.5351571440696716
},
{
"Type": "leftEyeBrowLeft",
"X": 0.4419383406639099,
"Y": 0.4145109951496124
},
{
"Type": "leftEyeBrowRight",
"X": 0.571074366569519,
"Y": 0.41815200448036194
},
{
"Type": "leftEyeBrowUp",
"X": 0.5124735236167908,
"Y": 0.40497758984565735
},
{
"Type": "rightEyeBrowLeft",
"X": 0.6847994923591614,
"Y": 0.4304831027984619
},
{
"Type": "rightEyeBrowRight",
"X": 0.7860072255134583,
"Y": 0.4516712427139282
},
{
"Type": "rightEyeBrowUp",
"X": 0.7414773106575012,
"Y": 0.42975348234176636
},
{
"Type": "leftEyeLeft",
"X": 0.47616133093833923,
"Y": 0.4483692944049835
},
{
"Type": "leftEyeRight",
"X": 0.5519837141036987,
"Y": 0.4582386910915375
},
{
"Type": "leftEyeUp",
"X": 0.5156591534614563,
"Y": 0.4459407925605774
},
{
"Type": "leftEyeDown",
"X": 0.5126113891601562,
"Y": 0.4587348401546478
},
{
"Type": "rightEyeLeft",
"X": 0.6709408760070801,
"Y": 0.4712192416191101
},
{
"Type": "rightEyeRight",
"X": 0.7436281442642212,
"Y": 0.47733715176582336
},
{
"Type": "rightEyeUp",
"X": 0.7136553525924683,
"Y": 0.4674704372882843
},
{
"Type": "rightEyeDown",
"X": 0.7079180479049683,
"Y": 0.4799041748046875
},
{
"Type": "noseLeft",
"X": 0.5553070306777954,
"Y": 0.5452377796173096
},
{
"Type": "noseRight",
"X": 0.6291264891624451,
"Y": 0.5530794262886047
},
{
"Type": "mouthUp",
"X": 0.5846152901649475,
"Y": 0.5807806253433228
},
{
"Type": "mouthDown",
"X": 0.5704997181892395,
"Y": 0.6207622289657593
},
{
"Type": "leftPupil",
"X": 0.5139376521110535,
"Y": 0.4526228904724121
},
{
"Type": "rightPupil",
"X": 0.710635781288147,
"Y": 0.47408267855644226
},
{
"Type": "upperJawlineLeft",
"X": 0.3677027225494385,
"Y": 0.4430592954158783
},
{
"Type": "midJawlineLeft",
"X": 0.3689058721065521,
"Y": 0.5899165272712708
},
{
"Type": "chinBottom",
"X": 0.5430694222450256,
"Y": 0.6886668801307678
},
{
"Type": "midJawlineRight",
"X": 0.7226397395133972,
"Y": 0.627454936504364
},
{
"Type": "upperJawlineRight",
"X": 0.8014124631881714,
"Y": 0.48964956402778625
}
],
"Pose": {
"Roll": 10.587671279907227,
"Yaw": 6.88578462600708,
"Pitch": 4.731213569641113
},
"Quality": {
"Brightness": 71.47499084472656,
"Sharpness": 83.14741516113281
},
"Confidence": 99.99774932861328,
"FaceOccluded": {
"Value": true,
"Confidence": 99.98448944091797
},
"EyeDirection": {
"Yaw": 2.0819785594940186,
"Pitch": -11.89595890045166,
"Confidence": 0.0021970816887915134
}
}
],
"landmarks": null
},
"pool": {
"referenceId": "1240305124309MTGCT",
"openingBalance": "25.10",
"paymentAmount": "0.00",
"mode": "DR",
"closingBalance": "25.10"
}
},
"timestamp": "2024-03-05 12:43:09",
"ipay_uuid": "h0689b7d41e7-2d45-4ce1-89d8-08262e2e6261-9WFBnBuHmmn9",
"orderid": "1240305124309MTGCT",
"environment": "LIVE",
"internalCode": null
}