Diagnose image harm

Prev Next

Available in Classic and VPC

Detect image harm using public URLs or Base64-encoded data.

Request headers

For headers common to all CLOVA GreenEye APIs, see Common CLOVA GreenEye headers.

Request path parameters

The following describes the parameters.

Field Type Required Description
domainId String Required Domain ID
  • Check through the invoke URL from Domain > API integration settings of the console
signature String Required Signature
  • Check through the invoke URL from Domain > API integration settings of the console
Note

The request path parameter consists of a string that is different for each user. You can check it in the APIGW invoke URL provided in API integration settings of Domain after completing the service subscription and domain creation in the NAVER Cloud Platform console. For more information, see the CLOVA GreenEye User Guide.

Request body

The following describes the request body.

Field Type Required Description
version String Required CLOVA GreenEye service version
  • V1
requestId String Optional API call UUID
  • If necessary, enter a random value
timestamp Number Required Timestamp value of the request time
images Array Required Image information
  • Only one image can be entered per call

images

The following describes images.

Field Type Required Description
name String Required Image name
  • Use to identify images and check response results
url String Conditional Public URL where images can be fetched
  • url or data must be entered
  • If you enter both url and data, url is ignored and data is applied
data String Conditional Base64-encoded image bytes
  • url or data must be entered
  • If you enter both url and data, url is ignored and data is applied

Request example

The following is a sample request.

curl --location --request POST 'https://clovagreeneye.apigw.ntruss.com/custom/v1/{domainId}/{signature}/predict' \
--header 'X-GREEN-EYE-SECRET: {Client Secret}' \
--header 'Content-Type: application/json' \
--data '{
    "version": "V1",
    "requestId": {RequestId},
    "timestamp": 1724750100000,
    "images": [
        {
            "name": "20191025_155202",
            "url": "https://kr.object.ncloudstorage.com/bk1/20191025_155202.jpg"
        }
    ]
}'

Response

The following describes the response format.

Response body

The following describes the response body.

Field Type Required Description
version String - CLOVA GreenEye service version
requestId String - Request UUID
timestamp Number - Timestamp value of the request time
images Array - Image information

images

The following describes images.

Field Type Required Description
result Object - Response result
result.adult Object - Adult content rating information
result.adult.confidence Float - Adult content score (point)
  • 0 - 1
  • The closer to 1, the higher the probability
result.normal Object - Normal rating information
result.normal.confidence Float - Normal content score (point)
  • 0 - 1
  • The closer to 1, the higher the probability
result.porn Object - Obscene content rating information
result.porn.confidence Float - Obscene content score (point)
  • 0 - 1
  • The closer to 1, the higher the probability
result.sexy Object - Sexual content rating information
result.sexy.confidence Float - Sexual content score (point)
  • 0 - 1
  • The closer to 1, the higher the probability
latency Integer - Response time (millisecond)
confidence Float - Highest score (point)
message String - Response message
name String - Image name
  • Use to identify images and check response results

Response status codes

For response status codes common to NAVER Cloud Platform, see Ncloud API response status codes.

Response example

The following is a sample example.

{
    "version": "V1",
    "requestId": "RequestId",
    "timestamp": 1724978377692,
    "images": [
        {
            "result": {
                "adult": {
                    "confidence": 0.020802784711122513
                },
                "normal": {
                    "confidence": 0.9232523441314697
                },
                "porn": {
                    "confidence": 0.027517495676875114
                },
                "sexy": {
                    "confidence": 0.028427353128790855
                }
            },
            "latency": 81.0,
            "confidence": 0.9232523441314697,
            "message": "SUCCESS",
            "name": "20191025_155202"
        }
    ]
}