Developer API

🚀 Overview

We help businesses convert animated HTML5/Lottie/RIV/SVG content into high-quality videos,GIFs, Webms, Webps. Our powerful servers support 4K video (up to 3840×2160) and GIFs (up to 1920×1080 or 1080×1920). Whether you're working with HTML5, CSS, SVG, or Lottie animations, we offer a cost-effective solution—no need for expensive GPU servers. Easily convert your HTML banners into videos or GIFs for platforms like Facebook, Instagram, and DoubleClick.


🔑 Features

✔️ Convert HTML5 to MP4 or GIF

✔️ Convert Lottie to MP4 or GIF

✔️ Convert SVG to MP4 or GIF

✔️ Transparent background support

✔️ Audio support for MP4

✔️ Custom resolution and duration


🧪 Example API Call



                         //-- Convert Video --//
    function convert_video(id) {
        var data = new FormData();
        data.append("clientid", clientid);
        data.append("apikey", apikey);
        data.append("creativeid", id);
        data.append("width", "300");
        data.append("height", "600");
        data.append("duration", "8");
        data.append("fps", "60");
        data.append("audio", "N");
        data.append("webhookurl", "");
        // webhook url is a simple http web url (hosted on your server) which should accept "download url" as parameter from html5animationtogif.com, once output gets ready. Refer the document for more details.
        data.append("creativefitoption", "center");
        data.append("bitratevalue", "17");
        
        var xhr = new XMLHttpRequest();
        xhr.open('POST', 'https://html5animationtogif.com/api/converttovideo.ashx', true);
        xhr.onload = function () {
            var response = JSON.parse(xhr.responseText);
            if (response.status == "success") {
                mediaid = response.mediaid;
                console.log("Video " + mediaid + ".");
                alert("Video " + mediaid + ".");
                document.getElementById("txtResponse").style.display = "block";
                WaitForOutput();
            } else {
                alert(response.message)
            }
        };
        xhr.send(data);
    }
                                                      

✅ API Response

{ "status": "success",  "jobstatus": "done",  "url": "https://html5animationtogif.com/API/mediadownload.ashx?mediaid=34488&creativeid=creative_550x550_10ed7e8783&fileext=mp4&inline=y" }

                                                      

📁 Supported Formats

Input Output Notes
.ZIP (HTML5, Lottie) .mp4, .gif Must include entry .html file for HTML5 animation, .json file for lottie animation
HTML5 URL, Lottie URL, SVG Animation URL .mp4, .gif Publicly accessible only
Lottie JSON file, SVG animated file .mp4,.gif .webp Transparent animations supported

💼 Trusted by Platforms

Used by AdTech platforms, automation tools, creative studios, and banner builders worldwide to streamline HTML5 to video conversion at scale.


🔌 Request API Access


📘 Documentation


💰 See API Pricing Options



🤝 Support

We’re here 24/7—any issue fixed in an hour. Need direct help? Get expert developer support—reach us at contact@html5animationtogif.com.