Skip to main content

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

NameRequiredTypeDescription
X-Api-KeyRequiredStringAPI Key (refer to API Authentication Guide)
Content-TypeRequiredStringContent Type. Only Application/json is supported.
Accept-LanguageRequiredStringSelect 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
TypeDescription
imageModeration[]List[Object]Moderation Tags based on the product image
├ imageModeration[].idStringUnique ID of the moderation tag
├ imageModeration[].groupStringModereation Group
├ imageModeration[].nameStringName of the moderation tag (Applied language pack)
└ imageModeration[].confidenceStringConfidence value from the Model
productInfoObjectProduct information
├ productInfo.idStringUnique ID of the product
├ productInfo.urlStringThe URL of the representative image of the product
├ productInfo.salesUrlStringURL of the page where the product is being sold
├ productInfo.mobileSalesUrlStringMobile version URL of the page where the product is being sold
├ productInfo.detectionStringThe detection field which is provided by the client when the product information was put into the workspace. (see Detection Field)
└ productInfo.metadataObjectVarious 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

NameRequiredTypeDescription
X-Api-KeyRequiredStringAPI Key (refer to API Authentication Guide)
Content-TypeRequiredStringContent Type. Only Application/json is supported.
Accept-LanguageRequiredStringSelect 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

NameRequiredTypeDescription
productIdsRequiredList[String]List of product IDs. Up to 100 product IDs are possible.

Request Example

{
"productIds": [
"A1000", "A1001", "A1002"
]
}

Response

NameTypeDescription
completeObjectThe completed results among the requested product IDs
├ complete.countIntegerCount of completed results
└ complete.productsList[Products]Moderation tag results
failedObjectFailed results among the requested product IDs
├ failed.countIntegerCount of failted results
└ failed.errorsList[Object]Detailed error information of failed items
ㅤ├ failed.errors[].idStringProduct ID of failed items
ㅤ└ failed.errors[].errorsStringDescription of error of failed items
Products
Name
TypeDescription
imageModeration[]List[Object]Moderation Tags based on the product image
├ imageModeration[].idStringUnique ID of the moderation tag
├ imageModeration[].groupStringModereation Group
├ imageModeration[].nameStringName of the moderation tag (Applied language pack)
└ imageModeration[].confidenceStringConfidence value from the Model
productInfoObjectProduct information
├ productInfo.idStringUnique ID of the product
├ productInfo.urlStringThe URL of the representative image of the product
├ productInfo.salesUrlStringURL of the page where the product is being sold
├ productInfo.mobileSalesUrlStringMobile version URL of the page where the product is being sold
├ productInfo.detectionStringThe detection field which is provided by the client when the product information was put into the workspace. (see Detection Field)
└ productInfo.metadataObjectVarious 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."
}
]
}
}