Video Converter API

Convert, Transcode, and Optimize Video Files Programmatically.

hero banner

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 Request
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"'
JavaScript Fetch
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();
Ruby Net::HTTP
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)
Python Requests
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 Guzzle
<?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();
Java HttpURLConnection
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();
Go net/http
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))
}
C# HttpClient
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.

Simple User Interface

Extensive Format Support

Convert between all major video containers and codecs, including MP4, MOV, WEBM, AVI, MKV, and many more.

Simple Data Format

Resolution & Resizing Control

Easily resize videos to standard resolutions like 4K, 1080p, 720p, or set custom dimensions to fit any screen or container.

Time

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.

Secure Data

Web-Optimized Outputs

Effortlessly create videos perfect for the web using modern, efficient codecs like H.264, H.265 (HEVC), and VP9 (for WEBM).

Universal Access

Automatic Thumbnail Generation

Programmatically capture a thumbnail image from any point in the video, simplifying the creation of video previews.

Freedom

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.

The main reasons are compatibility and optimization. A `.MOV` file from an iPhone might not play on a Windows PC or in a web browser. Converting it to the universal `.MP4` format ensures it plays everywhere. You also convert to reduce file size for faster streaming.

MP4 with the H.264 codec is the most universally supported format and will play on virtually any browser and device. WEBM with the VP9 codec is a modern, highly efficient alternative supported by most major browsers.

Bitrate is the amount of data used to encode the video per second. A higher bitrate means better quality but a much larger file size. A lower bitrate results in a smaller file but can introduce visual artifacts. For 1080p web video, a bitrate between 2,000k and 5,000k is a good starting point.

Yes. You can pass `start_time` and `duration` parameters in your API call to specify the exact clip you want to convert into an animated GIF.

Transcoding time depends on the video's length, resolution, and the complexity of the conversion. However, our API is highly optimized for speed, and most jobs are completed very quickly.

Yes. This is called thumbnail generation. You can specify a time in the video (e.g., "00:00:05" for the 5-second mark) and set the output format to JPG or PNG to capture a still image.

Absolutely. We use end-to-end TLS encryption for all data transfers. Your video files are processed securely and are permanently deleted from our servers immediately after the job is complete.