Price tag detection
1. Overview
The display price tag detection service uses price tag recognition and a multimodal large model to locate and extract information from price tags. The service extracts product information, price, original price, and location. It also returns bounding boxes for paper price tags, electronic price tags, and promotional price signs. This service is ideal for in-store price collection, price tag inspection, and price verification.
2. Use cases
In-store price collection: Read the detected price and any available original price from price tags.
Price compliance check: Compare detected prices against your business's price list.
Manual price tag review: Locate paper price tags, electronic price tags, and promotional price signs to easily reference them in the source image.
3. Features
Structured price output: Returns the SKU name, SKU code, price, and location for each item. Prices are returned as strings.
Multi-type tag localization: Covers paper price tags, electronic price tags, and promotional price signs with clearly visible prices.
Text and location for manual review: The service prioritizes extracting clearly visible prices. If a price is unreadable, its value is an empty string. The grounding feature locates tags but does not infer that a tag must correspond to a specific SKU based on proximity alone.
The service accepts a single HTTPS image as input. The grounding feature returns a maximum of 12 targets. Each target includes a category, a bounding box, and up to 24 characters of visible text. The coverage field indicates whether the localization is complete.
4. Developer guide
The request and response fields in this document follow the exact case and structure of the API. These examples show direct API requests and responses and do not account for platform gateway wrapping. For the public endpoint URL, authentication method, and gateway wrapping, refer to the official API specification.
4.1 Request parameters
Parameter | Type | Required | Description |
imageUrl | String | Yes | The HTTPS URL of the source image to analyze. The URL must be accessible and cannot contain spaces, usernames, or passwords. |
4.2 Request example
{
"imageUrl": "https://example.com/images/api-07.jpg"
}The sample image URL and knowledge base identifier (if any) are placeholders. Replace them with your actual values when calling the API.
4.3 Response parameters
Common fields:
Field path | Type | Description |
success | Boolean | Indicates whether the API call succeeded. A successful call does not guarantee the request passed business validation. |
errorCode | String | An empty string on success, or an error code on failure. |
errorMessage | String | An empty string on success, or a detailed error message on failure. |
result | Object | The business result. An empty object on failure. |
usageMap | Object | Returns |
usageMap.ProcessingCount | Integer | A count of |
Business fields:
Field path | Type | Description |
result.type | String | A fixed value of |
result.priceTags | Array | An array of detected price tags. The array is empty if no tags are detected. |
| result.priceTags[ ].skuName | String | The associated SKU name. Empty if not detected. |
| result.priceTags[ ].skuCode | String | The associated SKU code. Empty if not detected. |
| result.priceTags[ ].price | String | The price, as a string. Empty if not detected. |
| result.priceTags[ ].originalPrice | String | The original price. Empty if not provided. |
| result.priceTags[ ].location | Object | The location of the price tag. |
| result.priceTags[ ].location.Left / Top / Right / Bottom | Integer | The left, top, right, and bottom coordinates, in a range from 0 to 1000. |
Grounding fields:
Field path | Type | Description |
result.grounding | Object | Results from the grounding feature. |
result.grounding.coverage | String |
|
result.grounding.regions | Array | An array of up to 12 detected targets. The array is empty if no relevant targets are found. |
| result.grounding.regions[ ].label | String | The category of the target. See the table below for valid values. |
| result.grounding.regions[ ].bbox_2d | Integer[4] | An array of four integers representing the bounding box: [x_top_left, y_top_left, x_bottom_right, y_bottom_right]. The range is from 0 to 1000. left must be less than right, and top must be less than bottom. |
| result.grounding.regions[ ].text | String | Recognizable text or a short name, up to 24 characters. Empty if the text is unreadable. |
Target category:
Label | Description |
price_tag | paper price tag |
electronic_price_tag | electronic price tag |
promotion_price_sign | promotional price sign with a clearly visible price |
Coordinate conversion: pixel_x = coordinate_x * source_image_width / 1000; pixel_y = coordinate_y * source_image_height / 1000.
The API can return success=true with coverage="partial" if only partial grounding results are available. The status is set to partial if the results are truncated, in which case only fully parsed, valid targets are returned. This status is also set if invalid bounding boxes are removed, results are deduplicated, text is truncated, or the target limit is exceeded. If grounding finds no relevant targets, it returns an empty regions array. A failure in the grounding feature does not cause the entire call to fail if the main recognition task succeeds. In this scenario, grounding.coverage returns an empty string, grounding.regions returns an empty array, and ProcessingCount is still 1. The entire call fails only if the main recognition task fails.
If no price tags are detected, the API returns success=true and an empty priceTags array. Even if price or SKU information is missing, the corresponding bounding box is still returned if its location is valid. Records with invalid or out-of-bounds locations are skipped. Duplicate price tags in the same scene are removed by deduplication. If any valid price tag is detected, its result is returned. The call fails only if all records are discarded due to anomalies. An invalid response structure also causes a failure. The results in priceTags and grounding.regions are from different sources and are not guaranteed to correspond one-to-one.
4.4 Response examples
The following are response structure examples, not actual test results.
1) Successful response
{
"success": true,
"errorCode": "",
"errorMessage": "",
"result": {
"type": "priceTag",
"priceTags": [
{
"skuName": "sku_test",
"skuCode": "001",
"price": "5.50",
"originalPrice": "6",
"location": {
"Left": 100,
"Top": 200,
"Right": 300,
"Bottom": 400
}
}
],
"grounding": {
"coverage": "complete",
"regions": [
{
"label": "price_tag",
"bbox_2d": [
100,
200,
300,
400
],
"text": "5.50"
}
]
}
},
"usageMap": {
"ProcessingCount": 1
}
}2) Response with partial grounding result
{
"success": true,
"errorCode": "",
"errorMessage": "",
"result": {
"type": "priceTag",
"priceTags": [
{
"skuName": "sku_test",
"skuCode": "001",
"price": "5.50",
"originalPrice": "6",
"location": {
"Left": 100,
"Top": 200,
"Right": 300,
"Bottom": 400
}
}
],
"grounding": {
"coverage": "partial",
"regions": [
{
"label": "price_tag",
"bbox_2d": [
100,
200,
300,
400
],
"text": ""
}
]
}
},
"usageMap": {
"ProcessingCount": 1
}
}Response when main task succeeds and grounding is unavailable
{
"success": true,
"errorCode": "",
"errorMessage": "",
"result": {
"type": "priceTag",
"priceTags": [
{
"skuName": "sku_test",
"skuCode": "001",
"price": "5.50",
"originalPrice": "6",
"location": {
"Left": 100,
"Top": 200,
"Right": 300,
"Bottom": 400
}
}
],
"grounding": {
"coverage": "",
"regions": [ ]
}
},
"usageMap": {
"ProcessingCount": 1
}
}Response when no price tags are detected
{
"success": true,
"errorCode": "",
"errorMessage": "",
"result": {
"type": "priceTag",
"priceTags": [ ],
"grounding": {
"coverage": "complete",
"regions": [ ]
}
},
"usageMap": {
"ProcessingCount": 1
}
}Response when tag location is valid but price and SKU info are not detected
{
"success": true,
"errorCode": "",
"errorMessage": "",
"result": {
"type": "priceTag",
"priceTags": [
{
"skuName": "",
"skuCode": "",
"price": "",
"originalPrice": "",
"location": {
"Left": 100,
"Top": 200,
"Right": 300,
"Bottom": 400
}
}
],
"grounding": {
"coverage": "complete",
"regions": [
{
"label": "price_tag",
"bbox_2d": [
100,
200,
300,
400
],
"text": ""
}
]
}
},
"usageMap": {
"ProcessingCount": 1
}
}Parameter error response
{
"success": false,
"errorCode": "InvalidParameter",
"errorMessage": "The imageUrl must be a valid HTTPS image URL.",
"usageMap": {},
"result": {}
}Processing failure response
{
"success": false,
"errorCode": "DownstreamUnavailable",
"errorMessage": "The response contains anomalous records, and no valid price tags could be extracted.",
"usageMap": {},
"result": {}
}4.5 Error codes
Error code | Description | Recommended action |
InvalidParameter | The input is invalid, or a business error occurred. | Correct the parameters or business input based on the |
DownstreamUnavailable | A processing exception occurred, such as an issue with authentication, rate limiting, timeout, an empty response, missing fields, or parsing errors. | Check the resource and service status based on the |
To determine the call's outcome, check the success, errorCode, and errorMessage fields. The underlying API documentation does not specify HTTP status codes for each business error type. For common platform error codes, see Error Codes. For errors specific to this API workflow, refer to the table above.