POST
/
api
/
jobs
/
from-url
/
Enhance a video from URL
curl --request POST \
  --url https://backend.tensorpix.ai/api/jobs/from-url/ \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "codec": "libx264",
  "crf": 25,
  "container": "mov",
  "chroma_subsampling": "yuv420p",
  "video_url": "<string>",
  "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,
  "preview": false,
  "start_frame": 1073741823,
  "end_frame": 1073741824
}'
{
  "id": 123,
  "cost_usd": "<string>",
  "input_video": 123,
  "status": 0
}

Authorizations

Authorization
string
header
required

Token-based authentication with required prefix "Token"

Body

video_url
string<uri>
required

Video URL. The URL must be accessible. Example: https://sample-videos.com/video321/mp4/720/big_buck_bunny_720p_1mb.mp4

Required string length: 1 - 2048
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
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
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
preview
boolean
default:false
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

Response

id
integer
required
cost_usd
string<decimal>
required

Job cost in 🪙 Credits.

input_video
integer | null
status
enum<integer>

Job's status

  • 0 - In Queue
  • 1 - Processing
  • 2 - Finished
  • -1 - Failed
  • -2 - Canceled
Available options:
0,
1,
2,
-1,
-2