Create a SR task

  • Request SR(super-resolution) with original file and various options.

task request#

bash
curl -X POST \
"https://develop.kokoon.cloud/kokoon/api/sr/v3/task" \
-H "Content-Type:application/json" \
-H 'Authorization:eyJraWQiOiJPMGs5...eyJzdWIiOiIzN2U3NzYxM' \
-d '{
"task_type": "SR",
"category" : "person",
"use_sr" : true,
"input_quality" : "medium",
"option": {
"face_enhance": false,
"denoise": false,
"deinterlace": false,
"add_noise": false
},
"vid": "8eb18100-3aa0-11ee-a8b4-73df6b5af037",
"width": 1920,
"height": 1080,
"start_pos": 2000,
"duration": 1000,
"codec": "h264",
"format": "mp4",
"use_trim_orig" : true
}'

request body field#

field mandatory description
task_typerequired
  • SR : create a SR task.
  • SR_PREVIEW : create a SR preview task.
categoryrequiredselect input(original) file's video-type
  • person
  • animation : if a animation is selected, AI-options(all of face_enhance, denoise, add_noise except deinterlace) will be ignored.
  • cg : if a cg is selected, AI-options(all of face_enhance, denoise, add_noise except deinterlace) 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 : use face-enhancement.(true or false)
  • denoise : use denoise.(true or false)
  • deinterlace : use deinterlace.(true or false)
  • add_noise : use film-grain.(true or false)
vidrequiredoriginal files' unique video id.
widthrequiredoutput(SR) width
heightrequiredoutput(SR) height
start_posoptional(default : 0)input(original) file's start-position to convert SR.(millisecond)
  • start_pos=0 and duration=0 means to conver SR for a whole file.
durationoptional(default : 0)duration from start-positon to convert SR.(millisecond)
  • start_pos=0 and duration=0 means to conver SR for a whole file.
codecoptional(default : h264)output(SR) codec
formatoptional(default : mp4)output(SR) format
use_trim_origoptional(default : false)if true, a trimmed range(with start_pos and duration) of original file will be created as a new original file.
  • if start_pos=0 and duration=0 is set(it's mean a whole file), cannot set use_trim_org with true.

response#

json
{
"tid": "7ebbf920-b9ed-11ee-8fa6-17cde62e8e05",
"in_vid": "a600c7e0-b5d3-11ee-8bc1-e3593f7b2d5c",
"out_vid": "7ebbf921-b9ed-11ee-8fa6-17cde62e8e05"
}

response body field#

field type description
tidstringtask unique id
in_vidstringinput(original) video unique id
out_vidstringoutput(SR result) video unique id

error response#

  • insufficient credit.
json
{
"message": "insufficient credit"
}