Aging API
To age a person, you need to send a POST request in the MULTIPART FORM DATA format to http://remote.luxand.com:8080/request.php, with the following parameters:
- client_name - your user name;
- client_password - MD5 hash of a concatenation of your password with the current date in the "Ymd" format. For example, if your password is "PASSWORD", and the current date is February 4th, 2013 you need to send the MD5 hash of the string "PASSWORD20130204". The API will tolerate a difference of one day from the current date (in the server's time zone);
- morphing_type - for Ageing API, specify the string "ageing";
- client_file1 - image containing a face in JPG or PNG format;
- sex - specify "0" for female, or "1" for male;
- zombie - specify "1" to create a zombie, or "0" otherwise;
- drugs - specify "1" to create a drug addict, or "0" otherwise;
- age_increase - specify "15" or "30".
The server will send the resulting image in JPG format. In the case of any error the server will return an error message in plain text.
Samples
Sample PHP application and its source code are available at the following links:
https://luxand.com/apidemo/ageing-test/
https://luxand.com/apidemo/ageing-test/sample.zip (source code)
Please specify your user name and password in the 'client_name' and 'client_password' fields in the source code. You need to assign just your password to the 'client_password', not an MD5 hash of it, since the example computes this hash before the request. You need also to set the $this_place_url variable accordingly to where the sample is located, and create the "uploaded" directory (the $upload_dir variable) to which the sample saves the uploaded photo.
User Name and Password Request
To request the user name and password, please fill in the following form and we will get back to you as soon as possible: