HintCode Facial Recognition API

About


The purpose of the HintCode Facial Recognition API (the "API") is to expose a web-accessible method of facial recognition. Users can send images containing faces to the API which will cross-reference the image against an internal database, which will then determine if a user is authorized or not.

The API uses the following technologies to achieve this:

API usage


The API currently exposes five endpoints:

Please note

Each request made to any endpoint should have a password header containing the password, otherwise you will receive a 401 Unauthorized response. If you are unable to put headers in your request, the password can also be specified in a query string (i.e. auth?password=password).

Example code (in Python)


import requests
import base64

headers = { 'password': [API password] } filename = 'test_image.jpg'
with open(filename, 'rb') as imageFile:     imgstring = base64.b64encode(imageFile.read())     r = requests.post('http://api.hintcode.com/face/auth', data = { 'data_file': imgstring }, headers = headers)
    if (r.status_code == 200):         print('200 OK. Response: ' + r.text + ' (' + ('authorized' if r.text == 'true' else 'not authorized') + ')')     elif (r.status_code == 401):         print('401 Unauthorized. Please pass a \'password\' header, or check the spelling of your password.')     elif (r.status_code == 400):         print('400 Bad Request. No data was received, or data received was malformed.')

Changes and updates


The API was last updated April 21st, 2016. Changes include:


Copyright 2016 HintCode - all rights reserved.