Developers API

Convert Any File with One Simple API

Convert documents, images, ebooks, presentations, and more — all in one API.
Fast, secure, and easy to integrate. Setup in 5 minutes.

NEW FEATURES

Everything You Need to Build & Scale

SDKs & white-label solutions

Official SDKs

Install our official PHP and JavaScript SDKs for quick integration

$ composer require converthub/php-sdk
$ npm install @converthub/sdk

S3 & R2 Integration

Connect your AWS S3 or Cloudflare R2 bucket. Converted files are automatically pushed to your storage.

AWS S3 Cloudflare R2 Auto-sync

White Label Starter Kit

Clone our complete frontend + backend and launch your own file conversion service

Laravel Tailwind Livewire

Lightning Fast

Sub-second processing

99.9% Uptime

Enterprise SLA

100+ Formats

All major formats

Secure

Files auto-deleted

Quick Start with our SDKs

Get up and running in minutes with our official SDKs

PHP SDK

Install via Composer:

composer require converthub/php-sdk

Quick example:

<?php
use ConvertHub\ConvertHubClient;

$client = new ConvertHubClient('YOUR_API_KEY');

// Convert a file
$conversion = $client->conversions()->convert(
    'path/to/document.pdf',
    'docx'
);

// Wait for completion
$job = $client->jobs()->waitForCompletion($conversion->getJobId());

// Download the converted file
if ($job->isCompleted()) {
    $client->jobs()->getDownloadUrl($conversion->getJobId())->downloadTo('output.docx');
}

JavaScript SDK

Install via npm:

npm install @converthub/sdk

Quick example:

import { ConvertHubClient } from '@converthub/sdk';

const client = new ConvertHubClient({
    apiKey: 'YOUR_API_KEY'
});

// Convert a file
const conversion = await client.convertFile({
  file: 'path/to/document.pdf',
  targetFormat: 'docx'
});

// Wait for completion
const job = await conversion.waitForCompletion();

// Download the converted file
if (job.status === 'completed') {
  await conversion.download('output.docx');
}

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()
WHITE LABEL SOLUTION

Launch Your Own File Conversion Service

Get a complete, production-ready file conversion website powered by ConvertHub API. Clone our starter kit and have your branded service running in minutes.

Full Frontend + Backend

Complete Laravel application with Livewire components

800+ Format Conversions

Images, documents, videos, audio, and more

Drag & Drop Interface

User-friendly design with real-time progress

Responsive & Modern

Built with Tailwind CSS, works on all devices

ConvertHub Starter Kit

# Quick deployment
$ git clone converthub/starter-kit
$ composer install
$ npm install && npm run build
$ php artisan serve
# Ready to launch! 🚀
Laravel v12 PHP 8.2+ Livewire v3 Tailwind v4 MIT License

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

INTEGRATIONS

No-Code & Automation Platforms

Integrate file conversion into your automation workflows without writing code

n8n

Automate file conversions in your n8n workflows

Learn More

Make.com

Visual automation with powerful file conversion

Coming Soon

Zapier

Connect ConvertHub with 5,000+ apps

Coming Soon

Want to use our API with other platforms?

View REST API Documentation

Start converting for free

Test the full API with 🎁 50 free credits.

Pay only for what you use. No hidden fees. Cancel anytime.

1 Conversion = 1 Credit • Credits roll over monthly and never expire

Flexible Credits

No monthly commitment – buy only what you need

$0.08 – $0.25 /conversion
  • No recurring fees
  • Lower rates for higher volumes
  • Credits never expire
  • Upload files up to 500MB
  • S3/R2 Bucket Integrations
  • Webhook support
  • Priority support
Get Started Free
No credit card required

Starter

For solo devs and small projects

$9 /month
  • 300 credits/month
  • $0.030 per conversion
  • Credits roll over
  • Upload files up to 500MB
  • S3/R2 Bucket Integrations
  • Webhook support
  • Priority support
Get Started Free
No credit card required
Best Deal

Pro

For growing applications

$29 /month
  • 2000 Monthly Credits
  • $0.0145 per conversion
  • Credits roll over
  • Upload files up to 2GB
  • S3/R2 Bucket Integrations
  • Webhook support
  • Premium support
Get Started Free
No credit card required

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

Trusted by Developers Worldwide

See what developers are saying about ConvertHub API

Marko Denic

Marko Denic

markodenic.tech

The API is well-documented, easy to integrate, and respects privacy. If you're looking for a file conversion API that just works, ConvertHub is a smart choice.

Csaba Kissi

Csaba Kissi

csabakissi.com

With support for over 800 format pairs, this API covers every use case. Great documentation and it works perfectly.

I'm impressed with ConvertHub API. It's fast, reliable and easy to integrate. It made file conversion straightforward in my projects

Simon Tunaitis

Simon Tunaitis

solotuna.com

ConvertHub API is super easy to integrate, reliable and fast. I highly recommend it.

Petar Ivanov

Petar Ivanov

petarivanov.tech

ConvertHub API saved us hours of manual processing. The integration was easy and the format coverage is impressive.

Ready to Get Started?

50 free API calls. No credit card required.