Mashape Blog

Rumors aboard Mashape's spaceship

Chris Ismael
This is a tutorial on how you can use the Face Recognition API in a web application using Javascript.  The Face Recognition API makes it ridiculously easy to add face recognition capabilities to your app, whether it’s web, mobile, etc.  We will use photobooth.js to take pictures from our webcam. (Make sure you have one in your machine or plugged in) There are 2 main things to remember when using the Face Recognition API.  You need to: “Train” the Face Recognition API, which means uploading a bunch of pictures that will constitute the “database” from which pictures will be recognized.…
Chris Ismael
This sample code snippet below is CORS-enabled so you don’t have to worry about cross-domain requests. $.ajax({ url: 'MASHAPE-URL', // The URL to the API. You can get this by clicking on "Show CURL example" from an API profile type: 'POST', // The HTTP Method data: {}, // Additional parameters here datatype: 'json', success: function(data) { alert(JSON.stringify(data)); }, error: function(err) { alert(err); }, beforeSend: function(xhr) { xhr.setRequestHeader("X-Mashape-Authorization", "YOUR-MASHAPE-KEY"); // Enter here your Mashape key } }); Source: https://gist.github.com/thefosk/5024297