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 'file=@pizza.jpg' 

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
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.