CLOVA GreenEye Custom API
    • PDF

    CLOVA GreenEye Custom API

    • PDF

    Article summary

    version

    VersionDateChanges
    v1.0.02022-12-15Initial creation

    Request headers

    If you create a domain in the CLOVA GreenEye service, you can check the Secret Key and APIGW Invoke URL through API integration settings.

    • ${Invoke URL}: copy from Domain > API connection settings
    • ${Secret Key}: copy from Domain > API connection settings
    HeaderDescription
    X-GREEN-EYE-SECRETX-GREEN-EYE-SECRET:{Client Secret} created when linking API Gateway from the domain
    Content-Typeapplication/json : request use json body. Support images.url or images.data encoded with base64.

    Request bodies

    Content-Type : application/json

    • Recognition request

      TypeJson Model
      Image recognition request{
      "version": "V1",,
      "requestId": "requestId",
      "timestamp": 1666321382401,
      "images": [{
      "name": "demo",
      "url": "https://kr.object.ncloudstorage.com/demo.jpg",
      "data": "base64"
      }]
      }
    • Recognition request field details

      Field nameData typerequiredDescription
      versionstringYV1
      requestIdstringYAPI call UUID
      timestampnumberYAPI call timestamp value
      imagesjson arrayYThis is entered as JSON arrays, and only one image can be entered currently
      images[].namestringYEnter image name. This will be used when you recognize the image and check the response result
      images[].urlstringNEither images.url or images.data must exist.
      The URL must be public to retrieve image
      images[].datastringNEither images.url or images.data must exist. If both URL and data exist, use data and ignore URL
      images.data is base64 encoding image byte

    Responses

    Response bodies

    Request version is 'V1'

    • Recognition result

      TypeJson Model
      Recognition result{
      "version": "V1",
      "requestId": "requestId",
      "timestamp": 1666321382401,
      "images": [
      {
      "message": "SUCCESS",
      "name": "demo",
      "result": {
      "adult": {
      "confidence": 0.02559172734618187
      },
      "normal": {
      "confidence": 0.9171954393386841
      },
      "porn": {
      "confidence": 0.03023086115717888
      },
      "sexy": {
      "confidence": 0.02698194608092308
      }
      },
      "latency": 123.0,
      "confidence": 0.9171954393386841
      }
      ]
      }
    • Recognition result field details

      Field nameData typealwaysExistsDescription
      namestringYName of the requested image
      messagestringYThe "SUCCESS" message is displayed when the image is successfully recognized
      If image recognition fails, an error message is displayed
      resultjson objectY
      result.adultjson objectY
      result.adult.confidencefloatY'Adult-only' image score (0-1 point)
      result.normaljson objectY
      result.normal.confidencefloatY'Normal' image score (0-1 point)
      result.pornjson objectY
      result.porn.confidencefloatY'Obscene' image score (0-1 point)
      result.sexyjson objectY
      result.sexy.confidencefloatY'Sexual' image score (0-1 point)
      latencyintYResponse time (milliseconds)
      confidencefloatY

    Examples

    Request examples

    curl -X POST 'https://clovagreeneye.apigw.ntruss.com/custom/v1/{domainId}/{signature}/predict' -H 'X-GREEN-EYE-SECRET: {Client Secret}' -H 'Content-Type: application/json' -d '{"version":"V1","requestId":"xxx","timestamp":0,"images":[{"name":"demo","url":"https://kr.object.ncloudstorage.com/test/test.jpg"}]}'
    

    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.