create jobs
Developing
POST
/jobs
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.vidinfra.com/v1/jobs' \
--header 'Content-Type: application/json' \
--data-raw '{
"video_id": "abc123",
"upscale": true,
"webhook_config": {
"url": "https://custom-client-webhook.com/notify",
"headers": {
"authorization": "Bearer token",
"x-api-key": "api_key"
}
},
"source": {
"region": "us-west-1",
"type": "s3",
"is_passive": true,
"key": "source_key",
"secret": "source_secret",
"bucket": "source_secret",
"endpoint": "https://source-url.com",
"path": "/video.mp4",
"use_tls": true
},
"format": [
{
"output": "mp4",
"video_codec": "libx264",
"height": 1440,
"quality": 20,
"optimize_bitrate": 1,
"bitrate": "1000",
"audio_mute": true,
"video_codec_parameters": {
"min_rate": "100",
"max_rate": "1000",
"bufsize": "1",
"vprofile": "mediam",
"level": "31",
"coder": "0",
"directpred": "2",
"me_method": "hex",
"subq": "2`2`",
"trellis": "11313",
"refs": "11",
"cmp": "11",
"me_range": "1",
"sc_threshhold": "11",
"l_qfactor": "1",
"b_strategy": "1",
"qcomp": "11",
"qmin": "11",
"qdiff": "11",
"sws_flags": "11",
"preset": "media",
"flags": "101031",
"rc_lookahead": "1100"
},
"adjust_crf": "1",
"min_crf": "1",
"max_crf": "1",
"framerate": 30,
"keyframe": 90,
"aspect_ratio": "16:9",
"resize_mode": "crop",
"rotate": "10",
"start_time": "12",
"duration": "10",
"logo": {
"source": "https://wwww.sowhrwlrl11.com",
"x": "10",
"y": "10"
},
"hdr_to_sdr": 1,
"audio_bitrate": "64",
"audio_sample_rate": "44100",
"audio_channels_number": "2",
"color_space": "1",
"color_range": "1",
"color_trc": "1",
"color_primaries": "1"
},
{
"output": "advanced_hls",
"separate_audio": true,
"destination": {
"type": "s3",
"is_passive": false,
"key": "destination_key",
"secret": "destination_secret",
"bucket": "my_bucket",
"region": "us-west-1",
"path": "/path/to/destination",
"endpoint": "https://destination-url.com/",
"use_tls": true,
"permissions": true
},
"stream": [
{
"video_codec": "libx264",
"height": 2160,
"bitrate": 12000,
"framerate": "30",
"keyframe": "90"
},
{
"video_codec": "libx264",
"height": 1440,
"bitrate": 8500,
"framerate": "30",
"keyframe": "90"
}
],
"audio_mute": true,
"subtitles": {
"sources": [
{
"source": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/sub.txt",
"language": "eng"
}
],
"copy": 1
},
// "cenc_drm": {
// "key": "DRM encryption key",
// "key_id": "DRM encryption key id",
// "pssh": "DRM encryption PSSH",
// "la_url": "License server URL"
// },
"allow_soft_fail": 1,
"optimize_bitrate": 0,
"playlist_name": "playlist.m3u8",
"segment_duration": "6",
"encryption": {
"key": "key",
"iv": "iv",
"key_url": "https://ahmedraka.me"
}
},
{
"output": "advanced_mp4",
"separate_audio": true,
"destination": {
"type": "s3",
"is_passive": false,
"key": "destination_key",
"secret": "destination_secret",
"bucket": "my_bucket",
"region": "us-west-1",
"path": "/path/to/destination",
"endpoint": "https://destination-url.com/",
"use_tls": true,
"permissions": true
},
"stream": [
{
"video_codec": "libx264",
"height": 2160,
"bitrate": 12000,
"framerate": "30",
"keyframe": "90"
},
{
"video_codec": "libx264",
"height": 1440,
"bitrate": 8500,
"framerate": "30",
"keyframe": "90"
}
],
"audio_mute": true,
"subtitles": {
"sources": [
{
"source": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/sub.txt",
"language": "eng"
}
],
"copy": 1
},
"cenc_drm": {
"key": "DRM encryption key",
"key_id": "DRM encryption key id",
"pssh": "DRM encryption PSSH",
"la_url": "License server URL"
},
"allow_soft_fail": 1,
"optimize_bitrate": 0,
"playlist_name": "playlist.m3u8",
"segment_duration": "6",
// "encryption": {
// "key": "key",
// "iv": "iv",
// "key_url": "https://ahmedraka.me"
// }
},
{
"output": "thumbnail",
"image_format": "jpg",
"time": "0.1",
"height": 270,
"width": 270,
"destination": {
"type": "s3",
"is_passive": false,
"key": "destination_key",
"secret": "destination_secret",
"bucket": "my_bucket",
"region": "us-west-1",
"path": "/path/to/destination",
"endpoint": "https://destination-url.com/",
"use_tls": true,
"permissions": true
},
"allow_soft_fail": 1
},
{
"output": "gif",
"height": 180,
"width": 320,
"framerate": 15,
"destination": {
"type": "s3",
"is_passive": false,
"key": "destination_key",
"secret": "destination_secret",
"bucket": "my_bucket",
"region": "us-west-1",
"path": "/path/to/destination",
"endpoint": "https://destination-url.com/",
"use_tls": true,
"permissions": true
}
},
{
"output": "mp4",
"video_codec": "libx264",
"height": 2160,
"quality": 20,
"destination": {
"type": "s3",
"is_passive": false,
"key": "destination_key",
"secret": "destination_secret",
"bucket": "my_bucket",
"region": "us-west-1",
"path": "/path/to/destination",
"endpoint": "https://destination-url.com/",
"use_tls": true,
"permissions": true
},
"audio_mute": true,
"subtitles": {
"copy": 1
},
"deinterlace": true,
"allow_soft_fail": 1
},
{
"output": "speech_to_text",
"transcript": 1,
"json": 1,
"srt": 1,
"vtt": 1,
"mode": "balanced",
"destination": {
"type": "s3",
"is_passive": false,
"key": "destination_key",
"secret": "destination_secret",
"bucket": "my_bucket",
"region": "us-west-1",
"path": "/path/to/destination",
"endpoint": "https://destination-url.com/",
"use_tls": true,
"permissions": true
}
},
{
"output": "advanced_dash",
"separate_audio": true,
"destination": {
"type": "s3",
"is_passive": false,
"key": "destination_key",
"secret": "destination_secret",
"bucket": "my_bucket",
"region": "us-west-1",
"path": "/path/to/destination",
"endpoint": "https://destination-url.com/",
"use_tls": true,
"permissions": true
},
"stream": [
{
"video_codec": "libx264",
"height": 2160,
"optimize_bitrate": true,
"deinterlace": true,
"framerate": "12",
"keyframe": "90"
},
{
"video_codec": "libx264",
"height": 1440,
"optimize_bitrate": true,
"deinterlace": true,
"framerate": "12",
"keyframe": "90"
}
],
"playlist_name": "playlist.mpd",
"segment_duration": "6",
"audio_mute": true,
"subtitles": {
"sources": [
{
"source": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/sub.txt",
"language": "eng"
}
],
"copy": 1
},
"cenc_drm": {
"key": "DRM encryption key",
"key_id": "DRM encryption key id",
"pssh": "DRM encryption PSSH",
"la_url": "License server URL"
},
"allow_soft_fail": 1
}
]
}'
Response Response Example
200 - Success - Success
{"message":"Transcoding job created successfully","result":{"video_id":"video123","webhook_config":{"url":"https://example.com/webhook","headers":{"authorization":"Bearer token123"}},"source":{"region":"us-east-1","type":"s3","key":"source_access_key","secret":"source_secret_key","bucket":"source-bucket","endpoint":"https://s3.amazonaws.com","path":"/input/video.mp4"},"format":[{"output":"hls","separate_audio":false,"destination":{"type":"s3","key":"dest_access_key","secret":"dest_secret_key","bucket":"destination-bucket","region":"us-east-1","path":"/output/hls","endpoint":"https://s3.amazonaws.com","permissions":false},"stream":[{"video_codec":"libx264","height":720,"bitrate":2000,"framerate":"30","keyframe":""}],"audio_mute":false,"subtitles":null,"cenc_drm":null,"allow_soft_fail":0,"optimize_bitrate":0,"playlist_name":"master.m3u8","segment_duration":"6","encryption":null,"image_format":"","time":"","height":0,"width":0,"framerate":0,"quality":0,"transcript":0,"json":0,"srt":0,"vtt":0,"mode":"","deinterlace":false},{"output":"thumbnail","separate_audio":false,"destination":{"type":"s3","key":"dest_access_key","secret":"dest_secret_key","bucket":"destination-bucket","region":"us-east-1","path":"/output/thumbnail","endpoint":"https://s3.amazonaws.com","permissions":false},"stream":null,"audio_mute":false,"subtitles":null,"cenc_drm":null,"allow_soft_fail":0,"optimize_bitrate":0,"playlist_name":"","segment_duration":"","encryption":null,"image_format":"jpg","time":"00:00:05","height":360,"width":640,"framerate":0,"quality":0,"transcript":0,"json":0,"srt":0,"vtt":0,"mode":"","deinterlace":false}]},"success":true}
Request
Body Params application/json
Responses
Modified at 2025-06-19 04:59:01