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/v4/task" \
-H "Content-Type:application/json" \
-H 'Authorization:eyJraWQiOiJPMGs5...eyJzdWIiOiIzN2U3NzYxM' \
-d '{
"task_type": "SR",
"ai_model_name" : "bluewhale",
"use_film_grain" : true,
"use_color_grading" : true,
"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.
ai_model_namerequiredselect a ai_model_name
  • bluewhale
  • walrus
  • walrus_sports
  • sealion
  • stingray
  • dolphin
  • manta
  • coral
use_film_grainrequired
  • true : use a film grain effect.
  • false : do not use a film grain effect.
use_color_gradingrequired
  • true : use a color grading effect.
  • false : do not use a color grading effect.
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
  • h264
  • h265
formatoptional(default : mp4)output(SR) format
  • mp4
  • mov
  • mkv
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"
}