Video Converter API
Convert, Transcode, and Optimize Video Files Programmatically.
Code Examples in Popular Languages
Integrate our Video Converter API easily into your apps with comprehensive code examples in popular languages to get started quickly.
curl --location 'https://theonlineconverter.com/api/v1/video-converter' \
--header 'Content-Type: application/json' \
--header 'x-api-key: enter_your_api_key' \
--form 'from="enter_supported_format"' \
--form 'to="enter_supported_format"' \
--form 'file=@"/D:/data/Video/mp4/OneCameraFinalVideo.mp4"' \
--form 'cut_from=""' \
--form 'cut_to=""' \
--form 'audio_codec="pcm_s16le"' \
--form 'audio_channel=""' \
--form 'frequency=""' \
--form 'volume=""' \
--form 'video_codec="libx264"' \
--form 'video_resolution=""' \
--form 'ratio=""' \
--form 'quality="23"' \
--form 'speed="medium"' \
--form 'fit="scale"'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
.addFormDataPart("from","enter_supported_format")
.addFormDataPart("to","enter_supported_format")
.addFormDataPart("file","/D:/data/Video/mp4/OneCameraFinalVideo.mp4",
RequestBody.create(MediaType.parse("application/octet-stream"),
new File("/D:/data/Video/mp4/OneCameraFinalVideo.mp4")))
.addFormDataPart("cut_from","")
.addFormDataPart("cut_to","")
.addFormDataPart("audio_codec","pcm_s16le")
.addFormDataPart("audio_channel","")
.addFormDataPart("frequency","")
.addFormDataPart("volume","")
.addFormDataPart("video_codec","libx264")
.addFormDataPart("video_resolution","")
.addFormDataPart("ratio","")
.addFormDataPart("quality","23")
.addFormDataPart("speed","medium")
.addFormDataPart("fit","scale")
.build();
Request request = new Request.Builder()
.url("https://theonlineconverter.com/api/v1/video-converter")
.method("POST", body)
.addHeader("Content-Type", "application/json")
.addHeader("x-api-key", "enter_your_api_key")
.build();
Response response = client.newCall(request).execute();
import requests
import json
url = "https://theonlineconverter.com/api/v1/video-converter"
payload = {'from': 'enter_supported_format',
'to': 'enter_supported_format',
'cut_from': '',
'cut_to': '',
'audio_codec': 'pcm_s16le',
'audio_channel': '',
'frequency': '',
'volume': '',
'video_codec': 'libx264',
'video_resolution': '',
'ratio': '',
'quality': '23',
'speed': 'medium',
'fit': 'scale'}
files=[
('file',('OneCameraFinalVideo.mp4',open('/D:/data/Video/mp4/OneCameraFinalVideo.mp4','rb'),'application/octet-stream'))
]
headers = {
'Content-Type': 'application/json',
'x-api-key': 'enter_your_api_key'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
import requests
import json
url = "https://theonlineconverter.com/api/v1/video-converter"
payload = {'from': 'enter_supported_format',
'to': 'enter_supported_format',
'cut_from': '',
'cut_to': '',
'audio_codec': 'pcm_s16le',
'audio_channel': '',
'frequency': '',
'volume': '',
'video_codec': 'libx264',
'video_resolution': '',
'ratio': '',
'quality': '23',
'speed': 'medium',
'fit': 'scale'}
files=[
('file',('OneCameraFinalVideo.mp4',open('/D:/data/Video/mp4/OneCameraFinalVideo.mp4','rb'),'application/octet-stream'))
]
headers = {
'Content-Type': 'application/json',
'x-api-key': 'enter_your_api_key'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
<?php
$client = new Client();
$headers = [
'Content-Type' => 'application/json',
'x-api-key' => 'enter_your_api_key'
];
$options = [
'multipart' => [
[
'name' => 'from',
'contents' => 'enter_supported_format'
],
[
'name' => 'to',
'contents' => 'enter_supported_format'
],
[
'name' => 'file',
'contents' => Utils::tryFopen('/D:/data/Video/mp4/OneCameraFinalVideo.mp4', 'r'),
'filename' => '/D:/data/Video/mp4/OneCameraFinalVideo.mp4',
'headers' => [
'Content-Type' => '<Content-type header>'
]
],
[
'name' => 'cut_from',
'contents' => ''
],
[
'name' => 'cut_to',
'contents' => ''
],
[
'name' => 'audio_codec',
'contents' => 'pcm_s16le'
],
[
'name' => 'audio_channel',
'contents' => ''
],
[
'name' => 'frequency',
'contents' => ''
],
[
'name' => 'volume',
'contents' => ''
],
[
'name' => 'video_codec',
'contents' => 'libx264'
],
[
'name' => 'video_resolution',
'contents' => ''
],
[
'name' => 'ratio',
'contents' => ''
],
[
'name' => 'quality',
'contents' => '23'
],
[
'name' => 'speed',
'contents' => 'medium'
],
[
'name' => 'fit',
'contents' => 'scale'
]
]];
$request = new Request('POST', 'https://theonlineconverter.com/api/v1/video-converter', $headers);
$res = $client->sendAsync($request, $options)->wait();
echo $res->getBody();
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
.addFormDataPart("from","enter_supported_format")
.addFormDataPart("to","enter_supported_format")
.addFormDataPart("file","/D:/data/Video/mp4/OneCameraFinalVideo.mp4",
RequestBody.create(MediaType.parse("application/octet-stream"),
new File("/D:/data/Video/mp4/OneCameraFinalVideo.mp4")))
.addFormDataPart("cut_from","")
.addFormDataPart("cut_to","")
.addFormDataPart("audio_codec","pcm_s16le")
.addFormDataPart("audio_channel","")
.addFormDataPart("frequency","")
.addFormDataPart("volume","")
.addFormDataPart("video_codec","libx264")
.addFormDataPart("video_resolution","")
.addFormDataPart("ratio","")
.addFormDataPart("quality","23")
.addFormDataPart("speed","medium")
.addFormDataPart("fit","scale")
.build();
Request request = new Request.Builder()
.url("https://theonlineconverter.com/api/v1/video-converter")
.method("POST", body)
.addHeader("Content-Type", "application/json")
.addHeader("x-api-key", "enter_your_api_key")
.build();
Response response = client.newCall(request).execute();
package main
import (
"fmt"
"bytes"
"mime/multipart"
"os"
"path/filepath"
"net/http"
"io"
)
func main() {
url := "https://theonlineconverter.com/api/v1/video-converter"
method := "POST"
payload := &bytes.Buffer{}
writer := multipart.NewWriter(payload)
_ = writer.WriteField("from", "enter_supported_format")
_ = writer.WriteField("to", "enter_supported_format")
file, errFile3 := os.Open("/D:/data/Video/mp4/OneCameraFinalVideo.mp4")
defer file.Close()
part3,
errFile3 := writer.CreateFormFile("file",filepath.Base("/D:/data/Video/mp4/OneCameraFinalVideo.mp4"))
_, errFile3 = io.Copy(part3, file)
if errFile3 != nil {
fmt.Println(errFile3)
return
}
_ = writer.WriteField("cut_from", "")
_ = writer.WriteField("cut_to", "")
_ = writer.WriteField("audio_codec", "pcm_s16le")
_ = writer.WriteField("audio_channel", "")
_ = writer.WriteField("frequency", "")
_ = writer.WriteField("volume", "")
_ = writer.WriteField("video_codec", "libx264")
_ = writer.WriteField("video_resolution", "")
_ = writer.WriteField("ratio", "")
_ = writer.WriteField("quality", "23")
_ = writer.WriteField("speed", "medium")
_ = writer.WriteField("fit", "scale")
err := writer.Close()
if err != nil {
fmt.Println(err)
return
}
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("x-api-key", "enter_your_api_key")
req.Header.Set("Content-Type", writer.FormDataContentType())
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
var options = new RestClientOptions("https://theonlineconverter.com")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/api/v1/video-converter", Method.Post);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("x-api-key", "enter_your_api_key");
request.AlwaysMultipartFormData = true;
request.AddParameter("from", "enter_supported_format");
request.AddParameter("to", "enter_supported_format");
request.AddFile("file", "/D:/data/Video/mp4/OneCameraFinalVideo.mp4");
request.AddParameter("cut_from", "");
request.AddParameter("cut_to", "");
request.AddParameter("audio_codec", "pcm_s16le");
request.AddParameter("audio_channel", "");
request.AddParameter("frequency", "");
request.AddParameter("volume", "");
request.AddParameter("video_codec", "libx264");
request.AddParameter("video_resolution", "");
request.AddParameter("ratio", "");
request.AddParameter("quality", "23");
request.AddParameter("speed", "medium");
request.AddParameter("fit", "scale");
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
Key Features & Capabilities
Our API is a complete video processing toolkit, engineered for quality, speed, and maximum compatibility.
Extensive Format Support
Convert between all major video containers and codecs, including MP4, MOV, WEBM, AVI, MKV, and many more.
Resolution & Resizing Control
Easily resize videos to standard resolutions like 4K, 1080p, 720p, or set custom dimensions to fit any screen or container.
Bitrate & Quality Optimization
Take full control of the output quality and file size by specifying the video and audio bitrates, perfect for optimizing content for web streaming.
Web-Optimized Outputs
Effortlessly create videos perfect for the web using modern, efficient codecs like H.264, H.265 (HEVC), and VP9 (for WEBM).
Automatic Thumbnail Generation
Programmatically capture a thumbnail image from any point in the video, simplifying the creation of video previews.
Secure & Confidential
All video files are processed over encrypted connections. We guarantee confidentiality with a strict data privacy policy and do not store your files.
Frequently Asked Questions
Find answers to common questions about our Video Converter API to understand its full range of capabilities.

























