Legacy API (v1)

API Documentation

To make successful API requests, you need a verified account click here to sign up if you do not have an account already.

You can generate your API key in your MP4.to dashboard under the Developers section.

File to MP4

MP4.to API allow users to convert files to MP4:

mp3, wav, m4a, flac, wma, aiff, aac, mp2, m4r, ogg, ima, ac3, amr, dts, opus, avi, wmv, mpeg, mov, mpg, divx, webm, mpeg-2, mjpeg, flv, 3gp, vob, av1, m4v

MP3 to MP4

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp3', 'rb')}
params = {
    'convert_to': 'mp4'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.mp4', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp3', 'rb')}
params = {
    'convert_to': 'mp4',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.mp4'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp3' \
-F 'data={"convert_to": "mp4"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.mp4
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp3' \
-F 'data={"convert_to": "mp4", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\"}",
        "file_contents" => curl_file_create("testing.mp3")
    );
    $fp = fopen("file.mp4", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.mp3")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert MP3 files to MP4 you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: mp4
  • To get a ZIP file you can pass zip: true

WAV to MP4

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.wav', 'rb')}
params = {
    'convert_to': 'mp4'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.mp4', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.wav', 'rb')}
params = {
    'convert_to': 'mp4',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.mp4'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.wav' \
-F 'data={"convert_to": "mp4"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.mp4
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.wav' \
-F 'data={"convert_to": "mp4", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\"}",
        "file_contents" => curl_file_create("testing.wav")
    );
    $fp = fopen("file.mp4", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.wav")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert WAV files to MP4 you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: mp4
  • To get a ZIP file you can pass zip: true

M4A to MP4

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.m4a', 'rb')}
params = {
    'convert_to': 'mp4'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.mp4', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.m4a', 'rb')}
params = {
    'convert_to': 'mp4',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.mp4'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.m4a' \
-F 'data={"convert_to": "mp4"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.mp4
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.m4a' \
-F 'data={"convert_to": "mp4", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\"}",
        "file_contents" => curl_file_create("testing.m4a")
    );
    $fp = fopen("file.mp4", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.m4a")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: mp4
  • To get a ZIP file you can pass zip: true

FLAC to MP4

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.flac', 'rb')}
params = {
    'convert_to': 'mp4'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.mp4', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.flac', 'rb')}
params = {
    'convert_to': 'mp4',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.mp4'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.flac' \
-F 'data={"convert_to": "mp4"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.mp4
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.flac' \
-F 'data={"convert_to": "mp4", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\"}",
        "file_contents" => curl_file_create("testing.flac")
    );
    $fp = fopen("file.mp4", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.flac")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert FLAC files to MP4 you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: mp4
  • To get a ZIP file you can pass zip: true

WMA to MP4

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.wma', 'rb')}
params = {
    'convert_to': 'mp4'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.mp4', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.wma', 'rb')}
params = {
    'convert_to': 'mp4',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.mp4'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.wma' \
-F 'data={"convert_to": "mp4"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.mp4
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.wma' \
-F 'data={"convert_to": "mp4", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\"}",
        "file_contents" => curl_file_create("testing.wma")
    );
    $fp = fopen("file.mp4", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.wma")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert WMA files to MP4 you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: mp4
  • To get a ZIP file you can pass zip: true

AIFF to MP4

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.aiff', 'rb')}
params = {
    'convert_to': 'mp4'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.mp4', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.aiff', 'rb')}
params = {
    'convert_to': 'mp4',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.mp4'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.aiff' \
-F 'data={"convert_to": "mp4"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.mp4
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.aiff' \
-F 'data={"convert_to": "mp4", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\"}",
        "file_contents" => curl_file_create("testing.aiff")
    );
    $fp = fopen("file.mp4", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.aiff")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert AIFF files to MP4 you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: mp4
  • To get a ZIP file you can pass zip: true

AAC to MP4

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.aac', 'rb')}
params = {
    'convert_to': 'mp4'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.mp4', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.aac', 'rb')}
params = {
    'convert_to': 'mp4',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.mp4'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.aac' \
-F 'data={"convert_to": "mp4"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.mp4
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.aac' \
-F 'data={"convert_to": "mp4", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\"}",
        "file_contents" => curl_file_create("testing.aac")
    );
    $fp = fopen("file.mp4", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.aac")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert AAC files to MP4 you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: mp4
  • To get a ZIP file you can pass zip: true

MP2 to MP4

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp2', 'rb')}
params = {
    'convert_to': 'mp4'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.mp4', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp2', 'rb')}
params = {
    'convert_to': 'mp4',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.mp4'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp2' \
-F 'data={"convert_to": "mp4"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.mp4
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp2' \
-F 'data={"convert_to": "mp4", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\"}",
        "file_contents" => curl_file_create("testing.mp2")
    );
    $fp = fopen("file.mp4", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.mp2")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert MP2 files to MP4 you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: mp4
  • To get a ZIP file you can pass zip: true

M4R to MP4

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.m4r', 'rb')}
params = {
    'convert_to': 'mp4'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.mp4', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.m4r', 'rb')}
params = {
    'convert_to': 'mp4',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.mp4'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.m4r' \
-F 'data={"convert_to": "mp4"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.mp4
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.m4r' \
-F 'data={"convert_to": "mp4", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\"}",
        "file_contents" => curl_file_create("testing.m4r")
    );
    $fp = fopen("file.mp4", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.m4r")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert M4R files to MP4 you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: mp4
  • To get a ZIP file you can pass zip: true

OGG to MP4

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.ogg', 'rb')}
params = {
    'convert_to': 'mp4'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.mp4', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.ogg', 'rb')}
params = {
    'convert_to': 'mp4',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.mp4'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.ogg' \
-F 'data={"convert_to": "mp4"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.mp4
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.ogg' \
-F 'data={"convert_to": "mp4", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\"}",
        "file_contents" => curl_file_create("testing.ogg")
    );
    $fp = fopen("file.mp4", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.ogg")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert OGG files to MP4 you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: mp4
  • To get a ZIP file you can pass zip: true

IMA to MP4

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.ima', 'rb')}
params = {
    'convert_to': 'mp4'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.mp4', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.ima', 'rb')}
params = {
    'convert_to': 'mp4',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.mp4'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.ima' \
-F 'data={"convert_to": "mp4"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.mp4
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.ima' \
-F 'data={"convert_to": "mp4", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\"}",
        "file_contents" => curl_file_create("testing.ima")
    );
    $fp = fopen("file.mp4", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.ima")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert IMA files to MP4 you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: mp4
  • To get a ZIP file you can pass zip: true

AC3 to MP4

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.ac3', 'rb')}
params = {
    'convert_to': 'mp4'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.mp4', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.ac3', 'rb')}
params = {
    'convert_to': 'mp4',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.mp4'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.ac3' \
-F 'data={"convert_to": "mp4"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.mp4
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.ac3' \
-F 'data={"convert_to": "mp4", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\"}",
        "file_contents" => curl_file_create("testing.ac3")
    );
    $fp = fopen("file.mp4", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.ac3")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert AC3 files to MP4 you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: mp4
  • To get a ZIP file you can pass zip: true

AMR to MP4

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.amr', 'rb')}
params = {
    'convert_to': 'mp4'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.mp4', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.amr', 'rb')}
params = {
    'convert_to': 'mp4',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.mp4'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.amr' \
-F 'data={"convert_to": "mp4"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.mp4
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.amr' \
-F 'data={"convert_to": "mp4", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\"}",
        "file_contents" => curl_file_create("testing.amr")
    );
    $fp = fopen("file.mp4", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.amr")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert AMR files to MP4 you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: mp4
  • To get a ZIP file you can pass zip: true

DTS to MP4

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.dts', 'rb')}
params = {
    'convert_to': 'mp4'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.mp4', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.dts', 'rb')}
params = {
    'convert_to': 'mp4',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.mp4'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.dts' \
-F 'data={"convert_to": "mp4"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.mp4
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.dts' \
-F 'data={"convert_to": "mp4", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\"}",
        "file_contents" => curl_file_create("testing.dts")
    );
    $fp = fopen("file.mp4", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.dts")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert DTS files to MP4 you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: mp4
  • To get a ZIP file you can pass zip: true

OPUS to MP4

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.opus', 'rb')}
params = {
    'convert_to': 'mp4'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.mp4', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.opus', 'rb')}
params = {
    'convert_to': 'mp4',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.mp4'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.opus' \
-F 'data={"convert_to": "mp4"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.mp4
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.opus' \
-F 'data={"convert_to": "mp4", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\"}",
        "file_contents" => curl_file_create("testing.opus")
    );
    $fp = fopen("file.mp4", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.opus")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert OPUS files to MP4 you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: mp4
  • To get a ZIP file you can pass zip: true

AVI to MP4

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.avi', 'rb')}
params = {
    'convert_to': 'mp4'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.mp4', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.avi', 'rb')}
params = {
    'convert_to': 'mp4',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.mp4'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.avi' \
-F 'data={"convert_to": "mp4"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.mp4
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.avi' \
-F 'data={"convert_to": "mp4", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\"}",
        "file_contents" => curl_file_create("testing.avi")
    );
    $fp = fopen("file.mp4", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.avi")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert AVI files to MP4 you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: mp4
  • To get a ZIP file you can pass zip: true

WMV to MP4

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.wmv', 'rb')}
params = {
    'convert_to': 'mp4'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.mp4', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.wmv', 'rb')}
params = {
    'convert_to': 'mp4',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.mp4'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.wmv' \
-F 'data={"convert_to": "mp4"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.mp4
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.wmv' \
-F 'data={"convert_to": "mp4", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\"}",
        "file_contents" => curl_file_create("testing.wmv")
    );
    $fp = fopen("file.mp4", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.wmv")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert WMV files to MP4 you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: mp4
  • To get a ZIP file you can pass zip: true

MPEG to MP4

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mpeg', 'rb')}
params = {
    'convert_to': 'mp4'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.mp4', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mpeg', 'rb')}
params = {
    'convert_to': 'mp4',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.mp4'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mpeg' \
-F 'data={"convert_to": "mp4"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.mp4
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mpeg' \
-F 'data={"convert_to": "mp4", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\"}",
        "file_contents" => curl_file_create("testing.mpeg")
    );
    $fp = fopen("file.mp4", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.mpeg")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert MPEG files to MP4 you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: mp4
  • To get a ZIP file you can pass zip: true

MOV to MP4

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mov', 'rb')}
params = {
    'convert_to': 'mp4'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.mp4', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mov', 'rb')}
params = {
    'convert_to': 'mp4',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.mp4'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mov' \
-F 'data={"convert_to": "mp4"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.mp4
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mov' \
-F 'data={"convert_to": "mp4", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\"}",
        "file_contents" => curl_file_create("testing.mov")
    );
    $fp = fopen("file.mp4", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.mov")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert MOV files to MP4 you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: mp4
  • To get a ZIP file you can pass zip: true

MPG to MP4

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mpg', 'rb')}
params = {
    'convert_to': 'mp4'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.mp4', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mpg', 'rb')}
params = {
    'convert_to': 'mp4',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.mp4'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mpg' \
-F 'data={"convert_to": "mp4"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.mp4
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mpg' \
-F 'data={"convert_to": "mp4", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\"}",
        "file_contents" => curl_file_create("testing.mpg")
    );
    $fp = fopen("file.mp4", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.mpg")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert MPG files to MP4 you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: mp4
  • To get a ZIP file you can pass zip: true

DIVX to MP4

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.divx', 'rb')}
params = {
    'convert_to': 'mp4'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.mp4', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.divx', 'rb')}
params = {
    'convert_to': 'mp4',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.mp4'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.divx' \
-F 'data={"convert_to": "mp4"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.mp4
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.divx' \
-F 'data={"convert_to": "mp4", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\"}",
        "file_contents" => curl_file_create("testing.divx")
    );
    $fp = fopen("file.mp4", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.divx")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert DIVX files to MP4 you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: mp4
  • To get a ZIP file you can pass zip: true

WEBM to MP4

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.webm', 'rb')}
params = {
    'convert_to': 'mp4'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.mp4', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.webm', 'rb')}
params = {
    'convert_to': 'mp4',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.mp4'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.webm' \
-F 'data={"convert_to": "mp4"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.mp4
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.webm' \
-F 'data={"convert_to": "mp4", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\"}",
        "file_contents" => curl_file_create("testing.webm")
    );
    $fp = fopen("file.mp4", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.webm")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert WEBM files to MP4 you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: mp4
  • To get a ZIP file you can pass zip: true

MPEG-2 to MP4

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mpeg-2', 'rb')}
params = {
    'convert_to': 'mp4'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.mp4', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mpeg-2', 'rb')}
params = {
    'convert_to': 'mp4',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.mp4'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mpeg-2' \
-F 'data={"convert_to": "mp4"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.mp4
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mpeg-2' \
-F 'data={"convert_to": "mp4", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\"}",
        "file_contents" => curl_file_create("testing.mpeg-2")
    );
    $fp = fopen("file.mp4", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.mpeg-2")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert MPEG-2 files to MP4 you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: mp4
  • To get a ZIP file you can pass zip: true

MJPEG to MP4

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mjpeg', 'rb')}
params = {
    'convert_to': 'mp4'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.mp4', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mjpeg', 'rb')}
params = {
    'convert_to': 'mp4',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.mp4'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mjpeg' \
-F 'data={"convert_to": "mp4"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.mp4
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mjpeg' \
-F 'data={"convert_to": "mp4", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\"}",
        "file_contents" => curl_file_create("testing.mjpeg")
    );
    $fp = fopen("file.mp4", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.mjpeg")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert MJPEG files to MP4 you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: mp4
  • To get a ZIP file you can pass zip: true

FLV to MP4

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.flv', 'rb')}
params = {
    'convert_to': 'mp4'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.mp4', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.flv', 'rb')}
params = {
    'convert_to': 'mp4',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.mp4'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.flv' \
-F 'data={"convert_to": "mp4"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.mp4
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.flv' \
-F 'data={"convert_to": "mp4", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\"}",
        "file_contents" => curl_file_create("testing.flv")
    );
    $fp = fopen("file.mp4", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.flv")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: mp4
  • To get a ZIP file you can pass zip: true

3GP to MP4

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.3gp', 'rb')}
params = {
    'convert_to': 'mp4'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.mp4', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.3gp', 'rb')}
params = {
    'convert_to': 'mp4',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.mp4'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.3gp' \
-F 'data={"convert_to": "mp4"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.mp4
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.3gp' \
-F 'data={"convert_to": "mp4", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\"}",
        "file_contents" => curl_file_create("testing.3gp")
    );
    $fp = fopen("file.mp4", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.3gp")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert 3GP files to MP4 you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: mp4
  • To get a ZIP file you can pass zip: true

VOB to MP4

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.vob', 'rb')}
params = {
    'convert_to': 'mp4'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.mp4', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.vob', 'rb')}
params = {
    'convert_to': 'mp4',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.mp4'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.vob' \
-F 'data={"convert_to": "mp4"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.mp4
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.vob' \
-F 'data={"convert_to": "mp4", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\"}",
        "file_contents" => curl_file_create("testing.vob")
    );
    $fp = fopen("file.mp4", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.vob")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert VOB files to MP4 you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: mp4
  • To get a ZIP file you can pass zip: true

AV1 to MP4

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.av1', 'rb')}
params = {
    'convert_to': 'mp4'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.mp4', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.av1', 'rb')}
params = {
    'convert_to': 'mp4',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.mp4'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.av1' \
-F 'data={"convert_to": "mp4"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.mp4
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.av1' \
-F 'data={"convert_to": "mp4", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\"}",
        "file_contents" => curl_file_create("testing.av1")
    );
    $fp = fopen("file.mp4", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.av1")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: mp4
  • To get a ZIP file you can pass zip: true

M4V to MP4

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.m4v', 'rb')}
params = {
    'convert_to': 'mp4'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.mp4', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.m4v', 'rb')}
params = {
    'convert_to': 'mp4',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.mp4'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp4', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.m4v' \
-F 'data={"convert_to": "mp4"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.mp4
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.m4v' \
-F 'data={"convert_to": "mp4", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\"}",
        "file_contents" => curl_file_create("testing.m4v")
    );
    $fp = fopen("file.mp4", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp4\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.m4v")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: mp4
  • To get a ZIP file you can pass zip: true

MP4 to allowed file

MP4.to API allow users to convert any MP4 file to:

mp3, wav, m4a, flac, wma, aiff, aac, mp2, m4r, ogg, ima, ac3, amr, dts, opus, avi, wmv, mpeg, mov, mpg, divx, webm, mpeg-2, mjpeg, flv, 3gp, vob, av1, m4v

MP4 to MP3

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'mp3'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.mp3', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'mp3',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp3'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.mp3'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp3', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "mp3"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.mp3
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "mp3", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp3\"}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.mp3", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp3\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert MP4 files to MP3 you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: mp3
  • To get a ZIP file you can pass zip: true

MP4 to WAV

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'wav'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.wav', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'wav',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'wav'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.wav'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'wav', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "wav"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.wav
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "wav", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"wav\"}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.wav", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"wav\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert MP4 files to WAV you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: wav
  • To get a ZIP file you can pass zip: true

MP4 to M4A

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'm4a'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.m4a', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'm4a',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'm4a'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.m4a'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'm4a', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "m4a"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.m4a
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "m4a", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"m4a\"}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.m4a", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"m4a\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert MP4 files to M4A you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: m4a
  • To get a ZIP file you can pass zip: true

MP4 to FLAC

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'flac'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.flac', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'flac',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'flac'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.flac'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'flac', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "flac"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.flac
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "flac", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"flac\"}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.flac", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"flac\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert MP4 files to FLAC you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: flac
  • To get a ZIP file you can pass zip: true

MP4 to WMA

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'wma'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.wma', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'wma',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'wma'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.wma'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'wma', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "wma"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.wma
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "wma", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"wma\"}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.wma", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"wma\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert MP4 files to WMA you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: wma
  • To get a ZIP file you can pass zip: true

MP4 to AIFF

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'aiff'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.aiff', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'aiff',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'aiff'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.aiff'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'aiff', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "aiff"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.aiff
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "aiff", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"aiff\"}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.aiff", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"aiff\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert MP4 files to AIFF you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: aiff
  • To get a ZIP file you can pass zip: true

MP4 to AAC

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'aac'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.aac', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'aac',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'aac'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.aac'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'aac', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "aac"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.aac
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "aac", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"aac\"}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.aac", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"aac\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert MP4 files to AAC you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: aac
  • To get a ZIP file you can pass zip: true

MP4 to MP2

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'mp2'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.mp2', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'mp2',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp2'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.mp2'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mp2', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "mp2"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.mp2
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "mp2", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp2\"}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.mp2", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mp2\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert MP4 files to MP2 you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: mp2
  • To get a ZIP file you can pass zip: true

MP4 to M4R

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'm4r'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.m4r', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'm4r',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'm4r'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.m4r'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'm4r', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "m4r"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.m4r
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "m4r", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"m4r\"}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.m4r", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"m4r\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert MP4 files to M4R you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: m4r
  • To get a ZIP file you can pass zip: true

MP4 to OGG

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'ogg'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.ogg', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'ogg',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'ogg'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.ogg'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'ogg', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "ogg"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.ogg
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "ogg", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"ogg\"}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.ogg", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"ogg\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert MP4 files to OGG you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: ogg
  • To get a ZIP file you can pass zip: true

MP4 to IMA

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'ima'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.ima', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'ima',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'ima'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.ima'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'ima', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "ima"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.ima
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "ima", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"ima\"}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.ima", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"ima\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert MP4 files to IMA you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: ima
  • To get a ZIP file you can pass zip: true

MP4 to AC3

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'ac3'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.ac3', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'ac3',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'ac3'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.ac3'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'ac3', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "ac3"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.ac3
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "ac3", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"ac3\"}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.ac3", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"ac3\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert MP4 files to AC3 you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: ac3
  • To get a ZIP file you can pass zip: true

MP4 to AMR

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'amr'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.amr', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'amr',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'amr'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.amr'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'amr', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "amr"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.amr
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "amr", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"amr\"}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.amr", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"amr\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert MP4 files to AMR you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: amr
  • To get a ZIP file you can pass zip: true

MP4 to DTS

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'dts'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.dts', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'dts',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'dts'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.dts'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'dts', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "dts"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.dts
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "dts", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"dts\"}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.dts", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"dts\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert MP4 files to DTS you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: dts
  • To get a ZIP file you can pass zip: true

MP4 to OPUS

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'opus'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.opus', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'opus',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'opus'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.opus'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'opus', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "opus"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.opus
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "opus", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"opus\"}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.opus", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"opus\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert MP4 files to OPUS you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: opus
  • To get a ZIP file you can pass zip: true

MP4 to AVI

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'avi'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.avi', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'avi',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'avi'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.avi'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'avi', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "avi"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.avi
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "avi", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"avi\"}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.avi", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"avi\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert MP4 files to AVI you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: avi
  • To get a ZIP file you can pass zip: true

MP4 to WMV

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'wmv'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.wmv', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'wmv',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'wmv'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.wmv'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'wmv', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "wmv"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.wmv
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "wmv", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"wmv\"}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.wmv", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"wmv\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert MP4 files to WMV you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: wmv
  • To get a ZIP file you can pass zip: true

MP4 to MPEG

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'mpeg'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.mpeg', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'mpeg',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mpeg'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.mpeg'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mpeg', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "mpeg"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.mpeg
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "mpeg", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mpeg\"}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.mpeg", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mpeg\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert MP4 files to MPEG you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: mpeg
  • To get a ZIP file you can pass zip: true

MP4 to MOV

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'mov'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.mov', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'mov',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mov'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.mov'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mov', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "mov"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.mov
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "mov", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mov\"}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.mov", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mov\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert MP4 files to MOV you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: mov
  • To get a ZIP file you can pass zip: true

MP4 to MPG

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'mpg'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.mpg', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'mpg',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mpg'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.mpg'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mpg', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "mpg"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.mpg
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "mpg", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mpg\"}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.mpg", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mpg\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert MP4 files to MPG you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: mpg
  • To get a ZIP file you can pass zip: true

MP4 to DIVX

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'divx'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.divx', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'divx',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'divx'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.divx'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'divx', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "divx"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.divx
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "divx", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"divx\"}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.divx", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"divx\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert MP4 files to DIVX you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: divx
  • To get a ZIP file you can pass zip: true

MP4 to WEBM

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'webm'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.webm', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'webm',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'webm'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.webm'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'webm', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "webm"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.webm
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "webm", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"webm\"}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.webm", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"webm\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert MP4 files to WEBM you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: webm
  • To get a ZIP file you can pass zip: true

MP4 to MPEG-2

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'mpeg-2'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.mpeg-2', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'mpeg-2',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mpeg-2'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.mpeg-2'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mpeg-2', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "mpeg-2"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.mpeg-2
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "mpeg-2", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mpeg-2\"}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.mpeg-2", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mpeg-2\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert MP4 files to MPEG-2 you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: mpeg-2
  • To get a ZIP file you can pass zip: true

MP4 to MJPEG

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'mjpeg'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.mjpeg', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'mjpeg',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mjpeg'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.mjpeg'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'mjpeg', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "mjpeg"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.mjpeg
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "mjpeg", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mjpeg\"}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.mjpeg", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"mjpeg\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert MP4 files to MJPEG you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: mjpeg
  • To get a ZIP file you can pass zip: true

MP4 to FLV

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'flv'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.flv', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'flv',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'flv'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.flv'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'flv', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "flv"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.flv
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "flv", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"flv\"}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.flv", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"flv\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert MP4 files to FLV you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: flv
  • To get a ZIP file you can pass zip: true

MP4 to 3GP

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': '3gp'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.3gp', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': '3gp',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': '3gp'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.3gp'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': '3gp', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "3gp"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.3gp
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "3gp", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"3gp\"}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.3gp", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"3gp\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert MP4 files to 3GP you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: 3gp
  • To get a ZIP file you can pass zip: true

MP4 to VOB

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'vob'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.vob', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'vob',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'vob'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.vob'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'vob', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "vob"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.vob
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "vob", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"vob\"}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.vob", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"vob\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert MP4 files to VOB you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: vob
  • To get a ZIP file you can pass zip: true

MP4 to AV1

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'av1'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.av1', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'av1',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'av1'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.av1'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'av1', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "av1"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.av1
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "av1", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"av1\"}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.av1", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"av1\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert MP4 files to AV1 you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: av1
  • To get a ZIP file you can pass zip: true

MP4 to M4V

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'm4v'
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.m4v', 'wb') as f:
    f.write(r.content)
# Convert file and get a ZIP
import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {
    'convert_to': 'm4v',
    'zip': True
}
data = {'data': json.dumps(params)}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'm4v'})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.m4v'));
});
// Convert file and get a ZIP
const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.pdf'),
        data: JSON.stringify({'convert_to': 'm4v', 'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "m4v"}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.m4v
# Convert file and get a ZIP
curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"convert_to": "m4v", "zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

PHP :

<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"m4v\"}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.m4v", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>
// Convert file and get a ZIP
<?php
    $post_data = array(
        "data" => "{\"convert_to\": \"m4v\", \"zip\": true}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

To convert MP4 files to M4v you must be send the follow information:

Parameter Description
file You must upload the file you want to convert.
data
  • convert_to: m4v
  • To get a ZIP file you can pass zip: true

MP4 Tools

MP4 to ZIP

POST https://mp4.to/v1/api

Python :

import requests
import json

url = 'https://mp4.to/v1/api'
files = {'file': open('testing.mp4', 'rb')}
params = {'zip': True}
data = {
    'data': json.dumps(params)
}
headers = {'Authorization': '<YOUR_API_KEY>'}

r = requests.post(
    url,
    files=files,
    data=data,
    headers=headers
)

with open('file.zip', 'wb') as f:
    f.write(r.content)

CURL :

curl -POST 'https://mp4.to/v1/api' \
-F 'data=@/testing.mp4' \
-F 'data={"zip": true}' \
-H 'Authorization: <YOUR_API_KEY>' \
--output file.zip

NodeJS :

const request = require('request');
const fs = require('fs');

let req = request.post({
    url: 'https://mp4.to/v1/api',
    headers: {
        'Authorization': '<YOUR_API_KEY>'
    },
    formData: {
        file: fs.createReadStream('testing.mp4'),
        data: JSON.stringify({'zip': true})
    }
});

req.on('response', function(response) {
    response.pipe(fs.createWriteStream('testing.zip'));
});

PHP :

<?php
    $post_data = array(
        "data" => "{\"zip\": true}",
        "file_contents" => curl_file_create("testing.mp4")
    );
    $fp = fopen("file.zip", "w+");
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "https://mp4.to/v1/api");
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        "Authorization: <YOUR_API_KEY>"
    ));
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
    curl_setopt($curl, CURLOPT_FILE, $fp);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    $content = curl_exec($curl);
    curl_close($curl);
    fclose($fp);
?>

Parameter Description
file You must upload the file you want to convert.
data

This paramater should contains the information of the tool to use and the pages to modify like:

    • zip: true