Image Moderation API
API Endpoint
The default API Endpoint is as follows, and the current latest version is 2024-07
.
https://api.kr.omnicommerce.ai/2024-07/
Moderation API
GET /image-moderation/tags/<product id>: Get moderation tags for a single product
Provide the moderation tags corresponding to the requested product ID through the path parameter.
Request Header
Name | Required | Type | Description |
---|---|---|---|
X-Api-Key | Required | String | API Key (refer to API Authentication Guide) |
Content-Type | Required | String | Content Type. Only Application/json is supported. |
Accept-Language | Required | String | Select the language in which to receive the moderation tags. (default: en-US ) KO , ko-KR (Korean) | EN , en-US (English(US)) | en-UK (English(UK)) | ZH (Chinese) | JA (Japanese) |
Response
Name | Type | Description |
---|---|---|
imageModeration[] | List[Object] | Moderation Tags based on the product image |
├ imageModeration[].id | String | Unique ID of the moderation tag |
├ imageModeration[].group | String | Modereation Group |
├ imageModeration[].name | String | Name of the moderation tag (Applied language pack) |
└ imageModeration[].confidence | String | Confidence value from the Model |
productInfo | Object | Product information |
├ productInfo.id | String | Unique ID of the product |
├ productInfo.url | String | The URL of the representative image of the product |
├ productInfo.salesUrl | String | URL of the page where the product is being sold |
├ productInfo.mobileSalesUrl | String | Mobile version URL of the page where the product is being sold |
├ productInfo.detection | String | The detection field which is provided by the client when the product information was put into the workspace. (see Detection Field) |
└ productInfo.metadata | Object | Various product information managed by the customer, such as product name, brand, price, season, and discount rate. (see Product metadata) |
Response Example
400 Bad Request
{
"errors": "invalid request format."
}
201 Created
When moderation tags exist
{
"imageModeration": [
{
"id": "exMODG05F001",
"group": "IMAGE_INFO",
"name": "backgrounds",
"confidence": 0.9995
},
{
"id": "exMODG04F001",
"group": "DOMAIN",
"name": "fashion",
"confidence": 0.998
},
{
"id": "moMODG03F001",
"group": "GENDER",
"name": "female",
"confidence": 0.995
},
{
"id": "exMODG02F001",
"group": "IMAGE_INFO",
"name": "collage",
"confidence": 0.9995
},
{
"id": "exMODG01F001",
"group": "IMAGE_INFO",
"name": "text-overlay",
"confidence": 0.9995
},
{
"id": "exMODG07F001",
"group": "FIGURE",
"name": "human_figure",
"confidence": 0.9996
},
{
"id": "exMODG06F002",
"group": "DIRECTION",
"name": "diagnoal_view",
"confidence": 0.9995
},
{
"id": "exMODG08F002",
"group": "POSE",
"name": "stand",
"confidence": 0.9999
}
],
"productInfo": {
"detection": "TOP",
"id": "A1000",
"metadata": {
"brand": "다밍",
"currency": "KRW",
"discountPrice": 39000.0,
"gender": "WOMEN",
"mobileCurrency": "",
"mobilePrice": 0.0,
"name": "호웰니트",
"price": 39000.0
},
"mobileSalesUrl": null,
"salesUrl": "https://salesUrl.com/products/A1000",
"url": "https://image.url.com/image.jpg"
}
}
200 OK
When moderation tags do not exist
{
"imageModeration": [],
"productInfo": {
"detection": "TOP",
"id": "A1000",
"metadata": {
"brand": "다밍",
"currency": "KRW",
"discountPrice": 39000.0,
"gender": "WOMEN",
"mobileCurrency": "",
"mobilePrice": 0.0,
"name": "호웰니트",
"price": 39000.0
},
"mobileSalesUrl": null,
"salesUrl": "https://salesUrl.com/products/A1000",
"url": "https://image.url.com/image.jpg"
}
}
POST /image-moderation/tags/<product id>: Get moderation tags for multiple products
Provide the moderation tags corresponding to the requested product Ids through the request body (Up to 100 at a time).
Request Header
Name | Required | Type | Description |
---|---|---|---|
X-Api-Key | Required | String | API Key (refer to API Authentication Guide) |
Content-Type | Required | String | Content Type. Only Application/json is supported. |
Accept-Language | Required | String | Select the language in which to receive the moderation tags. (default: en-US ) KO , ko-KR (Korean) | EN , en-US (English(US)) | en-UK (English(UK)) | ZH (Chinese) | JA (Japanese) |
Request Body
Name | Required | Type | Description |
---|---|---|---|
productIds | Required | List[String] | List of product IDs. Up to 100 product IDs are possible. |
Request Example
{
"productIds": [
"A1000", "A1001", "A1002"
]
}
Response
Name | Type | Description |
---|---|---|
complete | Object | The completed results among the requested product IDs |
├ complete.count | Integer | Count of completed results |
└ complete.products | List[Products] | Moderation tag results |
failed | Object | Failed results among the requested product IDs |
├ failed.count | Integer | Count of failted results |
└ failed.errors | List[Object] | Detailed error information of failed items |
ㅤ├ failed.errors[].id | String | Product ID of failed items |
ㅤ└ failed.errors[].errors | String | Description of error of failed items |
Products
Name | Type | Description |
---|---|---|
imageModeration[] | List[Object] | Moderation Tags based on the product image |
├ imageModeration[].id | String | Unique ID of the moderation tag |
├ imageModeration[].group | String | Modereation Group |
├ imageModeration[].name | String | Name of the moderation tag (Applied language pack) |
└ imageModeration[].confidence | String | Confidence value from the Model |
productInfo | Object | Product information |
├ productInfo.id | String | Unique ID of the product |
├ productInfo.url | String | The URL of the representative image of the product |
├ productInfo.salesUrl | String | URL of the page where the product is being sold |
├ productInfo.mobileSalesUrl | String | Mobile version URL of the page where the product is being sold |
├ productInfo.detection | String | The detection field which is provided by the client when the product information was put into the workspace. (see Detection Field) |
└ productInfo.metadata | Object | Various product information managed by the customer, such as product name, brand, price, season, and discount rate. (see Product metadata) |
Response Example
400 Bad Request
{
"errors": "json format error."
}
201 Created
{
"complete": {
"count": 1,
"products": [
...//GET Same with /image-moderation/tags/<product_id>
]
},
"failed": {
"count": 1,
"errors": [
{
"id": "A1000",
"errors": "fail to prove image from url."
}
]
}
}
Full Example
{
"complete": {
"count": 1,
"products": [
{
"imageModeration": [
{
"id": "exMODG05F001",
"group": "IMAGE_INFO",
"name": "backgrounds",
"confidence": 0.9995
},
{
"id": "exMODG04F001",
"group": "DOMAIN",
"name": "fashion",
"confidence": 0.998
},
{
"id": "moMODG03F001",
"group": "GENDER",
"name": "female",
"confidence": 0.995
},
{
"id": "exMODG02F001",
"group": "IMAGE_INFO",
"name": "collage",
"confidence": 0.9995
},
{
"id": "exMODG01F001",
"group": "IMAGE_INFO",
"name": "text-overlay",
"confidence": 0.9995
},
{
"id": "exMODG07F001",
"group": "FIGURE",
"name": "human_figure",
"confidence": 0.9996
},
{
"id": "exMODG06F002",
"group": "DIRECTION",
"name": "diagnoal_view",
"confidence": 0.9995
},
{
"id": "exMODG08F002",
"group": "POSE",
"name": "stand",
"confidence": 0.9999
}
],
"productInfo": {
"detection": "TOP",
"id": "A1000",
"metadata": {
"brand": "다밍",
"currency": "KRW",
"discountPrice": 39000.0,
"gender": "WOMEN",
"mobileCurrency": "",
"mobilePrice": 0.0,
"name": "호웰니트",
"price": 39000.0
},
"mobileSalesUrl": null,
"salesUrl": "https://salesUrl.com/products/A1000",
"url": "https://image.url.com/image.jpg"
}
}
]
},
"failed": {
"count": 1,
"errors": [
{
"id": "A1000",
"errors": "fail to prove image from url."
}
]
}
}