API Documentation

Complete reference for the FileConvertLab REST API.

Authentication

All API requests require authentication using an API key. Include your key in theX-API-Key header with every request.

X-API-Key: sk_live_your_api_key_here

Get your API key from the API Pricing page.

Base URL

https://fileconvertlab.com/api/v1

Create Conversion Job

Submit a file for conversion. The API uses an asynchronous job-based workflow.

POST/v1/jobs

Request

Content-Type: multipart/form-data

ParameterTypeRequiredDescription
filebinaryYesThe file to convert
operationstringYesConversion operation (see Operations)
optionsJSONNoOperation-specific options
webhook_urlstringNoURL to receive completion notification

Response (202 Accepted)

{
  "id": "job_abc123xyz",
  "status": "processing",
  "operation": "pdf-to-word",
  "created_at": "2025-12-07T10:30:00Z",
  "estimated_seconds": 15,
  "file": {
    "name": "document.pdf",
    "size": 1048576,
    "mime_type": "application/pdf"
  }
}

Get Job Status

Check the status of a conversion job. Poll this endpoint until status iscompleted orfailed.

GET/v1/jobs/{job_id}

Response

{
  "id": "job_abc123xyz",
  "status": "completed",
  "operation": "pdf-to-word",
  "progress": 100,
  "created_at": "2025-12-07T10:30:00Z",
  "completed_at": "2025-12-07T10:30:12Z",
  "result": {
    "download_url": "/v1/jobs/job_abc123xyz/download",
    "expires_at": "2025-12-07T11:30:12Z",
    "file_name": "document.docx",
    "file_size": 524288
  }
}

Status Values

StatusDescription
pendingJob is queued for processing
processingConversion is in progress
completedConversion finished successfully
failedConversion failed (see error field)

Download Result

Download the converted file. Only available after job status iscompleted.

GET/v1/jobs/{job_id}/download

Returns the binary file with appropriate Content-Type and Content-Disposition headers.

Supported Operations

PDF Conversions

OperationInputOutputOptions
pdf-to-wordPDFDOCX
pdf-to-excelPDFXLSX
pdf-to-pptPDFPPTX
pdf-to-pngPDFPNG/ZIPdpi: 72-600
pdf-to-jpegPDFJPEG/ZIPdpi, quality

Office to PDF

OperationInputOutput
word-to-pdfDOCX, DOCPDF
excel-to-pdfXLSX, XLSPDF
ppt-to-pdfPPTX, PPTPDF
png-to-pdfPNGPDF
jpeg-to-pdfJPEGPDF

OCR Operations

OperationInputOutputOptions
ocr-pdfScanned PDFSearchable PDFlanguage
ocr-to-wordPDF, ImageDOCXlanguage

OCR Languages

Supported language codes for OCR operations:

engdeufraspaporruschi_simchi_trajpnkor+ 9 more

PDF Utilities

OperationInputOutputOptions
compress-pdfPDFCompressed PDFlevel: low, medium, high

Rate Limits

PlanRequests/minRequests/dayMax File Size
Pro501,000500 MB

Rate Limit Headers

Every response includes rate limit information:

X-RateLimit-Limit: 50
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1701962400

Error Handling

Error Response Format

{
  "error": {
    "code": "INVALID_FILE_TYPE",
    "message": "Expected PDF file, got image/png",
    "details": {
      "expected": ["application/pdf"],
      "received": "image/png"
    }
  }
}

Error Codes

HTTPCodeDescription
400INVALID_FILE_TYPEWrong file format for operation
400FILE_TOO_LARGEFile exceeds size limit
400INVALID_OPERATIONUnknown operation type
401UNAUTHORIZEDMissing or invalid API key
404JOB_NOT_FOUNDJob ID does not exist
410JOB_EXPIREDResult file was deleted
429RATE_LIMITEDToo many requests
500INTERNAL_ERRORServer error
502CONVERSION_FAILEDConversion engine error

Code Examples

cURL

 Create conversion job
curl -X POST https://fileconvertlab.com/api/v1/jobs \
  -H "X-API-Key: sk_live_abc123" \
  -F "file=@document.pdf" \
  -F "operation=pdf-to-word"
 Check job status
curl https://fileconvertlab.com/api/v1/jobs/job_abc123 \
  -H "X-API-Key: sk_live_abc123"
 Download result
curl -O https://fileconvertlab.com/api/v1/jobs/job_abc123/download \
  -H "X-API-Key: sk_live_abc123"

JavaScript

const formData = new FormData();
formData.append('file', fileInput.files[0]);
formData.append('operation', 'pdf-to-word');

// Create job
const response = await fetch('https://fileconvertlab.com/api/v1/jobs', {
  method: 'POST',
  headers: { 'X-API-Key': 'sk_live_abc123' },
  body: formData
});
let job = await response.json();

// Poll until complete
while (job.status === 'processing') {
  await new Promise(r => setTimeout(r, 1000));
  const res = await fetch(`https://fileconvertlab.com/api/v1/jobs/${job.id}`, {
    headers: { 'X-API-Key': 'sk_live_abc123' }
  });
  job = await res.json();
}

// Download result
if (job.status === 'completed') {
  window.location.href =
    `https://fileconvertlab.com${job.result.download_url}`;
}

Python

import requests
import time

API_KEY = 'sk_live_abc123'
BASE_URL = 'https://fileconvertlab.com/api/v1'
headers = {'X-API-Key': API_KEY}

# Create job
with open('document.pdf', 'rb') as f:
    response = requests.post(
        f'{BASE_URL}/jobs',
        headers=headers,
        files={'file': f},
        data={'operation': 'pdf-to-word'}
    )
job = response.json()

# Poll until complete
while job['status'] == 'processing':
    time.sleep(1)
    response = requests.get(
        f"{BASE_URL}/jobs/{job['id']}",
        headers=headers
    )
    job = response.json()

# Download result
if job['status'] == 'completed':
    response = requests.get(
        f"{BASE_URL}{job['result']['download_url']}",
        headers=headers
    )
    with open('document.docx', 'wb') as f:
        f.write(response.content)

Ready to start?

Get your API key and begin integrating document conversion.

Get API Key — $3/month
API Documentation - FileConvertLab REST API