Batch Responses

Response format for batch request

Response Object

Key

Type

Value

Request Identifier

string

JSON object where the key is the attribute (e.g. color) of the product, and value is a JSON object which contains the description and confidence of the prediction.

Batch request responses from the API will have the predictions for all products, uniquely identified by the 'id' submitted at the time of making API call.

Predicted Attributes

The predicted attributes will be JSON object of the following format

Key

Type

Value

description

JSON Array

Array of all the predicted values

prob

String

Confidence of prediction

Example

CASE 1: Multiple-Object Image without Webhook endpoint

{
  "1": {
    "Products": [
      {
        "bounding_box": [76.27632141113281,152.2967987060547,859.9697875976562,1097.4202880859375],
        "category": {"description": ["dresses"],"prob": "0.67"},
        "style": {"description": ["slip dress"],"prob": "0.87"},
        "color": {"description": ["brown"],"prob": "0.25"},
        ...
      },
      {
        "bounding_box": [[124.05464935302734,585.519775390625,376.329345703125,824.7747802734375]],
        "category": {"description": ["bags"],"prob": "0.95"},
        "style": {"description": ["clutches"],"prob": "0.87"},
        "color": {"description": ["black"],"prob": "0.25"},
        ...
      }
    ]
  },
  "2": {
    "Products": [
      {
        "bounding_box": [76.27632141113281,152.2967987060547,859.9697875976562,1097.4202880859375],
        "category": {"description": ["dresses"],"prob": "0.67"},
        "style": {"description": ["slip dress"],"prob": "0.87"},
        "color": {"description": ["brown"],"prob": "0.25"},
        ...
      },
      {
        "bounding_box": [[124.05464935302734,585.519775390625,376.329345703125,824.7747802734375]],
        "category": {"description": ["bags"],"prob": "0.95"},
        "style": {"description": ["clutches"],"prob": "0.87"},
        "color": {"description": ["black"],"prob": "0.25"},
        ...
      }
    ]
  }
}

CASE 2: Multiple-Object Image with Webhook endpoint

{
  "txn_id": "282ae119-10a2-45e1-99c1-a6a87d11bc5e",
  "message": "Started working on the request."
}

CASE 3: Single-Object Image without Webhook endpoint

{
  "1": {
    "Products": [
      {
        "bounding_box": [76.27632141113281,152.2967987060547,859.9697875976562,1097.4202880859375],
        "category": {"description": ["dresses"],"prob": "0.67"},
        "style": {"description": ["slip dress"],"prob": "0.87"},
        "color": {"description": ["brown"],"prob": "0.25"},
        ...
      }
    ]
  },
  "2": {
    "Products": [
      {
        "bounding_box": [76.27632141113281,152.2967987060547,859.9697875976562,1097.4202880859375],
        "category": {"description": ["dresses"],"prob": "0.67"},
        "style": {"description": ["slip dress"],"prob": "0.87"},
        "color": {"description": ["brown"],"prob": "0.25"},
        ...
      }
    ]
  }
}

CASE 4: Single-Object Image with Webhook endpoint

{
  "txn_id": "282ae119-10a2-45e1-99c1-a6a87d11bc5e",
  "message": "Started working on the request."
}

Last updated

Was this helpful?