Skip to content
François Chalifour edited this page Feb 17, 2017 · 6 revisions

This is the documentation for the SmartSight API.

Routes

POST /classify

Takes an image as input and returns predictions.

Examples

curl -X POST -H 'Content-Type: multipart/form-data' -F '[email protected]' http://localhost:3000/classify

Success

{
  "meta": {
    "type": "success",
    "code": 200
  },
  "data": "[{\"class\": \"pizza, pizza pie\", \"score\": 0.884148}, {\"class\": \"butcher shop, meat market\", \"score\": 0.002444}, {\"class\": \"carbonara\", \"score\": 0.00208}, {\"class\": \"trifle\", \"score\": 0.002078}, {\"class\": \"pomegranate\", \"score\": 0.001326}]"
}

Error

{
  "error": {
    "code": 405,
    "message": "No file specified (expect jpg, jpeg)"
  }
}
Clone this wiki locally