Developer API v1.0

Convert Files Programmatically

The simple REST API for AI pipelines, RAG systems, and high-volume document workflows. 60+ format pairs with clean, structured output.

Quick Start

Get up and running in under a minute. Our conversion endpoint handles multipart file uploads and returns a secure, public download URL.

1

Get an API Key

Enable API access on the Account page (Pro or Business subscription required).

2

Send a POST Request

Upload your file to the /convert endpoint with your desired output format.

3

Get Result URL

Receive a JSON response with the download_url pointing to your converted file.

Not a developer?

Use Batch Convert — our no-code interface powered by the FileSwift API. Upload a folder, set your conversion rules per file type, and download everything as a ZIP. No code required.

Try Batch Convert

Batch workflows are the superpower of FileSwift. Point the API at a folder of PDFs, CSVs, images or Word docs and convert everything in a single script. All 60+ conversion pairs are supported.

import requests
import os
from pathlib import Path

url = "https://fileswift.io/api/v1/convert"
headers = {"Authorization": "Bearer YOUR_API_KEY"}

input_folder = "/path/to/your/documents"  # folder to convert
output_folder = "/path/to/save/results"   # where to save output
output_format = "md"  # target format: md, pdf, docx, jpg, csv etc.

os.makedirs(output_folder, exist_ok=True)

for file_path in Path(input_folder).iterdir():
    if file_path.is_file():
        print(f"Converting {file_path.name}...")

        with open(file_path, "rb") as f:
            response = requests.post(
                url,
                headers=headers,
                files={"file": f},
                data={
                    "output_format": output_format,
                    "download": "true"
                }
            )

        if response.status_code == 200:
            output_path = Path(output_folder) / f"{file_path.stem}.{output_format}"
            with open(output_path, "wb") as out:
                out.write(response.content)
            print(f"  ✓ Saved: {output_path.name}")
        else:
            print(f"  ✗ Failed ({response.status_code}): {response.text}")

print("All done.")

output_format accepts any supported conversion target: md, pdf, docx, xlsx, csv, jpg, png, json, xml, html, txt and more. See the full list of supported conversions on the dashboard.

Endpoint Details

POST/api/v1/convert

The core endpoint for all file transformations. Supports over 60 incoming formats.

Request Body

ParameterTypeDescription
fileFileThe source file to convert (multipart/form-data).
output_formatStringThe target format (e.g., md, json, docx). All 60+ conversion pairs are supported.
downloadBooleanDefault: false. If true, returns the file stream directly instead of a JSON URL.

Success Response

{
  "success": true,
  "job_id": "api_20260406_8f3d2a",
  "download_url": "https://storage.googleapis.com/...",
  "input_format": "PDF",
  "output_format": "MARKDOWN",
  "file_size_bytes": 124050,
  "calls_remaining": 482
}

Error Handling

CodeMessageScenario
401UnauthorizedInvalid, missing, or inactive API key.
403Permission DeniedAccount on Free plan (API requires Pro/Business).
413Payload Too LargeFile exceeds your plan size limit.
429Rate Limit ExceededMonthly quota reached or rapid request rate limit.

Pro Plan Limits

For single developers and startups.

  • 500 API calls per month
  • Max 200MB per file
  • Standard processing queue

Business Plan Limits

For agencies and high-volume teams.

  • Unlimited API calls
  • Max 500MB per file
  • Priority processing queue

Ready to automate?

Get your API key today and start converting files in your own applications.

Questions? Contact hello@fileswift.io