Calculate a credit for SR task

  • Request a calculation of credit for SR(super-resolution).

task request#

bash
curl -X POST \
"https://develop.kokoon.cloud/kokoon/api/image/sr/v3/credit/calc" \
-H "Content-Type:application/json" \
-H 'Authorization:eyJraWQiOiJPMGs5...eyJzdWIiOiIzN2U3NzYxM' \
-d '{
"task_type": "SR_IMAGE",
"category" : "person",
"use_sr" : true,
"input_quality" : "medium",
"option": {
"face_enhance": false,
"denoise": false,
"add_noise": false
},
"vid": "8eb18100-3aa0-11ee-a8b4-73df6b5af037",
"width": 1920,
"height": 1080
}'

request body field#

field mandatory description
task_typerequired
  • SR_IMAGE : create a SR_IMAGE task.
  • SR_IMAGE_PREVIEW : create a SR_IMAGE_PREVIEW task.
    • when calculates a credit, only supported a SR_IMAGE task_type.
categoryrequiredselect input(original) file's image-type
  • person
  • animation : if a animation is selected, AI-options(all of face_enhance, denoise, add_noise) will be ignored.
  • cg : if a cg is selected, AI-options(all of face_enhance, denoise, add_noise) will be ignored.
  • retro
  • general
use_srrequired
  • true : do not use SR(super-resolution).
  • false : use SR(super-resolution).
input_qualityrequiredselect input(original) file's quality
  • high
  • medium
optionrequiredselect a AI-option with true or false.
  • face_enhance : true or false
  • denoise : true or false
  • add_noise : true or false
vidrequiredoriginal files' unique image id.
widthrequiredoutput(SR) width
heightrequiredoutput(SR) height
formatoptional(default : png)output(SR) format

response#

json
{
"credit": 1
}

response body field#

field type description
creditstringa needed credit for SR task.

error response#

  • invalid body format.
json
{
"message": "must have required property 'use_sr'"
}