🚀 PulseSuite.io API

Our API allows you to integrate powerful, privacy-first file conversion capabilities directly into your applications. Built on the same WebAssembly technology that powers our web tools.

🔒 Privacy-First⚡ Fast Processing🌐 Browser-Based📦 Easy Integration

Overview

The PulseSuite.io API provides client-side file conversion capabilities that run entirely in the user's browser. This approach ensures:

  • Complete Privacy: Files never leave the user's device
  • No Server Costs: Processing happens on the client side
  • Scalability: No server load limitations
  • Speed: No server transfer times

Getting Started

1. Installation

Via CDN

<script src="https://cdn.pulsesuite.io/api/v1/pulsesuite.min.js?v=1756539902028"></script>

Via NPM

npm install @pulsesuite/converter-api

2. Basic Usage

// Initialize the API const converter = new PulseSuite.Converter(); // Convert a file const result = await converter.convert({ file: fileInput.files[0], from: 'mp4', to: 'avi', quality: 'high' }); // Download the result const blob = await result.getBlob(); const url = URL.createObjectURL(blob); // Use the URL for download or display

API Reference

PulseSuite.Converter

Constructor

const converter = new PulseSuite.Converter(options)
Options
ParameterTypeDefaultDescription
debugbooleanfalseEnable debug logging
timeoutnumber300000Conversion timeout in milliseconds
workerPathstringautoCustom path to WebAssembly workers

convert(options)

Converts a file from one format to another.

const result = await converter.convert({ file: File, // File object to convert from: 'mp4', // Source format to: 'avi', // Target format quality: 'high', // Quality setting onProgress: (percent) => console.log(percent) });
Parameters
ParameterTypeRequiredDescription
fileFileYesJavaScript File object to convert
fromstringYesSource format (mp4, avi, mov, etc.)
tostringYesTarget format (mp4, avi, mov, etc.)
qualitystringNo'low', 'medium', 'high', 'lossless'
onProgressfunctionNoProgress callback (0-100)
Returns

Promise<ConversionResult>

getSupportedFormats()

Returns an array of supported input and output formats.

const formats = converter.getSupportedFormats(); console.log(formats.video); // ['mp4', 'avi', 'mov', 'mkv', 'webm', 'wmv'] console.log(formats.audio); // ['mp3', 'wav', 'flac', 'aac']

ConversionResult

getBlob()

Returns the converted file as a Blob object.

const blob = await result.getBlob();

getArrayBuffer()

Returns the converted file as an ArrayBuffer.

const buffer = await result.getArrayBuffer();

download(filename)

Triggers a download of the converted file.

result.download('converted-video.avi');

Properties

PropertyTypeDescription
sizenumberFile size in bytes
formatstringOutput format
durationnumberConversion time in milliseconds

Examples

Basic Video Conversion

// Convert MP4 to AVI const converter = new PulseSuite.Converter(); document.getElementById('fileInput').addEventListener('change', async (e) => { const file = e.target.files[0]; try { const result = await converter.convert({ file: file, from: 'mp4', to: 'avi', quality: 'high', onProgress: (percent) => { console.log(`Conversion progress: ${percent}%`); } }); // Download the converted file result.download('converted-video.avi'); } catch (error) { console.error('Conversion failed:', error); } });

Audio Extraction

// Extract MP3 audio from video const result = await converter.convert({ file: videoFile, from: 'mp4', to: 'mp3', quality: 'high' }); const audioBlob = await result.getBlob(); const audioUrl = URL.createObjectURL(audioBlob); // Play the extracted audio const audio = new Audio(audioUrl); audio.play();

Batch Conversion

// Convert multiple files const files = Array.from(fileInput.files); const results = []; for (const file of files) { try { const result = await converter.convert({ file: file, from: 'mp4', to: 'webm', quality: 'medium' }); results.push(result); console.log(`Converted: ${file.name}`); } catch (error) { console.error(`Failed to convert ${file.name}:`, error); } } // Download all converted files results.forEach((result, index) => { result.download(`converted-${index}.webm`); });

Error Handling

Common Errors

Error CodeDescriptionSolution
UNSUPPORTED_FORMATInput or output format not supportedCheck getSupportedFormats()
FILE_TOO_LARGEFile exceeds browser memory limitsUse smaller files or increase available memory
CONVERSION_TIMEOUTConversion took too longIncrease timeout or use smaller files
BROWSER_NOT_SUPPORTEDBrowser lacks WebAssembly supportUse a modern browser

Error Handling Example

try { const result = await converter.convert({ file: file, from: 'mp4', to: 'avi' }); result.download('converted.avi'); } catch (error) { switch (error.code) { case 'UNSUPPORTED_FORMAT': alert('This file format is not supported'); break; case 'FILE_TOO_LARGE': alert('File is too large for your device'); break; case 'CONVERSION_TIMEOUT': alert('Conversion timed out. Try a smaller file.'); break; default: alert('Conversion failed: ' + error.message); } }

Rate Limits & Usage

Current Limits

  • No API key required for basic usage
  • No server-side rate limits (processing is client-side)
  • Browser memory limits apply based on user's device
  • Concurrent conversions: Limited by browser capabilities

Best Practices

  • Process files sequentially for better performance
  • Implement progress indicators for user experience
  • Handle errors gracefully with user-friendly messages
  • Test with various file sizes and formats
  • Consider device capabilities when setting quality options

Support & Resources

📧 Developer Support

Get technical help with API integration

Support@PulseSuite.io

💻 GitHub Repository

Examples, SDKs, and community contributions

github.com/pulsesuite/api

📚 Developer Guide

Comprehensive integration tutorials

View Developer Guide

Changelog

v1.0.0 - January 24, 2025

  • Initial API release
  • Support for all major video formats
  • Audio extraction capabilities
  • Progress tracking and error handling