Developer API

File Conversion API for Developers

Integrate powerful file conversion capabilities into your applications with our simple REST API. Convert documents, images, ebooks, and more with just a few lines of code.

Lightning Fast

High-performance conversion servers ensure your files are processed quickly

Secure & Reliable

Enterprise-grade security with 99.9% uptime SLA

100+ Formats

Support for all major document, image, ebook, and archive formats

Simple Integration

Get started with just a few lines of code

Step 1: Submit Conversion

1. Upload & Convert

# Upload and convert a file
curl -X POST https://api.converthub.com/v2/convert \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "[email protected]" \
  -F "target_format=docx"



                            
Step 2: Check Status

2. Check Status & Download

# Check conversion status
curl https://api.converthub.com/v2/jobs/job_123e4567 \
  -H "Authorization: Bearer YOUR_API_KEY"

# Download the converted file when ready
curl https://api.converthub.com/v2/jobs/job_123e4567/download \
  -H "Authorization: Bearer YOUR_API_KEY"
                            
# Step 1: Submit file for conversion
curl -X POST https://api.converthub.com/v2/convert \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "[email protected]" \
  -F "target_format=jpg"

# Response:
# {"job_id": "job_123e4567", "status": "processing"}

# Step 2: Check conversion status
curl https://api.converthub.com/v2/jobs/job_123e4567 \
  -H "Authorization: Bearer YOUR_API_KEY"

# Step 3: Download converted file
curl https://api.converthub.com/v2/jobs/job_123e4567/download \
  -H "Authorization: Bearer YOUR_API_KEY"
                            
<?php
// Step 1: Submit file for conversion
$file = new CURLFile('image.png', 'image/png', 'image.png');

$postData = [
    'file' => $file,
    'target_format' => 'jpg',
    'options[quality]' => '90'
];

$ch = curl_init('https://api.converthub.com/v2/convert');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Bearer YOUR_API_KEY'
]);

$response = curl_exec($ch);
$result = json_decode($response, true);
$jobId = $result['job_id'];

// Step 2: Check status (with polling)
do {
    sleep(2);
    $ch = curl_init("https://api.converthub.com/v2/jobs/{$jobId}");
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, [
        'Authorization: Bearer YOUR_API_KEY'
    ]);

    $response = curl_exec($ch);
    $status = json_decode($response, true);
} while ($status['status'] === 'processing');

// Step 3: Download file
if ($status['status'] === 'completed') {
    $downloadUrl = $status['result']['download_url'];
    file_put_contents('converted_image.jpg', file_get_contents($downloadUrl));
}
// Node.js example using fetch
const FormData = require('form-data');
const fs = require('fs');

async function convertImage() {
    // Step 1: Submit file for conversion
    const form = new FormData();
    form.append('file', fs.createReadStream('image.png'));
    form.append('target_format', 'jpg');
    form.append('options[quality]', '90');

    const submitResponse = await fetch('https://api.converthub.com/v2/convert', {
        method: 'POST',
        headers: {
            'Authorization': 'Bearer YOUR_API_KEY',
            ...form.getHeaders()
        },
        body: form
    });

    const { job_id } = await submitResponse.json();

    // Step 2: Poll for completion
    let status;
    do {
        await new Promise(resolve => setTimeout(resolve, 2000));

        const statusResponse = await fetch(
            `https://api.converthub.com/v2/jobs/${job_id}`,
            {
                headers: {
                    'Authorization': 'Bearer YOUR_API_KEY'
                }
            }
        );

        status = await statusResponse.json();
    } while (status.status === 'processing');

    // Step 3: Download the converted file
    if (status.status === 'completed') {
        const downloadResponse = await fetch(status.result.download_url);
        const buffer = await downloadResponse.buffer();
        fs.writeFileSync('converted_image.jpg', buffer);
        console.log('Conversion completed!');
    }
}

convertImage();
require 'net/http'
require 'uri'
require 'json'

