Frequently Asked Question
Convert - Convert files between various formats
Last Updated about a month ago
FileConvert API
Overview
This API allows you to convert files between different formats using the unoconv utility. It supports various conversions including spreadsheets, documents, and presentations.
Endpoint
/v2/fileconvert
Method
POST only
Authentication
API key required in the request header:
X-API-Key: your_api_key
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| File | File | Yes | The file to be converted |
| f | String | Yes | Conversion function (e.g., XLSX2PDF) |
Supported Conversion Functions
- PDF - Portable Document Format
- DOC - Microsoft Word (Legacy)
- DOCX - Microsoft Word
- ODT - OpenDocument Text
- RTF - Rich Text Format
- TXT - Plain Text
- XLS - Microsoft Excel (Legacy)
- XLSX - Microsoft Excel
- ODS - OpenDocument Spreadsheet
- CSV - Comma-Separated Values
- PPT - Microsoft PowerPoint (Legacy)
- PPTX - Microsoft PowerPoint
- ODP - OpenDocument Presentation
- PNG - Portable Network Graphics
- JPG - JPEG Image
- GIF - Graphics Interchange Format
- BMP - Bitmap Image
- TIFF - Tagged Image File Format
- SVG - Scalable Vector Graphics
- HTML - HyperText Markup Language
- MD - Markdown Text
- GFM - GitHub Flavored Markdown
- LATEX - LaTeX Document
- EPUB - Electronic Publication
- RST - reStructuredText
- TEXTILE - Textile Markup
- MEDIAWIKI - MediaWiki Markup
- ORG - Emacs Org Mode
- ASCIIDOC - AsciiDoc Markup
- JSON - JavaScript Object Notation
- YAML - YAML Ain't Markup Language
In the following combinations - Common sense should be applied, e.g. Converting a BMP to JSON will result in.... nothing useful.
- DOC2PDF, DOC2DOCX, DOC2ODT, DOC2RTF, DOC2TXT, DOC2HTML
- DOCX2PDF, DOCX2DOC, DOCX2ODT, DOCX2RTF, DOCX2TXT, DOCX2HTML
- ODT2PDF, ODT2DOC, ODT2DOCX, ODT2RTF, ODT2TXT, ODT2HTML
- RTF2PDF, RTF2DOC, RTF2DOCX, RTF2ODT, RTF2TXT, RTF2HTML
- XLS2PDF, XLS2XLSX, XLS2ODS, XLS2CSV, XLS2HTML
- XLSX2PDF, XLSX2XLS, XLSX2ODS, XLSX2CSV, XLSX2HTML
- ODS2PDF, ODS2XLS, ODS2XLSX, ODS2CSV, ODS2HTML
- CSV2PDF, CSV2XLS, CSV2XLSX, CSV2ODS, CSV2HTML
- PPT2PDF, PPT2PPTX, PPT2ODP, PPT2HTML
- PPTX2PDF, PPTX2PPT, PPTX2ODP, PPTX2HTML
- ODP2PDF, ODP2PPT, ODP2PPTX, ODP2HTML
- PNG2PDF, PNG2JPG, PNG2GIF, PNG2BMP, PNG2TIFF, PNG2SVG
- JPG2PDF, JPG2PNG, JPG2GIF, JPG2BMP, JPG2TIFF, JPG2SVG
- JPEG2PDF, JPEG2PNG, JPEG2GIF, JPEG2BMP, JPEG2TIFF, JPEG2SVG
- GIF2PDF, GIF2PNG, GIF2JPG, GIF2BMP, GIF2TIFF
- BMP2PDF, BMP2PNG, BMP2JPG, BMP2GIF, BMP2TIFF
- TIFF2PDF, TIFF2PNG, TIFF2JPG, TIFF2GIF, TIFF2BMP
- SVG2PDF, SVG2PNG, SVG2JPG
- MD2HTML, MD2PDF, MD2DOCX, MD2ODT, MD2LATEX, MD2RTF, MD2EPUB, MD2RST, MD2TXT
- HTML2MD, HTML2PDF, HTML2DOCX, HTML2ODT, HTML2LATEX, HTML2EPUB, HTML2TXT
- LATEX2PDF, LATEX2HTML, LATEX2DOCX, LATEX2MD, LATEX2ODT
- TEX2PDF, TEX2HTML, TEX2DOCX, TEX2MD, TEX2ODT
- RST2HTML, RST2PDF, RST2DOCX, RST2MD, RST2LATEX
- ORG2HTML, ORG2PDF, ORG2DOCX, ORG2MD, ORG2LATEX
- TEXTILE2HTML, TEXTILE2PDF, TEXTILE2DOCX, TEXTILE2MD
- MEDIAWIKI2HTML, MEDIAWIKI2PDF, MEDIAWIKI2DOCX, MEDIAWIKI2MD
- ASCIIDOC2HTML, ASCIIDOC2PDF, ASCIIDOC2DOCX, ASCIIDOC2MD
- EPUB2HTML, EPUB2PDF, EPUB2DOCX, EPUB2MD
- GFM2HTML, GFM2PDF, GFM2DOCX, GFM2MD (GitHub Flavored Markdown)
- JSON2HTML, JSON2MD, JSON2YAML
- TXT2HTML, TXT2PDF, TXT2MD, TXT2DOC
Response
On success, the API returns the converted file with appropriate Content-Type and Content-Disposition headers for download.
On failure, the API returns a JSON response with error details:
{
"status": "error",
"message": "Error message description",
"details": "Additional error details (if available)"
} Example Usage
Using cURL
curl -X POST \ -H "X-API-Key: your_api_key" \ -F "File=@/path/to/your/document.xlsx" \ -F "f=XLSX2PDF" \ "https://api-url/v2/fileconvert" \ --output converted_document.pdf
Using HTML Form with JavaScript
Convert
Error Codes
| Error | Description |
|---|---|
| No file uploaded or upload error | The file was not properly uploaded or there was an error during upload |
| Invalid conversion function | The specified conversion function is not supported |
| File conversion failed | The conversion process failed, check the details field for more information |
| unauthorised | Invalid or missing API key |
| insufficient credit | Your account does not have sufficient credit to perform this operation |
