Document conversion API
The same conversion engine the website runs on, callable from your own server. Every tool listed below is available through one endpoint.
Authenticate
Create a key in your dashboard and send it as a bearer token. The key is shown once; we store only its hash.
Authorization: Bearer cf_live_a1b2c3d4_…Keys are server-side only. A key in browser code is a leaked key — the API sends no CORS headers, so browser requests are refused by design.
1 · Start a conversion
POST /api/convert takes a multipart form with toolId and one or more files. It returns immediately with an id — conversion runs in the background.
curl -X POST https://convertflow.routerb.ro/api/convert \
-H "Authorization: Bearer $CONVERTFLOW_KEY" \
-F "toolId=word-to-pdf" \
-F "files=@report.docx"
# {"id":"c1x…","status":"queued"}2 · Poll for the result
GET /api/convert/{id} reports queued, processing, completed or failed. Poll about once a second.
curl https://convertflow.routerb.ro/api/convert/$ID \
-H "Authorization: Bearer $CONVERTFLOW_KEY"
# {"id":"c1x…","status":"completed","downloadUrl":"/api/convert/c1x…/download","fileName":"report.pdf"}3 · Download
GET /api/convert/{id}/download streams the finished file for 24 hours.
curl -L https://convertflow.routerb.ro/api/convert/$ID/download \
-H "Authorization: Bearer $CONVERTFLOW_KEY" \
-o report.pdfA complete example
const form = new FormData();
form.set('toolId', 'word-to-pdf');
form.set('files', new Blob([bytes]), 'report.docx');
const start = await fetch('https://convertflow.routerb.ro/api/convert', {
method: 'POST',
headers: {Authorization: `Bearer ${process.env.CONVERTFLOW_KEY}`},
body: form,
});
const {id} = await start.json();
// Poll until status is "completed" or "failed".
let job;
do {
await new Promise(r => setTimeout(r, 1000));
job = await fetch(`https://convertflow.routerb.ro/api/convert/${id}`, {
headers: {Authorization: `Bearer ${process.env.CONVERTFLOW_KEY}`},
}).then(r => r.json());
} while (job.status === 'queued' || job.status === 'processing');Options
Some tools accept extra form fields alongside the file:
pages— a selection such as1-3,5for split, extract, rotate and PDF to JPG.rotation—90,180or270for rotate.quality—20to95for image and PDF compression.ocr— language and output mode for OCR PDF.
Errors
Failures return {"error": "…"} with a matching status:
400— The upload or an option was rejected. The message says which.401— Missing or invalid key, or the key was revoked.403— The key belongs to an account without an active Business plan.404— No conversion with that id belongs to your account.409— The file is not ready yet. Keep polling.410— The file expired. Conversions are kept for 24 hours.413— The upload is over your plan limit.429— Rate limit, or your monthly allowance is used up.
Limits
Business includes 5,000 conversions per month and uploads up to 1 GB. API calls draw on the same monthly allowance as the website. Uploads are rate limited to 120 per hour per key. Finished files are deleted after 24 hours.
Available tools
Pass any of these as toolId:
ocr-pdf— OCR PDF. Accepts PDF, returns PDF.edit-pdf— Edit PDF. Accepts PDF, returns PDF.word-to-pdf— Word to PDF. Accepts DOCX, returns PDF.excel-to-pdf— Excel to PDF. Accepts XLSX, returns PDF.powerpoint-to-pdf— PowerPoint to PDF. Accepts PPTX, returns PDF.jpg-to-pdf— Images to PDF. Accepts JPG, JPEG, PNG, WEBP, returns PDF.pdf-to-jpg— PDF to JPG. Accepts PDF, returns ZIP.txt-to-pdf— Text to PDF. Accepts TXT, returns PDF.csv-to-excel— CSV to Excel. Accepts CSV, returns XLSX.excel-to-csv— Excel to CSV. Accepts XLSX, returns CSV.docx-to-txt— DOCX to Text. Accepts DOCX, returns TXT.image-converter— Image to JPG. Accepts PNG, WEBP, JPG, JPEG, returns JPG.merge-pdf— Merge PDF. Accepts PDF, returns PDF.split-pdf— Split PDF. Accepts PDF, returns ZIP.compress-pdf— Compress PDF. Accepts PDF, returns PDF.rotate-pdf— Rotate PDF. Accepts PDF, returns PDF.extract-pdf— Extract PDF Pages. Accepts PDF, returns PDF.
Good to know
There is no SDK yet — the API is three plain HTTP calls, and a wrapper would add more to maintain than it saves. Results are polled rather than pushed; if webhooks would help your integration, say so and they move up the list.
Create a key