API Overview

You can utilise our API to convert your own files into different formats. Each API call will cost credits. You can purchase and view credits in your dashboard

Converting images

You can convert images into different formats using our API. The cost for images is 1 credit per MB converted.

POST
https://converting.to/api/image
const format = "jpg"; // Change to the format you want to convert into
const formData = new FormData();
formData.append('image', file); // The File you want to convert
formData.append('format', format);

try {
    const contentTypes = 'multipart/form-data';
    const response = await axios.post('https://converting.to/api/image', formData, {
    responseType: 'blob',
    headers: {
       'Content-Type': contentTypes,
       'Authorization': 'Bearer {API_KEY}'
     }
});

const contentType = response.headers['content-type'];
const blob = new Blob([response.data], {type: contentType}); // Blob to be used
const url = window.URL.createObjectURL(blob); // URL to be used
} catch (error) {
    console.error("Error converting image", error);
}

Converting videos

You can convert videos into different formats using our API. The cost for videos is 1 credit per MB converted.

POST
https://converting.to/api/video
const format = "mp4"; // Change to the format you want to convert into
const formData = new FormData();
formData.append('video', file); // The File you want to convert
formData.append('format', format);

try {
    const contentTypes = 'multipart/form-data';
    const response = await axios.post('https://converting.to/api/video', formData, {
    responseType: 'blob',
    headers: {
       'Content-Type': contentTypes,
       'Authorization': 'Bearer {API_KEY}'
     }
});

const contentType = response.headers['content-type'];
const blob = new Blob([response.data], {type: contentType}); // Blob to be used
const url = window.URL.createObjectURL(blob); // URL to be used
} catch (error) {
    console.error("Error converting video", error);
}

Table of contents