본문으로 건너뛰기

Image Moderation API

API Endpoint

기본 API Endpoint는 아래와 같으며, 현재 최신 버전은 2022-08 입니다.

https://api.kr.omnicommerce.ai/2022-08/


Moderation API

GET /image-moderation/tags/<product id>: 분석 결과 전달

해당하는 상품 아이디에 대한 Image Moderation Tag를 전달합니다.

Request Header

NameRequiredTypeDescription
X-Api-Key필수StringAPI Key (참조: API 인증 가이드)
Content-Type필수String요청 Type. Application/json 만 지원합니다.
Accept-Language필수String태그 정보를 받을 언어를 선택합니다.
KO, ko-KR (한국어) | EN, en-US(영어(미국)) | en-UK(영어(영국)) | ZH(중국어) | JA(일본어) 중 하나 선택. (default: en-US)

Response

NameTypeDescription
imageModeration[]List[Object]이미지를 기준으로 한 Moderation Tag
├ imageModeration[].idStringModeration 속성 아이디
├ imageModeration[].groupStringModereation Group
├ imageModeration[].nameStringModeration 속성명 (언어팩 적용)
└ imageModeration[].confidenceStringAI 모델이 예측한 속성에 대한 Confidence
productInfoObject상품 정보
├ productInfo.idString상품 아이디
├ productInfo.urlString상품의 대표 이미지 URL
├ productInfo.salesUrlString상품이 판매되고 있는 페이지의 URL
├ productInfo.mobileSalesUrlString상품이 판매되고 있는 페이지의 모바일 버전 URL
├ productInfo.detectionString상품에 대한 Detection 정보 (참조: Detection 정보)
└ productInfo.metadataObject상품에 대한 메타정보 (참조: 상품 Meta 정보)

Response Example

400 Bad Request

{
"errors": "invalid request format."
}

201 Created

{
"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

빈 값인 경우

{
"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>: 여러 상품의 분석 결과 전달

여러 상품 아이디에 대한 Image Moderation Tag를 전달합니다. (최대 100개 까지)

Request Header

NameRequiredTypeDescription
X-Api-Key필수StringAPI Key (참조: API 인증 가이드)
Content-Type필수String요청 Type. Application/json 만 지원합니다.
Accept-Language필수StringModeration 결과를 받을 언어를 선택합니다.
KO, ko-KR (한국어) | EN, en-US(영어(미국)) | en-UK(영어(영국)) | ZH(중국어) | JA(일본어) 중 하나 선택. (default: en-US)

Request Body

NameRequiredTypeDescription
productIds필수List[String]상품 아이디의 List. 최대 100개 까지 가능합니다.

Request Example

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

Response

NameTypeDescription
completeObject요청한 상품 중 분석이 완료된 상품에 대한 정보
├ complete.countInteger요청한 상품 중 분석이 완료된 상품의 수량
└ complete.productsList[Products]분석이 완료된 상품의 태깅 정보 (아래의 Products 참조)
failedObject요청한 상품 중 분석에 실패한 상품에 대한 정보
├ failed.countInteger요청한 상품 중 분석에 실패한 상품의 수량
└ failed.errorsList[Object]분석에 실패한 상품의 상세 오류 정보
ㅤ├ failed.errors[].idString분석에 실패한 상품의 아이디
ㅤ└ failed.errors[].errorsString분석에 실패한 상품의 오류에 대한 설명
Products
NameTypeDescription
imageModeration[]List[Object]이미지를 기준으로 한 성별 정보
├ imageModeration[].idStringModeration 속성 아이디
├ imageModeration[].groupStringModereation Group
├ imageModeration[].nameStringModeration 속성명 (언어팩 적용)
└ imageModeration[].confidenceStringAI 모델이 예측한 속성에 대한 Confidence
productInfoObject상품 정보
├ productInfo.idString상품 아이디
├ productInfo.urlString상품의 대표 이미지 URL
├ productInfo.salesUrlString상품이 판매되고 있는 페이지의 URL
├ productInfo.mobileSalesUrlString상품이 판매되고 있는 페이지의 모바일 버전 URL
├ productInfo.detectionString상품에 대한 Detection 정보 (참조: Detection 정보)
└ productInfo.metadataObject상품에 대한 메타정보 (참조: 상품 Meta 정보)

Response Example

400 Bad Request

{
"errors": "json format error."
}

201 Created

{
"complete": {
"count": 1,
"products": [
...//GET /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": "moMODG03F001",
"group": "GENDER",
"name": "female",
"confidence": 0.995
},
{
"id": "exMODG04F001",
"group": "DOMAIN",
"name": "fashion",
"confidence": 0.998
},
{
"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."
}
]
}
}