Overview
Convert documents, web pages, spreadsheets and images between formats
Credits
2 credits per call
Providers
ConvertAPI
SDK Method
client.convert_file(...)
Parameters
file_urlRequiredstring
URL of the file to convert (for source_format web, the page itself).
source_formatRequiredstring
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_formatstring (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.