API Documentation
Integrate Master Converter's powerful file conversion capabilities into your applications with our RESTful API.
Getting Started
The Master Converter API allows developers to programmatically convert files between various formats. Our API is RESTful, uses JSON for data exchange, and supports all the conversion types available on our web platform.
Base URL: https://api.masterconverter.com/v1
API Version: v1 (current)
Response Format: JSON
Authentication: API Key (Header)
Key Features
- 50+ File Formats: Support for documents, images, videos, audio, and archives
- High Performance: Process thousands of files per hour
- Webhook Support: Get notified when conversions complete
- Batch Processing: Convert multiple files in a single request
- Secure Processing: All files are encrypted and automatically deleted
- Global CDN: Fast downloads from anywhere in the world
Supported Formats
Our API supports the same formats as our web application:
- Documents: PDF, DOC, DOCX, PPT, PPTX, XLS, XLSX, TXT, HTML, RTF, EPUB
- Images: JPG, PNG, WEBP, HEIC, SVG, BMP, TIFF, GIF, ICO
- Videos: MP4, AVI, MOV, MKV, WEBM, FLV, WMV, 3GP
- Audio: MP3, WAV, FLAC, AAC, OGG, M4A, WMA
- Archives: ZIP, RAR, 7Z, TAR, GZ
Authentication
All API requests require authentication using an API key. Include your API key in the Authorization header of every request.
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Keep your API key secure! Never expose your API key in client-side code or public repositories. Store it securely on your server.
Getting Your API Key
To get an API key:
- Contact our sales team at sales@masterconverter.com
- Choose your plan based on usage requirements
- Receive your API key and documentation
- Start making API calls immediately
API Plans
| Plan | Requests/Month | File Size Limit | Price |
|---|---|---|---|
| Starter | 1,000 | 100MB | $29/month |
| Professional | 10,000 | 500MB | $99/month |
| Enterprise | 100,000+ | 2GB | Custom |
API Endpoints
Convert a file from one format to another.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
file |
file | Required | The file to convert (multipart/form-data) |
target_format |
string | Required | The desired output format (e.g., "pdf", "jpg", "mp3") |
quality |
string | Optional | Conversion quality: "low", "medium", "high" (default: "high") |
webhook_url |
string | Optional | URL to receive completion notification |
Check the status of a conversion job.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
job_id |
string | Required | The unique job ID returned from the convert endpoint |
Download the converted file.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
job_id |
string | Required | The unique job ID returned from the convert endpoint |
Convert multiple files in a single request.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
files |
file[] | Required | Array of files to convert |
target_format |
string | Required | The desired output format for all files |
quality |
string | Optional | Conversion quality for all files |
Get a list of all supported conversion formats.
Get your current API usage statistics.
Code Examples
Convert a PDF to Word (cURL)
curl -X POST https://api.masterconverter.com/v1/convert \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@document.pdf" \
-F "target_format=docx" \
-F "quality=high"
Python Example
import requests
url = "https://api.masterconverter.com/v1/convert"
headers = {
"Authorization": "Bearer YOUR_API_KEY"
}
files = {
"file": open("document.pdf", "rb"),
"target_format": (None, "docx"),
"quality": (None, "high")
}
response = requests.post(url, headers=headers, files=files)
result = response.json()
print(f"Job ID: {result['job_id']}")
print(f"Status: {result['status']}")
# Check status
status_url = f"https://api.masterconverter.com/v1/status/{result['job_id']}"
status_response = requests.get(status_url, headers=headers)
status_result = status_response.json()
if status_result['status'] == 'completed':
download_url = f"https://api.masterconverter.com/v1/download/{result['job_id']}"
download_response = requests.get(download_url, headers=headers)
with open("converted_document.docx", "wb") as f:
f.write(download_response.content)
JavaScript/Node.js Example
const axios = require('axios');
const FormData = require('form-data');
const fs = require('fs');
async function convertFile() {
const form = new FormData();
form.append('file', fs.createReadStream('document.pdf'));
form.append('target_format', 'docx');
form.append('quality', 'high');
try {
const response = await axios.post(
'https://api.masterconverter.com/v1/convert',
form,
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
...form.getHeaders()
}
}
);
const jobId = response.data.job_id;
console.log(`Job ID: ${jobId}`);
// Poll for completion
let status = 'processing';
while (status === 'processing') {
await new Promise(resolve => setTimeout(resolve, 2000));
const statusResponse = await axios.get(
`https://api.masterconverter.com/v1/status/${jobId}`,
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
}
);
status = statusResponse.data.status;
console.log(`Status: ${status}`);
}
if (status === 'completed') {
const downloadResponse = await axios.get(
`https://api.masterconverter.com/v1/download/${jobId}`,
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
},
responseType: 'stream'
}
);
const writer = fs.createWriteStream('converted_document.docx');
downloadResponse.data.pipe(writer);
writer.on('finish', () => {
console.log('File downloaded successfully!');
});
}
} catch (error) {
console.error('Error:', error.response.data);
}
}
convertFile();
PHP Example
new CURLFile('document.pdf'),
'target_format' => 'docx',
'quality' => 'high'
];
curl_setopt($ch, CURLOPT_POSTFIELDS, $postFields);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
$result = json_decode($response, true);
echo "Job ID: " . $result['job_id'] . "\n";
// Check status
$statusCh = curl_init();
curl_setopt($statusCh, CURLOPT_URL, 'https://api.masterconverter.com/v1/status/' . $result['job_id']);
curl_setopt($statusCh, CURLOPT_HTTPHEADER, [
'Authorization: Bearer YOUR_API_KEY'
]);
curl_setopt($statusCh, CURLOPT_RETURNTRANSFER, 1);
do {
sleep(2);
$statusResponse = curl_exec($statusCh);
$statusResult = json_decode($statusResponse, true);
echo "Status: " . $statusResult['status'] . "\n";
} while ($statusResult['status'] === 'processing');
if ($statusResult['status'] === 'completed') {
$downloadCh = curl_init();
curl_setopt($downloadCh, CURLOPT_URL, 'https://api.masterconverter.com/v1/download/' . $result['job_id']);
curl_setopt($downloadCh, CURLOPT_HTTPHEADER, [
'Authorization: Bearer YOUR_API_KEY'
]);
curl_setopt($downloadCh, CURLOPT_RETURNTRANSFER, 1);
$fileContent = curl_exec($downloadCh);
file_put_contents('converted_document.docx', $fileContent);
echo "File downloaded successfully!\n";
curl_close($downloadCh);
}
curl_close($ch);
curl_close($statusCh);
?>
Official SDKs
We provide official SDKs to make integration even easier. Each SDK includes full documentation, examples, and TypeScript definitions where applicable.
Webhooks
Webhooks allow you to receive real-time notifications when conversions complete, eliminating the need to poll the status endpoint.
Setting Up Webhooks
Include a webhook_url parameter in your conversion request:
{
"file": "document.pdf",
"target_format": "docx",
"webhook_url": "https://your-app.com/webhook/conversion-complete"
}
Webhook Payload
When a conversion completes, we'll send a POST request to your webhook URL with the following payload:
{
"event": "conversion.completed",
"job_id": "job_12345",
"status": "completed",
"original_filename": "document.pdf",
"target_format": "docx",
"file_size": 2048576,
"processing_time": 15.5,
"download_url": "https://api.masterconverter.com/v1/download/job_12345",
"expires_at": "2025-11-04T12:00:00Z",
"timestamp": "2025-11-03T12:00:00Z"
}
Webhook Security
All webhook requests include a signature header for verification:
X-MasterConverter-Signature: sha256=signature_hash
Always verify webhook signatures to ensure requests are coming from Master Converter and haven't been tampered with.
Rate Limits
To ensure fair usage and optimal performance, our API implements rate limiting based on your subscription plan.
| Plan | Requests per Minute | Concurrent Jobs | Burst Limit |
|---|---|---|---|
| Starter | 10 | 3 | 20 |
| Professional | 50 | 10 | 100 |
| Enterprise | 200 | 50 | 500 |
Rate Limit Headers
Every API response includes rate limit information in the headers:
X-RateLimit-Limit: 50
X-RateLimit-Remaining: 47
X-RateLimit-Reset: 1699027200
Handling Rate Limits
If you exceed your rate limit, you'll receive a 429 status code:
{
"error": "rate_limit_exceeded",
"message": "Too many requests. Please wait before retrying.",
"retry_after": 60
}
Error Handling
The Master Converter API uses standard HTTP status codes to indicate success or failure of requests.
HTTP Status Codes
| Status Code | Description | Action |
|---|---|---|
| 200 | OK - Request successful | Continue processing |
| 400 | Bad Request - Invalid parameters | Check request format |
| 401 | Unauthorized - Invalid API key | Check authentication |
| 403 | Forbidden - Insufficient permissions | Contact support |
| 404 | Not Found - Resource doesn't exist | Check job ID or endpoint |
| 413 | Payload Too Large - File size exceeded | Reduce file size or upgrade plan |
| 429 | Too Many Requests - Rate limit exceeded | Implement backoff strategy |
| 500 | Internal Server Error | Retry request or contact support |
Error Response Format
All errors return a consistent JSON format:
{
"error": "invalid_format",
"message": "The specified target format is not supported for this file type.",
"code": "FORMAT_NOT_SUPPORTED",
"details": {
"supported_formats": ["pdf", "docx", "txt"]
}
}
Common Error Codes
invalid_api_key- API key is missing or invalidfile_too_large- File exceeds size limit for your planinvalid_format- Unsupported file format or conversionprocessing_failed- Conversion failed due to file corruption or complexityrate_limit_exceeded- Too many requests in time windowinsufficient_credits- Account has no remaining conversion credits
API Support
Need help with the API? We provide comprehensive support for all our API customers.
💬 Developer Support Channels
- Email: api-support@masterconverter.com
- Slack Community: Join our developer Slack for real-time help
- GitHub Issues: Report SDK bugs and feature requests
- Documentation: Comprehensive guides and tutorials
Support Response Times
| Plan | Email Support | Priority Support | Phone Support |
|---|---|---|---|
| Starter | 48 hours | ❌ | ❌ |
| Professional | 24 hours | ✅ | ❌ |
| Enterprise | 4 hours | ✅ | ✅ |
Getting Started Checklist
- ✅ Get your API key from sales team
- ✅ Read the authentication section
- ✅ Try the basic convert endpoint
- ✅ Implement error handling
- ✅ Set up webhook endpoints (optional)
- ✅ Test with your production files
- ✅ Monitor rate limits and usage
Ready to get started? Contact our sales team at sales@masterconverter.com to get your API key and start building amazing applications with Master Converter!