Skip to main content
POST
/
api
/
jobs
/
Enhance uploaded video
curl --request POST \
  --url https://backend.tensorpix.ai/api/jobs/ \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "codec": "libx264",
  "crf": 25,
  "qscale": 16,
  "container": "mov",
  "chroma_subsampling": "yuv420p",
  "preview": true,
  "start_frame": 1073741823,
  "end_frame": 1073741824,
  "input_video": 123,
  "output_video": 123,
  "ml_models": [
    123
  ],
  "output_resolution": -1,
  "grain": 0.5,
  "comparison": true,
  "stabilization_smoothing": 20,
  "target_fps": 120.5,
  "playback_speed": 0.55,
  "sharpen_strength": 5,
  "prores_profile": -1
}'
{
  "id": 123,
  "codec": "libx264",
  "crf": 25,
  "qscale": 16,
  "container": "mov",
  "chroma_subsampling": "yuv420p",
  "preview": true,
  "start_frame": 1073741823,
  "end_frame": 1073741824,
  "input_video": 123,
  "output_video": 123,
  "owner": "[email protected]",
  "ml_models": [
    123
  ],
  "output_resolution": -1,
  "grain": 0.5,
  "comparison": true,
  "stabilization_smoothing": 20,
  "target_fps": 120.5,
  "playback_speed": 0.55,
  "sharpen_strength": 5,
  "cost_usd": "<string>",
  "prores_profile": -1
}

Authorizations

Authorization
string
header
required

Token-based authentication with required prefix "Token"

Body

ml_models
integer[]
required
codec
enum<string>

Codec used for the Enhanced video.

  • libx264 - H264
  • libx265 - HEVC/H265
  • prores_ks - Apple ProRes
Available options:
libx264,
libx265,
prores_ks
crf
integer

Constant Rate Factor (CRF) is encoding quality of the output video. 23 is a good starting value. Set to 20 or lower if you need very high quality encoding (increased file size), or higher than 25 if quality is not paramount (smaller file size). Learn more about CRF.

Required range: 0 <= x <= 51
qscale
integer

Represents the qscale parameter in ffmpeg. Used with ProRes codec. Set the value between 9 and 13 for optimal results. Learn more about Qscale

Required range: 0 <= x <= 32
container
enum<string>

Container format of the Enhanced video.

  • mov - Mov
  • mkv - Mkv
  • mp4 - Mp4
Available options:
mov,
mkv,
mp4
chroma_subsampling
  • yuv420p - 8-bit 4:2:0
  • yuv422p - 8-bit 4:2:2
  • yuv444p - 8-bit 4:4:4
  • yuv420p10le - 10-bit 4:2:0
  • yuv422p10le - 10-bit 4:2:2
  • yuv444p10le - 10-bit 4:4:4
Available options:
yuv420p,
yuv422p,
yuv444p,
yuv420p10le,
yuv422p10le,
yuv444p10le
preview
boolean

Flag which denotes if job is free preview job or not. Free preview jobs are not charged but the output video is watermarked and only a short video segment is enhanced.

start_frame
integer | null

Cuts the video starting from this frame before enhancing it.

Required range: 0 <= x <= 2147483647
end_frame
integer | null

Cuts the video ending on this frame before enhancing it.

Required range: 1 <= x <= 2147483647
input_video
integer | null
output_video
integer | null

Once the job is finished, the output_video attribute will be populated with the enhanced video metadata. If the job is canceled or it fails, the output_video attribute will remain null.

output_resolution
enum<integer>
  • -1 - No Resize
  • 640 - 360p
  • 720 - SD
  • 854 - HQ
  • 1280 - 720p
  • 1920 - 1080p
  • 2048 - 2K
  • 2560 - QHD
  • 3840 - 4K
Available options:
-1,
640,
720,
854,
1280,
1920,
2048,
2560,
3840
grain
number

Grain amount to add to the enhanced video in range [0, 1]. 0 is default.

Required range: 0 <= x <= 1
comparison
boolean

Flag which denotes if the output video will be side by side video of the original and enhanced video.

stabilization_smoothing
integer

If AI Stabilization filter is enabled, this parameter controls the intensity of stabilization. Ignored if AI Stabilization is disabled. Use higher values for very shaky videos, and lower strength for less shaky videos. Video may be zoomed in if the video is very shaky.

Required range: 0 <= x <= 40
target_fps
number

Target FPS for the enhanced video. If not provided, the original FPS will be used. If provided, should be greater than or equal to the original FPS. If lower, it will be set to the original FPS. IMPORTANT: Won't be applied if the FPS BOOST model isn't passed in ml_models.

Required range: 1 <= x <= 240
playback_speed
number

