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

This is the documentation for the SmartSight API.

Routes

POST /v1/classify

Takes an image as input and returns predictions.

Examples

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

Success

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

Error

{
  "error": {
    "code": 422,
    "message": "The file is missing.",
    "url": "https://github.com/smartsight/smartsight-api/wiki"
  }
}
Clone this wiki locally