Diagnose image harm
    • PDF

    Diagnose image harm

    • PDF

    Article summary

    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.

    FieldTypeRequiredDescription
    domainIdStringRequiredDomain ID
    • Check through the invoke URL from Domain > API integration settings of the console
    signatureStringRequiredSignature
    • 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.

    FieldTypeRequiredDescription
    versionStringRequiredCLOVA GreenEye service version
    • V1
    requestIdStringOptionalAPI call UUID
    • If necessary, enter a random value
    timestampNumberRequiredTimestamp value of the request time
    imagesArrayRequiredImage information
    • Only one image can be entered per call

    images

    The following describes images.

    FieldTypeRequiredDescription
    nameStringRequiredImage name
    • Use to identify images and check response results
    urlStringConditionalPublic 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
    dataStringConditionalBase64-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.

    FieldTypeRequiredDescription
    versionString-CLOVA GreenEye service version
    requestIdString-Request UUID
    timestampNumber-Timestamp value of the request time
    imagesArray-Image information

    images

    The following describes images.

    FieldTypeRequiredDescription
    resultObject-Response result
    result.adultObject-Adult content rating information
    result.adult.confidenceFloat-Adult content score (point)
    • 0 - 1
    • The closer to 1, the higher the probability
    result.normalObject-Normal rating information
    result.normal.confidenceFloat-Normal content score (point)
    • 0 - 1
    • The closer to 1, the higher the probability
    result.pornObject-Obscene content rating information
    result.porn.confidenceFloat-Obscene content score (point)
    • 0 - 1
    • The closer to 1, the higher the probability
    result.sexyObject-Sexual content rating information
    result.sexy.confidenceFloat-Sexual content score (point)
    • 0 - 1
    • The closer to 1, the higher the probability
    latencyInteger-Response time (millisecond)
    confidenceFloat-Highest score (point)
    messageString-Response message
    nameString-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"
            }
        ]
    }
    

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.