Playback speed of the video. 1.0 means the video will play at normal speed. 0.5 means the video will play at half speed with AI interpolated frames in between. IMPORTANT: Won't be applied if the SLOW MOTION model isn's passed in ml_models.

Required range: 0.1 <= x <= 1
sharpen_strength
number

If AI Sharpen filter is enabled, this parameter controls the intensity of sharpening. Ignored if AI Sharpen filter is disabled.

Required range: 0 <= x <= 10
prores_profile
enum<integer>
  • -1 - Auto
  • 0 - Proxy
  • 1 - Lt
  • 2 - Standard
  • 3 - Hq
  • 4 - V4444
  • 5 - V4444Xq
Available options:
-1,
0,
1,
2,
3,
4,
5

Response

id
integer
required
owner
string<email>
required
ml_models
integer[]
required
cost_usd
string<decimal>
required

Job cost in 🪙 Credits.

codec
enum<string>

Codec used for the Enhanced video.

  • libx264 - H264
  • libx265 - HEVC/H265
  • prores_ks - Apple ProRes
Available options:
libx264,
libx265,
prores_ks
crf
integer

Constant Rate Factor (CRF) is encoding quality of the output video. 23 is a good starting value. Set to 20 or lower if you need very high quality encoding (increased file size), or higher than 25 if quality is not paramount (smaller file size). Learn more about CRF.

Required range: 0 <= x <= 51
qscale
integer

Represents the qscale parameter in ffmpeg. Used with ProRes codec. Set the value between 9 and 13 for optimal results. Learn more about Qscale

Required range: 0 <= x <= 32
container
enum<string>

Container format of the Enhanced video.

  • mov - Mov
  • mkv - Mkv
  • mp4 - Mp4
Available options:
mov,
mkv,
mp4
chroma_subsampling
  • yuv420p - 8-bit 4:2:0
  • yuv422p - 8-bit 4:2:2
  • yuv444p - 8-bit 4:4:4
  • yuv420p10le - 10-bit 4:2:0
  • yuv422p10le - 10-bit 4:2:2
  • yuv444p10le - 10-bit 4:4:4
Available options:
yuv420p,
yuv422p,
yuv444p,
yuv420p10le,
yuv422p10le,
yuv444p10le
preview
boolean

Flag which denotes if job is free preview job or not. Free preview jobs are not charged but the output video is watermarked and only a short video segment is enhanced.

start_frame
integer | null

Cuts the video starting from this frame before enhancing it.

Required range: 0 <= x <= 2147483647
end_frame
integer | null

Cuts the video ending on this frame before enhancing it.

Required range: 1 <= x <= 2147483647
input_video
integer | null
output_video
integer | null

Once the job is finished, the output_video attribute will be populated with the enhanced video metadata. If the job is canceled or it fails, the output_video attribute will remain null.

output_resolution
enum<integer>
  • -1 - No Resize
  • 640 - 360p
  • 720 - SD
  • 854 - HQ
  • 1280 - 720p
  • 1920 - 1080p
  • 2048 - 2K
  • 2560 - QHD
  • 3840 - 4K
Available options:
-1,
640,
720,
854,
1280,
1920,
2048,
2560,
3840
grain
number

Grain amount to add to the enhanced video in range [0, 1]. 0 is default.

Required range: 0 <= x <= 1
comparison
boolean

Flag which denotes if the output video will be side by side video of the original and enhanced video.

stabilization_smoothing
integer

If AI Stabilization filter is enabled, this parameter controls the intensity of stabilization. Ignored if AI Stabilization is disabled. Use higher values for very shaky videos, and lower strength for less shaky videos. Video may be zoomed in if the video is very shaky.

Required range: 0 <= x <= 40
target_fps
number

Target FPS for the enhanced video. If not provided, the original FPS will be used. If provided, should be greater than or equal to the original FPS. If lower, it will be set to the original FPS. IMPORTANT: Won't be applied if the FPS BOOST model isn't passed in ml_models.

Required range: 1 <= x <= 240
playback_speed
number

Playback speed of the video. 1.0 means the video will play at normal speed. 0.5 means the video will play at half speed with AI interpolated frames in between. IMPORTANT: Won't be applied if the SLOW MOTION model isn's passed in ml_models.

Required range: 0.1 <= x <= 1
sharpen_strength
number

If AI Sharpen filter is enabled, this parameter controls the intensity of sharpening. Ignored if AI Sharpen filter is disabled.

Required range: 0 <= x <= 10
prores_profile
enum<integer>
  • -1 - Auto
  • 0 - Proxy
  • 1 - Lt
  • 2 - Standard
  • 3 - Hq
  • 4 - V4444
  • 5 - V4444Xq
Available options:
-1,
0,
1,
2,
3,
4,
5