POST /api/v1/convert · GET /api/v1/convert/formats

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-data

Upload a file and specify the source and target formats. The response returns a presigned MinIO URL to the converted output, valid for 24 hours.

ParameterTypeRequiredDescription
binaryyesThe file to convert, sent as a multipart form field
stringyesSource format extension, e.g. docx, png, mp4
stringyesTarget 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"
}
GET/api/v1/convert/formats

Returns 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

FromToEngine
pdfLibreOffice headless
docxLibreOffice headless
pdfLibreOffice headless
pdfLibreOffice headless
docxLibreOffice headless

Images

FromToEngine
webpSharp
pngSharp
avifSharp
pngSharp
jpgSharp
pngSharp

Video

FromToEngine
gifFFmpeg
webmFFmpeg
mp4FFmpeg

Data

FromToEngine
jsonNode.js
csvNode.js
jsonNode.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.