API
Document conversion, one HTTP call away
Convert PDF, DOCX, XLSX, PPTX, images and more from your application. Built on the same infrastructure that powers DocForge.app.
300+ format pairs
PDF↔DOCX, XLSX↔CSV, image↔image, anything↔TXT with OCR.
Stable & idempotent
Job IDs + webhook signatures. Safe to retry, never double-bill.
Predictable pricing
1 credit per file ≤ 50MB. OCR doubles. No per-page surprises.
Quickstart
- Sign up and grab a key from Dashboard → API keys.
- Upload your file via
POST /v1/uploads/presign, then PUT to the returned URL. - Create a conversion job with
POST /v1/convert. - Poll
GET /v1/jobs/:id— or subscribe to a webhook.
cURL
curl -X POST https://api.docforge.cc/v1/convert \
-H "Authorization: Bearer dfk_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"from": "pdf",
"to": "docx",
"inputFileId": "uuid-from-presign",
"options": { "ocr": true, "ocrLang": "eng" }
}'Node.js
import { DocForge } from '@docforge/sdk';
const client = new DocForge(process.env.DOCFORGE_KEY!);
const job = await client.convert({
from: 'pdf', to: 'docx',
file: fs.createReadStream('./contract.pdf'),
options: { ocr: true },
});
await job.waitUntilDone();
await job.download('./contract.docx');Endpoints
| Method | Path | Description |
|---|---|---|
| POST | /v1/uploads/presign | Get an upload URL + fileId. |
| POST | /v1/convert | Create a conversion job. |
| GET | /v1/jobs/:id | Job status + progress. |
| GET | /v1/jobs/:id/download | Stream the converted file. |
| POST | /v1/billing/portal | Open Stripe customer portal. |
Rate limits
- Pro: 10 requests/second, 500 jobs/day
- Business: 50 requests/second, 5,000 jobs/day
- Custom: contact us for dedicated capacity