API Documentation Version 1.2

API Reference

Quick search

Creating new objects

Creates an object in your computer vision database

Resource URL:http://api.iqengines.com/v1.2/object/
Method:POST
Content-Type:multipart/form-data

Request parameters

required

api_key:Your API key.
api_sig:The signature of the API call, see Authentication.
time_stamp:The time stamp for your request. The formatting is ‘YYYYmmDDHHMMSS’ (e.g. ‘20100405224038’), and the standard is UTC time.
images:A set of image files you would like to associate to this object.
name:The human-readable name of the object. This is the label that we return when you use the query api.

optional

custom_id:A unique id to refrence your object at a later point in time.
meta:This is a json-dictionary encoded as a string of additional meta-data to be linked to the uploaded image. (e.g. {‘isbn’: ‘9780393326291’})
json:If you set this value to anything other than 0, we will return the result in JSON format.

Sample request

Sample POST request using cURL:

curl -X POST \
     -F "images=@image.jpg;type=image/jpg" \
     -F "images=@image2.jpg;type=image/jpg" \
     -F "name=OBJECT_NAME" \
     -F "api_key=API_KEY" \
     -F "api_sig=SIGNATURE" \
     -F "time_stamp=20090612111832" \
     http://api.iqengines.com/v1.2/object/

Return values

success

A successful upload will have the following return values:

HTTP Status Code: 201

Response Header['Location']: http://api.iqengines.com/v1.2/object/7ea945515deb4634892d601be8bf3a1a/

Response Body:

    {'comment': 'successfully created',
     'error': 0,
     'obj_id': '7ea945515deb4634892d601be8bf3a1a',
     'resource_url': 'http://api.iqengines.com/v1.2/object/7ea945515deb4634892d601be8bf3a1a/'}

error: training api trial upload limit reached

returned if you’re account has not been upgraded to a premium plan and you’ve trained more than 100 images.

HTTP Status Code: 400

Response Body:

{'comment': "You've reached the upper limit of the training API trial. Please contact staff at http://support.iqengines.com for assistance in upgrading your plan.",
 'error': 1}

FAQ

What’s the maximum number of images per object?

You may upload a maximum of 100 images for any given object.

What’s the optimal image dimensions?

For best results, all images should have a minimum dimension no smaller than 200px and a maximum dimension no larger than 800px.