Display Detection Pro

Updated at:

Product overview

Display Detection Pro is a display detection service that uses a dedicated visual model to identify the location and name of products in an image. The service supports default recognition rules for the Genki Forest business type and lets callers provide a custom rule.

Use cases

  1. Beverage display recognition: Use the default rules for the Genki Forest business type to recognize beverage products.

  2. Custom detection rules: Specify a product recognition task that meets the output constraints using the rule parameter.

  3. Product location display: Use the name and bounding box of each product for display, statistics, or manual review.

Features

  1. Direct product recognition: For each product, the service returns a bounding box and a name. If the name cannot be determined, it returns unknown.

  2. Two rule entry points: A non-empty rule parameter takes precedence. If rule is empty or not provided, the type parameter must be set to Genki Forest.

  3. Unified result validation: The service converts bounding box coordinates to integers and clamps them to the 0–1000 range. It also swaps reversed coordinates. If a name is missing, the service uses unknown. The entire batch fails if any item is not a valid product object, has an invalid bounding box, or a bounding box with no area.

  4. Result scope: The output includes detected names and locations but excludes vector database recall, SKU codes, and similarity scores.

Developer guide

The request and response fields in this document match the casing and structure defined in the corresponding setup documentation. The examples show the business workflow input and output and do not include any platform gateway wrappers. For the public endpoint URL, authentication method, and gateway wrapper details, refer to the officially published API documentation.

Request parameters

Parameter

Type

Required

Description

imageUrl

String

Yes

The HTTPS URL of the source image to analyze. The URL must be publicly accessible and must not contain spaces or user credentials.

rule

String

No

A custom recognition rule.

type

String

Conditionally required

Required if the rule parameter is not provided or is empty. The value must be Genki Forest.

Request example

{
  "imageUrl": "https://example.com/images/api-09.jpg",
  "type": "Genki Forest"
}

The example imageUrl is a placeholder. Replace it with the URL of your resource when making an API call.

Custom rule example:

{
  "imageUrl": "https://example.com/images/api-09.jpg",
  "rule": "Locate all visible beverage products in the image. Output only a JSON array, where each item contains a bbox_2d (integer coordinates from 0 to 1000) and a sku_name (the product name, or 'unknown' if it cannot be identified). Each product must be a separate item."
}

Response parameters

Common fields:

Field path

Type

Description

success

Boolean

A true value indicates a successful API call but does not guarantee that the content passed a moderation review.

errorCode

String

An empty string on success; an error code on failure.

errorMessage

String

An empty string on success; a detailed error description on failure.

usageMap

Object

Returns {"ProcessingCount":1} on success; an empty object on failure.

usageMap.ProcessingCount

Integer

The number of processed requests. The value is always 1 for a successful call. This field is omitted on failure.

Business fields:

Field path

Type

Description

data

Array

An array of per-product results. This array is non-empty on success and empty on failure.

| data[].idx | Integer | The product's sequence number, starting from 1. |

| data[].bbox_2d | Integer[4] | Bounding box in [x_top_left, y_top_left, x_bottom_right, y_bottom_right] format. Coordinates are integers from 0 to 1000. The box must have a non-zero area. |

| data[].detected_sku_name | String | The product name. If the name is missing or cannot be determined, the value is unknown. |

| boxCount | Integer | The total number of product boxes, equal to the length of the data array. This value is 0 on failure. |

The service uses the rule parameter directly as a prompt for the model. The rule should instruct the model to return a complete JSON array where each item contains a bbox_2d and a non-empty sku_name. The default rule recognizes beverage products and is not limited to a single brand. The entire request fails if the response is an empty product array, contains an invalid item, or is a truncated response that cannot be parsed. No partial results are returned.

Response example

The following examples show the response structure and are not based on actual test data.

Successful Response

{
  "success": true,
  "errorCode": "",
  "errorMessage": "",
  "data": [
    {
      "idx": 1,
      "bbox_2d": [
        100,
        200,
        300,
        600
      ],
      "detected_sku_name": "Genki Forest Sparkling Water"
    },
    {
      "idx": 2,
      "bbox_2d": [
        320,
        200,
        520,
        600
      ],
      "detected_sku_name": "unknown"
    }
  ],
  "boxCount": 2,
  "usageMap": {
    "ProcessingCount": 1
  }
}

Parameter Error Response

{
  "success": false,
  "errorCode": "InvalidParameter",
  "errorMessage": "If the rule parameter is not provided or is empty, the type parameter must be 'Genki Forest'.",
  "usageMap": {},

  "data": [ ],

  "boxCount": 0
}

Processing Failure Response

{
  "success": false,
  "errorCode": "DownstreamUnavailable",
  "errorMessage": "Failed to obtain a valid product array.",
  "usageMap": {},

  "data": [ ],

  "boxCount": 0
}

Error codes

Error code

Description

Recommendation

InvalidParameter

A request parameter is invalid, or the recognition service returned a business-specific error.

Check the errorMessage to identify the issue, correct the parameters or business input, and retry the call.

DownstreamUnavailable

A processing exception occurred. Common causes include issues with authentication, rate limiting, timeouts, an empty response, missing fields, or response parsing.

Check the resource and service status based on the errorMessage. If the issue is temporary, retry the call after a short delay.

Evaluate the result based on the success, errorCode, and errorMessage parameters. The source integration document does not specify an HTTP status code for each type of business error. For common platform error codes, see Error codes. For the workflow error codes specific to this API, refer to the table above.