API Documentation

Integrate file conversions into your applications using our REST API.

Table of Contents

Getting Started

The Conversion Tools REST API provides HTTP-based access to our file conversion services using token authentication. All requests and responses use JSON format.

Quick start: Sign up for a free account, grab your API token from your Profile, and start converting files in minutes.

Libraries

We maintain official REST API client libraries for the most popular languages:

TypeScript client with full type safety, error handling, and retry logic.

bash
npm install conversiontools

Python client with type hints, async support, and error handling.

bash
pip install conversiontools

PHP client with retry logic, PSR-7 streaming, and error handling.

bash
composer require conversiontools/conversiontools-php
New in v2.0.0+: TypeScript/type hints, custom error classes, automatic retry logic, sandbox mode support, and improved developer experience.

OpenAPI 3.0 Specification: Download openapi.yaml -- Use with code generators, API testing tools, or explore with Swagger Editor

Pricing

Our API offers flexible, pay-as-you-grow pricing with unlimited sandbox testing.

Free

100 API calls/month -- Perfect for testing

50 MB / 1,000

$6/month -- Ideal for automation

100 MB / 2,000

$18/month -- Production apps

500 MB / 5,000

$45/month -- High volume

All plans include:

  • Unlimited sandbox testing
  • OpenAPI specification
  • Node.js, Python, and PHP libraries
  • Webhook callbacks
  • 100 AI Conversion Credits/month (separate from regular API calls). Buy more anytime

View detailed pricing →

Authentication

When your account is created, we generate an API Token for accessing the Conversion Tools REST API. You can find it on your Profile page.

Pass the token in the Authorization header using the Bearer scheme:

http
Authorization: Bearer <API Token>

Sample request verifying API access:

bash
curl -sSX GET https://api.conversiontools.io/v1/ \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <API Token>"

API URL

The Conversion Tools REST API is available at:

https://api.conversiontools.io/v1/

API Requests

Each API request must contain the following components:

  • The HTTP method: GET or POST
  • Authorization header with your API Token
  • Content-Type: application/json header
  • A JSON request body (see API Reference below)

Example: creating a new conversion task:

bash
curl -sSX POST https://api.conversiontools.io/v1/tasks \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <API Token>" \
-d '{
"type": "convert.website_to_jpg",
"options": {
"url": "http://google.com",
"images": "yes"
}
}'

API Response

Every API response contains an error field plus optional data:

json
{
"error": "<error text>",
<data>
}

Success response:

json
{
"error": null,
"task_id": "4147c475ffe94ec8a11aff9a6a8f437a"
}

Error response:

json
{
"error": "Bad request"
}

API Reference

The file conversion process consists of 4 steps:

  1. Upload file to the server (optional when a URL is provided)
  2. Run conversion task
  3. Get conversion task status
  4. Download the result file

1Upload file to the server

If you are providing the file by URL, skip to Step 2.

Upload a file using an HTTP POST request with Content-Type: multipart/form-data.

POSThttps://api.conversiontools.io/v1/files

Headers:

http
Authorization: Bearer <API Token>
Content-Type: multipart/form-data

Parameters:

ParameterRequiredDescription
fileRequiredThe file to upload

Response:

json
{
"error": null,
"file_id": "be87de1a680c4451a49a72df3fecd3fd"
}

Example:

bash
curl -sSX POST https://api.conversiontools.io/v1/files \
-H "Authorization: Bearer <API Token>" \
-F "file=@/home/user/Desktop/test.xml"

2Run conversion task

POSThttps://api.conversiontools.io/v1/tasks

Parameters:

ParameterRequiredDescription
typeRequiredConversion type, e.g. convert.website_to_pdf
optionsRequiredSet of options specific to each conversion type

Options parameters:

ParameterRequiredDescription
file_idFor uploaded filesThe file_id returned by POST /files
urlFor URL-basedURL of the file to convert

Response:

json
{
"error": null,
"task_id": "4147c475ffe94ec8a11aff9a6a8f437a"
}

3Get conversion task status

Poll this endpoint until the task finishes (check the status field).

Important: Send this request no more than once every 5-10 seconds.
GEThttps://api.conversiontools.io/v1/tasks/<task_id>

Example:

bash
curl -sSX GET https://api.conversiontools.io/v1/tasks/d9b5369bfc6541d88581d4ff80954917 \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <API Token>"

Status values:

PENDINGTask is queued
RUNNINGTask is processing
SUCCESSCompleted successfully
ERRORFinished with error

When SUCCESS:

json
{
"error": null,
"status": "SUCCESS",
"file_id": "ce87de1a680c4451a49a72df3fecd3fe"
}

When ERROR:

json
{
"error": "Wrong file format",
"status": "ERROR",
"file_id": null
}

4Download result file

GEThttps://api.conversiontools.io/v1/files/<file_id>

The response includes a Content-Disposition: attachment; header, which triggers the file download in browsers. When using the SDK, the response body contains the raw file bytes.

Available Conversion Types

Below are all conversion types that accept configurable options. Click a row to expand and see its parameters. For the full specification, refer to the OpenAPI specification.

Showing 199 of 199 conversion types with configurable options.

See all converters available on the website.

Need Help?

If you have any questions about the Conversion Tools REST API, feel free to contact us.