Convert — File Conversion
Convert documents, images, video, and data between formats. Powered by LibreOffice, FFmpeg, and Sharp running inside a dedicated Docker worker on the waypoints VPS.
/api/v1/convertContent-Type: multipart/form-dataUpload a file and specify the source and target formats. The response returns a presigned MinIO URL to the converted output, valid for 24 hours.
| Parameter | Type | Required | Description |
|---|---|---|---|
| file | binary | yes | The file to convert, sent as a multipart form field |
| from | string | yes | Source format extension, e.g. docx, png, mp4 |
| to | string | yes | Target format extension, e.g. pdf, webp, gif |
cURL
curl -X POST https://api.waypoints.tech/v1/convert \
-H "x-api-key: wp_live_your_key_here" \
-F "file=@/path/to/document.docx" \
-F "from=docx" \
-F "to=pdf"SDK (@waypoints/sdk)
import waypoints from "@waypoints/sdk";
import { readFileSync } from "fs";
const wp = new waypoints({ apiKey: process.env.WAYPOINTS_API_KEY });
const file = readFileSync("./invoice.docx");
const result = await wp.convert({
file,
from: "docx",
to: "pdf",
});
console.log(result.url); // presigned URL (24h TTL)
console.log(result.filename); // "output.pdf"Response
{
"url": "https://minio.waypoints.tech/waypoints-outputs/convert/550e8400-e29b-41d4-a716-446655440000.pdf",
"filename": "output.pdf",
"expires_at": "2026-03-22T12:00:00Z",
"credits_used": 1,
"request_id": "req_01jx9k2m3n4p5q6r7s8t9u0v"
}/api/v1/convert/formatsReturns all supported conversion pairs as an array of { from, to } objects. No authentication required. Does not consume credits.
Response (excerpt)
{
"formats": [
{ "from": "docx", "to": "pdf", "category": "documents" },
{ "from": "pdf", "to": "docx", "category": "documents" },
{ "from": "png", "to": "webp", "category": "images" },
{ "from": "mp4", "to": "gif", "category": "video" },
{ "from": "csv", "to": "json", "category": "data" }
]
}Supported Conversions
Documents
| From | To | Engine |
|---|---|---|
| docx | LibreOffice headless | |
| docx | LibreOffice headless | |
| pptx | LibreOffice headless | |
| xlsx | LibreOffice headless | |
| odt | docx | LibreOffice headless |
Images
| From | To | Engine |
|---|---|---|
| png | webp | Sharp |
| webp | png | Sharp |
| png | avif | Sharp |
| avif | png | Sharp |
| heic | jpg | Sharp |
| svg | png | Sharp |
Video
| From | To | Engine |
|---|---|---|
| mp4 | gif | FFmpeg |
| mp4 | webm | FFmpeg |
| mov | mp4 | FFmpeg |
Data
| From | To | Engine |
|---|---|---|
| csv | json | Node.js |
| json | csv | Node.js |
| xml | json | Node.js |
Notes
File size limits
Maximum file size is 50 MB per request. For larger files, split the conversion into chunks or contact support for a custom limit.
Video conversion time
Video conversions (especially mp4 → gif) can take several seconds for longer clips. The request will hold open until conversion completes. For very long videos, consider trimming first.
Output storage
Converted files are stored in MinIO and returned as presigned URLs valid for 24 hours. Download the file promptly or upload it to your own storage.