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/sr/v4/credit/calc" \
-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": 10123,
"duration": 1123
}'

request body field#

field mandatory description
task_typerequired
  • SR : create a SR task.
  • SR_PREVIEW : create a SR preview task.
    • when calculates a credit, only supported a SR task_type.
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
{
"credit": 5
}

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'"
}