Image Classification API Documentation

API Summery :

The service can identify the contents of the uploaded image, given a number of classification label describing the image content.

Application scenarios:

stock image platforms, photo community sites, image sharing Apps



API end point : http://api1.wozhitu.com:8084/vsearchtech/imgPnpRest/iclassify

Image Format Requirement: JPG format 300 – 1200 PIX

Request Method :POST

Request Parameters(body) :

Parameter Name Type Required Parameter Location Description Default Value
apikey string Yes header API Key None
fmt string No header Response format: json or xml json

apikey string Yes header API Key None
photo file Yes body Image for uploading None


Detailed use of tutorials



API end point : http://api1.wozhitu.com:8084/vsearchtech/imgPnpRest/iclassify

Image Format Requirement: JPG format 300 – 1200 PIX

Request Method : POST

Request Parameters(body) :

Parameter Name Type Required Parameter Location Description Default Value
apikey string Yes header API Key None
fmt string No header Response format: json or xml json
imgurl string Yes body Image URL None


JSON Response Example:

{"class":"visualse.common.utils.IClassifyResultSet","nodeList":[{"class":"visualse.common.utils.IClassifyNode","nodeKwd":" kuvasz","nodeLabel":"02104029","nodeScore":0.426328},{"class":"visualse.common.utils.IClassifyNode","nodeKwd":" Sealyham terrier| Sealyham","nodeLabel":"02095889","nodeScore":0.123592},{"class":"visualse.common.utils.IClassifyNode","nodeKwd":" standard poodle","nodeLabel":"02113799","nodeScore":0.0685024},{"class":"visualse.common.utils.IClassifyNode","nodeKwd":" toypoodle","nodeLabel":"02113624","nodeScore":0.0557082},{"class":"visualse.common.utils.IClassifyNode","nodeKwd":" Great Pyrenees","nodeLabel":"02111500","nodeScore":0.0504554}],"numOfNodes":5,"timeMillSec":0.1683}



Error Code Reference:


Error Codes Related to Access Control:
API_CODE_ERROR_exceeded_access_total Exceeded API access limit in total
API_CODE_ERROR_exceeded_access_frequency Exceeded API access frequency limit
API_CODE_ERROR_exceeded_access_frequency_min Exceeded API access limit per minute
API_CODE_ERROR_exceeded_access_frequency_hr Exceeded API access limit per hour
API_CODE_ERROR_exceeded_access_frequency_day Exceeded API access limit per day
API_CODE_ERROR_exceeded_access_frequency_month xceeded API access limit per month
API_CODE_ERROR_two_API_calls_time_too_close Two API calls are too close in time
IMAGE_INDEX_CODE_ERROR_IMAGE_EXCEED_MAX_DOCS_PER_UID Exceeded max number of images in index per user
API_CODE_ERROR_not_allow_write_index Pause in adding image to index (server might be in maintain service, please wait )

Error Codes Related to Wrong Parameters:
API_CODE_ERROR_invalid_apikey Invalid apikey
IMAGE_INDEX_ITEM_CODE_ERROR_INVALID_imgName Invalid image name
IMAGE_INDEX_ITEM_CODE_ERROR_INVALID_imgUrl Invalid image URL
IMAGE_INDEX_ITEM_CODE_ERROR_INVALID_catid_must_be_1_to_3000 Invalid image category (Must be 1-3000 Integer)
IMAGE_INDEX_ITEM_CODE_ERROR_INVALID_labels_must_be_positive_integer Invalid label(Must be positive integer)
IMAGE_INDEX_ITEM_CODE_ERROR_INVALID_FIELDS_any_field_must_not_have_double_quote Invalid image data, must not have double quote
IMAGE_INDEX_ITEM_CODE_ERROR_INVALID_LANG Invalid language parameter(must be zh for Chinese or en for English)
IMAGE_INDEX_CODE_ERROR_DOWNLOAD_IMAGE Error in downloading image, please check provided image URL
IMAGE_INDEX_CODE_ERROR_IMAGE_SIZE_TOO_BIG Image size is too big(image must be 400 – 800PIX JPG format)
IMAGE_INDEX_DELETE_IMG_CODE_ERROR_NOT_FOUND_ITEM Error in deleting, image not found