Documentation menu

Getting Started with ConvertAPI

ConvertAPI is a cloud-based file conversion service that supports over 500 file formats through a single REST API. This guide takes you from account creation to your first converted file.

Create an account

Sign up for a free account to get your API Token. The token authenticates every request. New accounts include a card-free trial with 250 conversions.

You can view and manage your tokens on the authentication dashboard.

Make your first conversion

Convert a DOCX file to PDF with a single request. Pass your API Token as a Bearer token in the Authorization header (see Authentication for the query-parameter alternative):

curl -X POST https://v2.convertapi.com/convert/docx/to/pdf \
  -H "Authorization: Bearer your_api_token" \
  -F "File=@/path/to/my_file.docx" \
  -F "StoreFile=true"

The response lists the converted files. With StoreFile=true, each file is returned as a URL you can download for the next 3 hours; omit it to get the file content inline as Base64.

{
  "ConversionCost": 1,
  "Files": [
    {
      "FileName": "my_file.pdf",
      "FileExt": "pdf",
      "FileSize": 28204,
      "Url": "https://v2.convertapi.com/d/.../my_file.pdf"
    }
  ]
}

The same /convert/{from}/to/{to} pattern works for every supported conversion - swap docx and pdf for the formats you need.

Prefer not to write code yet? Use the interactive API tool to configure a conversion in the browser and generate a ready-to-use snippet.

Use an SDK

Official client libraries wrap authentication, uploads, and downloads so you do not have to build requests by hand. Install the library for your language:

  • .NET - dotnet add package ConvertApi (library)
  • Python - pip install convertapi (library)
  • PHP - composer require convertapi/convertapi-php (library)
  • Node.js - npm install convertapi (library)
  • Java - Maven com.convertapi.client:convertapi (library)
  • Ruby - gem install convert_api (library)
  • Go - go get github.com/ConvertAPI/convertapi-go (library)

The same DOCX to PDF conversion in C#:

var convertApi = new ConvertApi("your_api_token");
var result = await convertApi.ConvertAsync("docx", "pdf",
    new ConvertApiFileParam("File", @"C:\document.docx"));
await result.SaveFilesAsync(@"C:\output\");

If your language is not listed, call the REST endpoints directly - see the API reference or the Postman collection.

Next steps

You can invite team members with roles and access levels, and track usage on the statistics dashboard or via the /user endpoint.