To run these examples you will need to substitute your company name for your WineEngine server
(as supplied by TinEye) in place of
<company>. There is no test server available.
For security reasons, do not call the API directly from a client-side machine. Doing so would expose your password, and allow anyone to delete your images or add their own.
An example call to list the images in your WineEngine collection:
This call can be made from a web browser for debugging purposes.
Image queries and uploads are submitted in a request equivalent to an
Here is an add example using cURL:
curl https://wineengine.tineye.com/<company>/rest/add/ \ -F "firstname.lastname@example.org" \ -F "filepath=path/to/file.jpg"
-F option (
email@example.com) points to the file on your local machine.
-F option (
filepath=path/to/file.jpg) is the file path that you
would like to give to the image on the WineEngine server.
If filepath is omitted, the file’s local path will be used.
The file path can be any arbitrary identifier you like for the image, and it does not need
to end with
.jpg or any other file extension. It is important that the file paths be
unique because images with the same path will overwrite each other.
All calls contain the following general parameters:
JSON or XML formatted output, can be either json or xml, defaults to json.
|timeout (optional)||The call will timeout after timeout seconds. Set to 0 for no timeout.|
When using JSON, the output will be wrapped in the given callback method.
For example, if
handle_results( ...json output... );
Image formats and sizes¶
Images uploaded to the API¶
- Uploaded images must be JPEG, PNG, GIF, BMP or TIFF format.
- Animated images are not supported (such as animated GIFs or PNGs).
- Uploaded images should be 600 pixels in the smallest dimension for optimal performance. Images with both dimensions larger than 600 pixels will be resized by the API. For example, an image 1200x900 pixels will be resized to 800x600 pixels.
Images taken with a mobile device¶
- Mobile images should be 600 pixels in the smallest dimension.
- Recommended average image size is 60 kB.
- Use a quality setting of 85% or higher for JPEG images.