CLOVA GreenEye Custom API
- Print
- PDF
CLOVA GreenEye Custom API
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
version
Version | Date | Changes |
---|---|---|
v1.0.0 | 2022-12-15 | Initial 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
Header | Description |
---|---|
X-GREEN-EYE-SECRET | X-GREEN-EYE-SECRET:{Client Secret} created when linking API Gateway from the domain |
Content-Type | application/json : request use json body. Support images.url or images.data encoded with base64. |
Request bodies
Content-Type : application/json
Recognition request
Type Json 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 name Data type required Description version string Y V1 requestId string Y API call UUID timestamp number Y API call timestamp value images json array Y This is entered as JSON arrays, and only one image can be entered currently images[].name string Y Enter image name. This will be used when you recognize the image and check the response result images[].url string N Either images.url or images.data must exist.
The URL must be public to retrieve imageimages[].data string N Either 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
Type Json 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 name Data type alwaysExists Description name string Y Name of the requested image message string Y The "SUCCESS" message is displayed when the image is successfully recognized
If image recognition fails, an error message is displayedresult json object Y result.adult json object Y result.adult.confidence float Y 'Adult-only' image score (0-1 point) result.normal json object Y result.normal.confidence float Y 'Normal' image score (0-1 point) result.porn json object Y result.porn.confidence float Y 'Obscene' image score (0-1 point) result.sexy json object Y result.sexy.confidence float Y 'Sexual' image score (0-1 point) latency int Y Response time (milliseconds) confidence float Y
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?