Back to APIs

Unified Agent API

File Conversion

File Conversion

Turn PDFs, Word, PowerPoint, Excel, web pages and images into text, markdown, PDF, CSV or other image formats.

POST/v1/files/convertPDF, Office, images

Overview

Convert documents, web pages, spreadsheets and images between formats

Credits

2 credits per call

Providers

ConvertAPI

SDK Method

client.convert_file(...)

Parameters

file_urlRequired

string

URL of the file to convert (for source_format web, the page itself).

source_formatRequired

string

Format of the file: pdf, docx, pptx, xlsx, csv, html, web (a page, from its HTML without JavaScript), txt, epub, svg, png, jpg, webp, gif, bmp, tiff or heic.

target_format

string (default: pdf)

Format to convert to. The conversion table's pairs convert in-house; other pairs go to ConvertAPI.

Example Response

{
  "success": true,
  "data": {
    "file_name": "report.pdf",
    "file_size": 48213,
    "file_url": "https://do54mp3xe5x8d.cloudfront.net/conversions/3f1c9a.pdf",
    "source_format": "docx",
    "target_format": "pdf"
  },
  "metadata": {
    "provider_used": "suprsonic_convert",
    "providers_tried": [
      "suprsonic_convert"
    ],
    "mode_used": null,
    "response_time_ms": 912,
    "request_id": "req_4b7d2e10"
  },
  "credits_used": 2
}

Get Started

Create a Suprsonic API key in your dashboard, then call the endpoint with your key in the Authorization header.

Try File Conversion

Test File Conversion in the interactive playground. No setup required.

Open Playground