def convert_image
  api_key = 'YOUR_API_KEY'
  api_url = 'https://api.converthub.com/v2'

  # Step 1: Submit file for conversion
  uri = URI("#{api_url}/convert")

  request = Net::HTTP::Post.new(uri)
  request['Authorization'] = "Bearer #{api_key}"

  form_data = [
    ['target_format', 'jpg'],
    ['options[quality]', '90'],
    ['file', File.open('image.png')]
  ]

  request.set_form form_data, 'multipart/form-data'

  response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
    http.request(request)
  end

  result = JSON.parse(response.body)
  job_id = result['job_id']

  # Step 2: Poll for completion
  status = nil
  loop do
    sleep 2

    uri = URI("#{api_url}/jobs/#{job_id}")
    request = Net::HTTP::Get.new(uri)
    request['Authorization'] = "Bearer #{api_key}"

    response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
      http.request(request)
    end

    status = JSON.parse(response.body)
    break unless status['status'] == 'processing'
  end

  # Step 3: Download the converted file
  if status['status'] == 'completed'
    download_url = status['result']['download_url']
    uri = URI(download_url)

    Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
      response = http.get(uri.path)
      File.open('converted_image.jpg', 'wb') do |file|
        file.write(response.body)
      end
    end

    puts 'Conversion completed!'
  end
end

convert_image
import requests
import time

def convert_image():
    api_key = 'YOUR_API_KEY'
    api_url = 'https://api.converthub.com/v2'

    # Step 1: Submit file for conversion
    with open('image.png', 'rb') as f:
        files = {'file': f}
        data = {
            'target_format': 'jpg',
            'options[quality]': '90'
        }
        headers = {
            'Authorization': f'Bearer {api_key}'
        }

        response = requests.post(
            f'{api_url}/convert',
            files=files,
            data=data,
            headers=headers
        )

    result = response.json()
    job_id = result['job_id']

    # Step 2: Poll for completion
    while True:
        time.sleep(2)

        response = requests.get(
            f'{api_url}/jobs/{job_id}',
            headers={'Authorization': f'Bearer {api_key}'}
        )

        status = response.json()

        if status['status'] != 'processing':
            break

    # Step 3: Download the converted file
    if status['status'] == 'completed':
        download_url = status['result']['download_url']
        response = requests.get(download_url)

        with open('converted_image.jpg', 'wb') as f:
            f.write(response.content)

        print('Conversion completed!')
    else:
        print(f"Conversion failed: {status['message']}")

if __name__ == '__main__':
    convert_image()

Built for Developers

Everything you need to integrate file conversion into your applications

RESTful API

Clean, intuitive REST endpoints that follow industry standards

API Keys

Secure authentication with easy-to-manage API keys

Rate Limits

Generous rate limits that scale with your needs

Webhooks

Get notified when conversions complete with webhook callbacks

Chunked Uploads

Upload large files in chunks for better reliability

Error Handling

Clear error messages and status codes for easy debugging

Simple, Transparent Pricing

Pay only for what you use. No hidden fees.

1 Conversion = 1 Credit • Credits roll over monthly for paid plans

Free Tier

For testing and development

$0 /month
50 one-time credits
Free forever
  • 50 API Credits
  • 10MB max file size
  • Webhook support
  • Priority support
Get Started Free

Starter

For solo devs and small projects

$9 /month
  • 300 credits/month
  • $0.030 per conversion
  • Credits roll over
  • 200MB max file size
  • Webhook support
  • Priority support
Get Started Free
Best Deal

Pro

For growing applications

$29 /month
  • 2000 Monthly Credits
  • $0.0145 per conversion
  • Credits roll over
  • 2GB max file size
  • Webhook support
  • Premium support
Get Started Free

Need more? Get an Enterprise quote.

Unlimited conversions, no file size limits, 99.9% SLA, and dedicated support.

Pricing FAQ

Simple Credit System

1 Credit = 1 Conversion for every format, always. No hidden fees, no surprises. Whether you're converting a tiny icon or a large document, it's always just 1 credit.

Credits Roll Over

Unused credits automatically roll over to the next month as long as you maintain an active subscription. Never lose what you've paid for!

No Lock-in, Cancel Anytime

No long-term commitments or contracts. Cancel anytime. Your API keys remain active until the end of your billing period.

Have more questions? Contact our team

Ready to Get Started?

Join thousands of developers using ConvertHub API to power their file conversion needs.